From e69bdf07c3466e88e3a24e8bcd3f6ce96f1f1fe2 Mon Sep 17 00:00:00 2001 From: eddiek Date: Wed, 25 Sep 2024 16:40:24 +0300 Subject: [PATCH 01/12] GitHub repository sync --- .github/workflows/code-analysis.yaml | 10 + .gitignore | 140 + README.md | 22 + aws/images/launch.png | Bin 0 -> 2941 bytes aws/images/step1_aws.png | Bin 0 -> 29773 bytes aws/images/step2_aws.png | Bin 0 -> 77305 bytes aws/templates/README.md | 35 + aws/templates/asg/README.md | 22 + aws/templates/asg/autoscale.yaml | 607 +++ aws/templates/cluster/README.md | 26 + aws/templates/cluster/cluster-master.yaml | 510 +++ aws/templates/cluster/cluster.yaml | 736 ++++ aws/templates/cross-az-cluster/README.md | 26 + .../cross-az-cluster-master.yaml | 513 +++ .../cross-az-cluster/cross-az-cluster.yaml | 755 ++++ aws/templates/general/README.md | 29 + aws/templates/general/amis.yaml | 915 +++++ aws/templates/general/cme-iam-role.yaml | 159 + aws/templates/geo-cluster/README.md | 26 + .../geo-cluster/geo-cluster-master.yaml | 518 +++ aws/templates/geo-cluster/geo-cluster.yaml | 708 ++++ aws/templates/gwlb-asg/README.md | 58 + aws/templates/gwlb-asg/gwlb-master.yaml | 721 ++++ aws/templates/gwlb-asg/gwlb.yaml | 720 ++++ aws/templates/gwlb-asg/qs-gwlb-master.yaml | 947 +++++ aws/templates/gwlb-asg/qs-gwlb.yaml | 915 +++++ aws/templates/gwlb-asg/tgw-gwlb-master.yaml | 862 +++++ aws/templates/gwlb-asg/tgw-gwlb.yaml | 1206 ++++++ aws/templates/management/README.md | 22 + aws/templates/management/management.yaml | 569 +++ aws/templates/mds/README.md | 21 + aws/templates/mds/mds.yaml | 510 +++ aws/templates/single-gw/README.md | 25 + aws/templates/single-gw/gateway-master.yaml | 489 +++ aws/templates/single-gw/gateway.yaml | 587 +++ aws/templates/standalone/README.md | 26 + .../standalone/standalone-master.yaml | 434 +++ aws/templates/standalone/standalone.yaml | 521 +++ aws/templates/tgw-asg/README.md | 26 + aws/templates/tgw-asg/tgw-asg-master.yaml | 688 ++++ aws/templates/tgw-asg/tgw-asg.yaml | 679 ++++ aws/templates/tgw-cross-az-cluster/README.md | 26 + .../tgw-cross-az-cluster-master.yaml | 523 +++ .../tgw-cross-az-cluster.yaml | 519 +++ aws/templates/tgw-ha/README.md | 26 + aws/templates/tgw-ha/tgw-ha-master.yaml | 525 +++ aws/templates/tgw-ha/tgw-ha.yaml | 522 +++ azure/misc/azure_ha_test.py | 424 +++ azure/misc/nva_bgp_config.conf | 38 + azure/templates/README.MD | 69 + .../README.md | 22 + .../createUiDefinition.json | 1516 ++++++++ .../mainTemplate.json | 1169 ++++++ azure/templates/marketplace-ha/README.md | 21 + .../marketplace-ha/createUiDefinition.json | 1650 +++++++++ .../marketplace-ha/mainTemplate.json | 1453 ++++++++ .../marketplace-management/README.md | 21 + .../createUiDefinition.json | 702 ++++ .../marketplace-management/mainTemplate.json | 920 +++++ azure/templates/marketplace-mds/README.md | 21 + .../marketplace-mds/createUiDefinition.json | 637 ++++ .../marketplace-mds/mainTemplate.json | 903 +++++ .../createUiDefinition.json | 338 ++ .../marketplace-single-waap/mainTemplate.json | 567 +++ azure/templates/marketplace-single/README.md | 22 + .../createUiDefinition.json | 1353 +++++++ .../marketplace-single/mainTemplate.json | 942 +++++ .../createUiDefinition.json | 513 +++ .../marketplace-stack-ha/mainTemplate.json | 689 ++++ .../createUiDefinition.json | 306 ++ .../mainTemplate.json | 465 +++ .../createUiDefinition.json | 513 +++ .../mainTemplate.json | 552 +++ .../createUiDefinition.json | 795 ++++ .../marketplace-vmss-waap/mainTemplate.json | 1039 ++++++ azure/templates/marketplace-vmss/README.md | 23 + .../marketplace-vmss/createUiDefinition.json | 1752 +++++++++ .../marketplace-vmss/mainTemplate.json | 1323 +++++++ .../CreateUIDefinition.MultiVm.json | 1 + .../nestedtemplates/azure-func-sami.json | 240 ++ .../existing-nsg-RoleAssignment.json | 48 + .../gateway-load-balancers.json | 153 + .../nestedtemplates/load-balancers-waap.json | 285 ++ .../nestedtemplates/load-balancers.json | 259 ++ .../storageAccount-existing.json | 30 + .../nestedtemplates/storageAccount-new.json | 42 + .../vnet-1-subnet-existing.json | 87 + .../nestedtemplates/vnet-1-subnet-new.json | 167 + .../vnet-2-subnet-ha-existing.json | 87 + .../nestedtemplates/vnet-2-subnet-ha-new.json | 200 + .../vnet-2-subnet-ha2-existing.json | 76 + .../vnet-2-subnet-ha2-new.json | 192 + .../vnet-4-subnet-existing.json | 137 + .../nestedtemplates/vnet-4-subnet-new.json | 322 ++ .../nestedtemplates/vnet-existing-no-rt.json | 81 + .../vnet-existing-stack-ha.json | 93 + .../vnet-existing-stack-mgmt.json | 67 + .../nestedtemplates/vnet-existing-stack.json | 95 + .../nestedtemplates/vnet-existing.json | 76 + .../nestedtemplates/vnet-new-no-rt.json | 107 + .../nestedtemplates/vnet-new-stack-ha.json | 141 + .../nestedtemplates/vnet-new-stack-mgmt.json | 87 + .../nestedtemplates/vnet-new-stack.json | 165 + azure/templates/nestedtemplates/vnet-new.json | 196 + azure/templates/single-ipv6/README.md | 10 + azure/templates/single-ipv6/mainTemplate.json | 1038 ++++++ azure/templates/vmss-ipv6/README.md | 9 + azure/templates/vmss-ipv6/mainTemplate.json | 1367 +++++++ azure/templates/vwan-managed-app/README.md | 85 + .../vwan-managed-app/mainTemplate.json | 284 ++ common/central_license_debug_collector.sh | 118 + .../CME_API.postman_collection | 3255 +++++++++++++++++ common/cme_api_postman/README.md | 19 + common/cme_xff_inject.sh | 7 + common/custom-management-script.py | 128 + common/custom_scripts/README.md | 21 + common/custom_scripts/password_script.sh | 10 + common/maintenance_mode/README.md | 19 + common/maintenance_mode/grub.conf | 11 + common/simulate_cpu_load.sh | 11 + common/static_route_config.sh | 13 + common/vwan_postman/README.md | 66 + .../vwan_postman/vwan.postman_collection.json | 1307 +++++++ contrib/README.md | 2 + .../templates/ha-public-ip-prefix/README.MD | 51 + .../ha-publicipprefix-parameters.json | 106 + .../ha-publicipprefix.json | 1033 ++++++ .../ha-redeploy-single-member/README.MD | 41 + .../ha-redeploy-single-member.json | 561 +++ .../mainTemplate.json | 1055 ++++++ .../vmss-publicipprefixinstances/README.MD | 47 + .../vmss-publicipprefix-instances.json | 891 +++++ .../vmss-publicipprefixinstanceselb/README.MD | 51 + .../mainTemplate.json | 922 +++++ .../nestedtemplates/load-balancers.json | 283 ++ .../vnet-2-subnet-ha-existing.json | 124 + contrib/cme/examples/README.md | 2 + contrib/terraform-azure-gwlb/README.md | 70 + contrib/terraform-azure-gwlb/app-main.tf | 382 ++ contrib/terraform-azure-gwlb/app-variables.tf | 26 + .../terraform-azure-gwlb/cpcluster-main.tf | 461 +++ .../cpcluster-variables.tf | 201 + contrib/terraform-azure-gwlb/cpmgmt-main.tf | 189 + .../terraform-azure-gwlb/cpmgmt-variables.tf | 28 + contrib/terraform-azure-gwlb/customdata.sh | 17 + .../deployment-variables.tf | 29 + .../files/azure-gwlb-template.json | 849 +++++ contrib/terraform-azure-gwlb/gwlb-main.tf | 156 + .../terraform-azure-gwlb/gwlb-variables.tf | 25 + .../modules/common/main.tf | 5 + .../modules/common/outputs.tf | 127 + .../modules/common/variables.tf | 293 ++ .../modules/common/versions.tf | 3 + .../modules/network-security-group/main.tf | 23 + .../modules/network-security-group/output.tf | 7 + .../network-security-group/variables.tf | 43 + .../network-security-group/versions.tf | 3 + .../terraform-azure-gwlb/modules/vnet/main.tf | 80 + .../modules/vnet/outputs.tf | 27 + .../modules/vnet/variables.tf | 63 + .../modules/vnet/versions.tf | 3 + contrib/terraform-azure-gwlb/net-main.tf | 261 ++ contrib/terraform-azure-gwlb/net-variables.tf | 26 + contrib/terraform-azure-gwlb/terraform.tfvars | 31 + contrib/terraform-azure-gwlb/tfc-project.tf | 20 + .../zimages/azure-gwlb-design.jpg | Bin 0 -> 329545 bytes .../azure/vmss-new-vnet-with-peer/README.md | 152 + .../vmss-new-vnet-with-peer/azure_public_key | 0 .../vmss-new-vnet-with-peer/cloud-init.sh | 12 + .../images/Topology-2.JPG | Bin 0 -> 51157 bytes .../azure/vmss-new-vnet-with-peer/main.tf | 364 ++ .../vmss-new-vnet-with-peer/terraform.tfvars | 29 + .../vmss-new-vnet-with-peer/variables.tf | 274 ++ deprecated/README.md | 2 + deprecated/aws/templates/README.md | 13 + deprecated/aws/templates/asg-r8030/README.md | 22 + .../aws/templates/asg-r8030/autoscale.json | 1188 ++++++ .../aws/templates/cluster-r8030/README.md | 25 + .../cluster-r8030/cluster-into-vpc.json | 1313 +++++++ .../aws/templates/cluster-r8030/cluster.json | 515 +++ .../aws/templates/gateway-r7730/README.md | 21 + .../gateway-2-nic-existing-vpc.json | 486 +++ .../aws/templates/gateways-r7730/README.md | 21 + .../gateways-r7730/inter-az-cluster.json | 505 +++ .../aws/templates/instance-r7730/README.md | 21 + .../aws/templates/instance-r7730/gwinvpc.json | 269 ++ .../aws/templates/management-r7730/README.md | 21 + .../management-r7730/r7730-management.json | 656 ++++ .../aws/templates/management-r80/README.md | 21 + .../aws/templates/management-r80/r80.json | 725 ++++ .../aws/templates/management-r8030/README.md | 22 + .../management-r8030/management.json | 1323 +++++++ deprecated/aws/templates/mds-r8030/README.md | 23 + deprecated/aws/templates/mds-r8030/mds.json | 1270 +++++++ .../aws/templates/single-gw-r8030/README.md | 25 + .../single-gw-r8030/gateway-into-vpc.json | 1000 +++++ .../templates/single-gw-r8030/gateway.json | 543 +++ .../aws/templates/tgw-asg-r8030/README.md | 25 + .../checkpoint-tgw-asg-master.yaml | 471 +++ .../tgw-asg-r8030/checkpoint-tgw-asg.yaml | 488 +++ .../aws/templates/transit-vpc-r8030/README.md | 34 + .../checkpoint-transit-master.yaml | 354 ++ .../transit-vpc-r8030/checkpoint-transit.yaml | 361 ++ .../transit-vpc-r8030/transit-master.yaml | 241 ++ .../templates/transit-vpc-r8030/transit.yaml | 230 ++ .../azure/misc/azure_ha_test_python2.py | 414 +++ .../templates/R7730/cluster-r7730/README.MD | 13 + .../cluster-r7730/createUiDefinition.json | 348 ++ .../R7730/cluster-r7730/mainTemplate.json | 684 ++++ .../R7730/cluster-r7730/vnet-existing.json | 93 + .../R7730/cluster-r7730/vnet-new.json | 172 + .../templates/R7730/mgmt-r7730/README.MD | 13 + .../R7730/mgmt-r7730/createUiDefinition.json | 281 ++ .../R7730/mgmt-r7730/mainTemplate.json | 553 +++ .../mgmt-r7730/vnet-1-subnet-existing.json | 73 + .../R7730/mgmt-r7730/vnet-1-subnet-new.json | 96 + .../templates/R7730/single-r7730/README.MD | 13 + .../single-r7730/createUiDefinition.json | 379 ++ .../R7730/single-r7730/mainTemplate.json | 524 +++ .../R7730/single-r7730/vnet-existing.json | 99 + .../R7730/single-r7730/vnet-new.json | 187 + .../templates/R7730/vmss-r7730/README.MD | 13 + .../R7730/vmss-r7730/createUiDefinition.json | 385 ++ .../R7730/vmss-r7730/mainTemplate.json | 678 ++++ .../vmss-r7730/vnet-1-subnet-existing.json | 67 + .../R7730/vmss-r7730/vnet-1-subnet-new.json | 87 + .../R8010-R8020/cluster-r8010/README.MD | 13 + .../cluster-r8010/createUiDefinition.json | 380 ++ .../cluster-r8010/mainTemplate.json | 731 ++++ .../nestedtemplates/vnet-existing.json | 99 + .../nestedtemplates/vnet-new.json | 187 + .../R8010-R8020/ha-r8010-r8020/README.MD | 13 + .../ha-r8010-r8020/createUiDefinition.json | 1284 +++++++ .../ha-r8010-r8020/mainTemplate.json | 960 +++++ .../vnet-2-subnet-ha2-existing.json | 93 + .../vnet-2-subnet-ha2-new.json | 217 ++ .../R8010-R8020/mgmt-r8010-r8020/README.MD | 13 + .../mgmt-r8010-r8020/createUiDefinition.json | 409 +++ .../mgmt-r8010-r8020/mainTemplate.json | 633 ++++ .../vnet-1-subnet-existing.json | 73 + .../nestedtemplates/vnet-1-subnet-new.json | 96 + .../R8010-R8020/single-r8010-r8020/README.MD | 13 + .../createUiDefinition.json | 754 ++++ .../single-r8010-r8020/mainTemplate.json | 599 +++ .../nestedtemplates/vnet-existing.json | 99 + .../nestedtemplates/vnet-new.json | 187 + .../R8010-R8020/vmss-r8010-r8020/README.MD | 13 + .../vmss-r8010-r8020/createUiDefinition.json | 1056 ++++++ .../vmss-r8010-r8020/mainTemplate.json | 874 +++++ .../nestedtemplates/load-balancers.json | 279 ++ .../vnet-2-subnet-ha-existing.json | 124 + .../nestedtemplates/vnet-2-subnet-ha-new.json | 216 ++ .../azure/templates/R8030/ha-r8030/README.MD | 13 + .../R8030/ha-r8030/createUiDefinition.json | 730 ++++ .../R8030/ha-r8030/mainTemplate.json | 1029 ++++++ .../vnet-2-subnet-ha2-existing.json | 30 + .../vnet-2-subnet-ha2-new.json | 178 + .../azure/templates/R8030/mds-r8030/README.MD | 13 + .../R8030/mds-r8030/createUiDefinition.json | 377 ++ .../R8030/mds-r8030/mainTemplate.json | 625 ++++ .../vnet-1-subnet-existing.json | 78 + .../nestedtemplates/vnet-1-subnet-new.json | 157 + .../templates/R8030/mgmt-r8030/README.MD | 13 + .../R8030/mgmt-r8030/createUiDefinition.json | 387 ++ .../R8030/mgmt-r8030/mainTemplate.json | 629 ++++ .../vnet-1-subnet-existing.json | 78 + .../nestedtemplates/vnet-1-subnet-new.json | 157 + .../templates/R8030/single-r8030/README.MD | 13 + .../single-r8030/createUiDefinition.json | 603 +++ .../R8030/single-r8030/mainTemplate.json | 638 ++++ .../nestedtemplates/vnet-existing.json | 30 + .../nestedtemplates/vnet-new.json | 151 + .../templates/R8030/vmss-r8030/README.MD | 13 + .../R8030/vmss-r8030/createUiDefinition.json | 1106 ++++++ .../R8030/vmss-r8030/mainTemplate.json | 1026 ++++++ .../nestedtemplates/load-balancers.json | 252 ++ .../vnet-2-subnet-ha-existing.json | 78 + .../nestedtemplates/vnet-2-subnet-ha-new.json | 188 + .../R8040-R81/ha-r8040-r81/README.md | 21 + .../ha-r8040-r81/createUiDefinition.json | 1602 ++++++++ .../R8040-R81/ha-r8040-r81/mainTemplate.json | 1294 +++++++ .../R8040-R81/mds-r8040-r81/README.md | 21 + .../mds-r8040-r81/createUiDefinition.json | 589 +++ .../R8040-R81/mds-r8040-r81/mainTemplate.json | 746 ++++ .../R8040-R81/mgmt-r840-r81/README.md | 21 + .../mgmt-r840-r81/createUiDefinition.json | 654 ++++ .../R8040-R81/mgmt-r840-r81/mainTemplate.json | 751 ++++ .../R8040-R81/single-ipv6-r8040-r81/README.md | 10 + .../single-ipv6-r8040-r81/mainTemplate.json | 887 +++++ .../R8040-R81/single-r8040-r81/README.md | 22 + .../single-r8040-r81/createUiDefinition.json | 1305 +++++++ .../single-r8040-r81/mainTemplate.json | 779 ++++ .../R8040-R81/vmss-ipv6-r8040-r81/README.md | 9 + .../vmss-ipv6-r8040-r81/mainTemplate.json | 1209 ++++++ .../R8040-R81/vmss-r8040-r81/README.md | 23 + .../vmss-r8040-r81/createUiDefinition.json | 1732 +++++++++ .../vmss-r8040-r81/mainTemplate.json | 1156 ++++++ deprecated/azure/templates/README.MD | 5 + .../stack-ha/createUiDefinition.json | 438 +++ .../stack-R8030/stack-ha/mainTemplate.json | 703 ++++ .../stack-mgmt/createUiDefinition.json | 371 ++ .../stack-R8030/stack-mgmt/mainTemplate.json | 472 +++ .../stack-single/createUiDefinition.json | 441 +++ .../stack-single/mainTemplate.json | 556 +++ .../createUiDefinition.json | 763 ++++ .../stack-ha-r8040-r81/mainTemplate.json | 699 ++++ .../createUiDefinition.json | 366 ++ .../mainTemplate.json | 472 +++ .../createUiDefinition.json | 763 ++++ .../stack-single-r8040-r81/mainTemplate.json | 562 +++ .../R80.30/autoscale-byol-R80.30/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--byol.py | 621 ++++ .../check-point-autoscale--byol.py.schema | 202 + .../R80.30/autoscale-byol-R80.30/common.py | 262 ++ .../R80.30/autoscale-byol-R80.30/config.yaml | 50 + .../R80.30/autoscale-byol-R80.30/default.py | 134 + .../R80.30/autoscale-byol-R80.30/images.py | 10 + .../R80.30/autoscale-byol-R80.30/password.py | 135 + .../R80.30/autoscale-payg-R80.30/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--payg.py | 621 ++++ .../check-point-autoscale--payg.py.schema | 202 + .../R80.30/autoscale-payg-R80.30/common.py | 262 ++ .../R80.30/autoscale-payg-R80.30/config.yaml | 50 + .../R80.30/autoscale-payg-R80.30/default.py | 134 + .../R80.30/autoscale-payg-R80.30/images.py | 10 + .../R80.30/autoscale-payg-R80.30/password.py | 135 + .../gcp/R80.30/ha-byol-R80.30/README.md | 178 + .../c2d_deployment_configuration.json | 7 + .../check-point-cluster--byol.py | 713 ++++ .../check-point-cluster--byol.py.schema | 384 ++ .../gcp/R80.30/ha-byol-R80.30/common.py | 262 ++ .../gcp/R80.30/ha-byol-R80.30/config.yaml | 69 + .../gcp/R80.30/ha-byol-R80.30/default.py | 134 + .../gcp/R80.30/ha-byol-R80.30/images.py | 10 + .../gcp/R80.30/ha-byol-R80.30/password.py | 135 + .../gcp/R80.30/ha-payg-R80.30/README.md | 178 + .../c2d_deployment_configuration.json | 7 + .../check-point-cluster--payg.py | 713 ++++ .../check-point-cluster--payg.py.schema | 384 ++ .../gcp/R80.30/ha-payg-R80.30/common.py | 262 ++ .../gcp/R80.30/ha-payg-R80.30/config.yaml | 69 + .../gcp/R80.30/ha-payg-R80.30/default.py | 134 + .../gcp/R80.30/ha-payg-R80.30/images.py | 10 + .../gcp/R80.30/ha-payg-R80.30/password.py | 135 + .../gcp/R80.30/single-byol-R80.30/README.md | 131 + .../c2d_deployment_configuration.json | 7 + .../check-point-vsec--byol.py | 729 ++++ .../check-point-vsec--byol.py.schema | 343 ++ .../gcp/R80.30/single-byol-R80.30/common.py | 262 ++ .../gcp/R80.30/single-byol-R80.30/config.yaml | 48 + .../gcp/R80.30/single-byol-R80.30/default.py | 134 + .../gcp/R80.30/single-byol-R80.30/images.py | 10 + .../gcp/R80.30/single-byol-R80.30/password.py | 135 + .../gcp/R80.30/single-payg-R80.30/README.md | 131 + .../c2d_deployment_configuration.json | 7 + .../check-point-vsec--payg.py | 729 ++++ .../check-point-vsec--payg.py.schema | 343 ++ .../gcp/R80.30/single-payg-R80.30/common.py | 262 ++ .../gcp/R80.30/single-payg-R80.30/config.yaml | 46 + .../gcp/R80.30/single-payg-R80.30/default.py | 134 + .../gcp/R80.30/single-payg-R80.30/images.py | 10 + .../gcp/R80.30/single-payg-R80.30/password.py | 135 + .../gcp/R80.40-R81/autoscale-byol/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--byol.py | 381 ++ .../check-point-autoscale--byol.py.schema | 215 ++ .../gcp/R80.40-R81/autoscale-byol/common.py | 262 ++ .../gcp/R80.40-R81/autoscale-byol/config.yaml | 50 + .../gcp/R80.40-R81/autoscale-byol/default.py | 134 + .../gcp/R80.40-R81/autoscale-byol/images.py | 34 + .../gcp/R80.40-R81/autoscale-byol/password.py | 135 + .../gcp/R80.40-R81/autoscale-payg/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--payg.py | 381 ++ .../check-point-autoscale--payg.py.schema | 215 ++ .../gcp/R80.40-R81/autoscale-payg/common.py | 262 ++ .../gcp/R80.40-R81/autoscale-payg/config.yaml | 50 + .../gcp/R80.40-R81/autoscale-payg/default.py | 134 + .../gcp/R80.40-R81/autoscale-payg/images.py | 34 + .../gcp/R80.40-R81/autoscale-payg/password.py | 135 + deprecated/gcp/R80.40-R81/ha-byol/README.md | 187 + .../ha-byol/c2d_deployment_configuration.json | 7 + .../ha-byol/check-point-cluster--byol.py | 494 +++ .../check-point-cluster--byol.py.schema | 400 ++ deprecated/gcp/R80.40-R81/ha-byol/common.py | 262 ++ deprecated/gcp/R80.40-R81/ha-byol/config.yaml | 73 + deprecated/gcp/R80.40-R81/ha-byol/default.py | 134 + deprecated/gcp/R80.40-R81/ha-byol/images.py | 34 + deprecated/gcp/R80.40-R81/ha-byol/password.py | 135 + deprecated/gcp/R80.40-R81/ha-payg/README.md | 187 + .../ha-payg/c2d_deployment_configuration.json | 7 + .../ha-payg/check-point-cluster--payg.py | 494 +++ .../check-point-cluster--payg.py.schema | 400 ++ deprecated/gcp/R80.40-R81/ha-payg/common.py | 262 ++ deprecated/gcp/R80.40-R81/ha-payg/config.yaml | 73 + deprecated/gcp/R80.40-R81/ha-payg/default.py | 134 + deprecated/gcp/R80.40-R81/ha-payg/images.py | 34 + deprecated/gcp/R80.40-R81/ha-payg/password.py | 135 + .../gcp/R80.40-R81/single-byol/README.md | 134 + .../c2d_deployment_configuration.json | 7 + .../single-byol/check-point-vsec--byol.py | 479 +++ .../check-point-vsec--byol.py.schema | 363 ++ .../gcp/R80.40-R81/single-byol/common.py | 262 ++ .../gcp/R80.40-R81/single-byol/config.yaml | 50 + .../gcp/R80.40-R81/single-byol/default.py | 134 + .../gcp/R80.40-R81/single-byol/images.py | 34 + .../gcp/R80.40-R81/single-byol/password.py | 135 + .../gcp/R80.40-R81/single-payg/README.md | 133 + .../c2d_deployment_configuration.json | 7 + .../single-payg/check-point-vsec--payg.py | 474 +++ .../check-point-vsec--payg.py.schema | 359 ++ .../gcp/R80.40-R81/single-payg/common.py | 262 ++ .../gcp/R80.40-R81/single-payg/config.yaml | 48 + .../gcp/R80.40-R81/single-payg/default.py | 134 + .../gcp/R80.40-R81/single-payg/images.py | 34 + .../gcp/R80.40-R81/single-payg/password.py | 135 + deprecated/gcp/README.MD | 5 + .../high-availability-existing-vnet/README.md | 239 ++ .../azure_public_key | 0 .../cloud-init.sh | 22 + .../high-availability-existing-vnet/main.tf | 531 +++ .../terraform.tfvars | 38 + .../variables.tf | 339 ++ .../versions.tf | 12 + .../high-availability-new-vnet/README.md | 242 ++ .../azure_public_key | 0 .../high-availability-new-vnet/cloud-init.sh | 22 + .../high-availability-new-vnet/main.tf | 550 +++ .../terraform.tfvars | 36 + .../high-availability-new-vnet/variables.tf | 328 ++ .../high-availability-new-vnet/versions.tf | 12 + .../management-existing-vnet/README.md | 189 + .../management-existing-vnet/azure_public_key | 0 .../management-existing-vnet/cloud-init.sh | 16 + .../management-existing-vnet/main.tf | 312 ++ .../management-existing-vnet/terraform.tfvars | 30 + .../management-existing-vnet/variables.tf | 251 ++ .../management-existing-vnet/versions.tf | 12 + .../R8040-R81/management-new-vnet/README.md | 187 + .../management-new-vnet/azure_public_key | 0 .../management-new-vnet/cloud-init.sh | 16 + .../R8040-R81/management-new-vnet/main.tf | 316 ++ .../management-new-vnet/terraform.tfvars | 29 + .../management-new-vnet/variables.tf | 249 ++ .../R8040-R81/management-new-vnet/versions.tf | 12 + .../R8040-R81/mds-existing-vnet/README.md | 195 + .../mds-existing-vnet/azure_public_key | 0 .../R8040-R81/mds-existing-vnet/cloud-init.sh | 20 + .../azure/R8040-R81/mds-existing-vnet/main.tf | 316 ++ .../mds-existing-vnet/terraform.tfvars | 35 + .../R8040-R81/mds-existing-vnet/variables.tf | 280 ++ .../R8040-R81/mds-existing-vnet/versions.tf | 12 + .../azure/R8040-R81/mds-new-vnet/README.md | 188 + .../R8040-R81/mds-new-vnet/azure_public_key | 0 .../R8040-R81/mds-new-vnet/cloud-init.sh | 20 + .../azure/R8040-R81/mds-new-vnet/main.tf | 321 ++ .../R8040-R81/mds-new-vnet/terraform.tfvars | 34 + .../azure/R8040-R81/mds-new-vnet/variables.tf | 278 ++ .../azure/R8040-R81/mds-new-vnet/versions.tf | 12 + .../R8040-R81/modules/add-routing-intent.py | 29 + .../azure/R8040-R81/modules/common/main.tf | 5 + .../azure/R8040-R81/modules/common/outputs.tf | 130 + .../R8040-R81/modules/common/variables.tf | 369 ++ .../R8040-R81/modules/common/versions.tf | 3 + .../modules/network-security-group/main.tf | 23 + .../modules/network-security-group/output.tf | 7 + .../network-security-group/variables.tf | 43 + .../network-security-group/versions.tf | 3 + .../azure/R8040-R81/modules/vnet/main.tf | 80 + .../azure/R8040-R81/modules/vnet/outputs.tf | 27 + .../azure/R8040-R81/modules/vnet/variables.tf | 63 + .../azure/R8040-R81/modules/vnet/versions.tf | 3 + .../R8040-R81/nva-into-existing-hub/README.md | 172 + .../R8040-R81/nva-into-existing-hub/main.tf | 195 + .../nva-into-existing-hub/terraform.tfvars | 31 + .../nva-into-existing-hub/variables.tf | 198 + .../nva-into-existing-hub/versions.tf | 17 + .../R8040-R81/nva-into-new-vwan/README.md | 182 + .../azure/R8040-R81/nva-into-new-vwan/main.tf | 202 + .../nva-into-new-vwan/terraform.tfvars | 32 + .../R8040-R81/nva-into-new-vwan/variables.tf | 209 ++ .../R8040-R81/nva-into-new-vwan/versions.tf | 17 + .../single-gateway-existing-vnet/README.md | 200 + .../azure_public_key | 0 .../cloud-init.sh | 18 + .../single-gateway-existing-vnet/main.tf | 257 ++ .../terraform.tfvars | 35 + .../single-gateway-existing-vnet/variables.tf | 281 ++ .../single-gateway-existing-vnet/versions.tf | 12 + .../single-gateway-new-vnet/README.md | 197 + .../single-gateway-new-vnet/azure_public_key | 0 .../single-gateway-new-vnet/cloud-init.sh | 18 + .../R8040-R81/single-gateway-new-vnet/main.tf | 256 ++ .../single-gateway-new-vnet/terraform.tfvars | 33 + .../single-gateway-new-vnet/variables.tf | 280 ++ .../single-gateway-new-vnet/versions.tf | 12 + .../R8040-R81/vmss-existing-vnet/README.md | 247 ++ .../vmss-existing-vnet/azure_public_key | 0 .../vmss-existing-vnet/cloud-init.sh | 17 + .../R8040-R81/vmss-existing-vnet/main.tf | 446 +++ .../vmss-existing-vnet/terraform.tfvars | 43 + .../R8040-R81/vmss-existing-vnet/variables.tf | 404 ++ .../R8040-R81/vmss-existing-vnet/versions.tf | 14 + .../azure/R8040-R81/vmss-new-vnet/README.md | 247 ++ .../R8040-R81/vmss-new-vnet/azure_public_key | 0 .../R8040-R81/vmss-new-vnet/cloud-init.sh | 17 + .../azure/R8040-R81/vmss-new-vnet/main.tf | 442 +++ .../R8040-R81/vmss-new-vnet/terraform.tfvars | 42 + .../R8040-R81/vmss-new-vnet/variables.tf | 393 ++ .../azure/R8040-R81/vmss-new-vnet/versions.tf | 14 + deprecated/terraform/azure/README.md | 12 + .../autoscale-into-existing-vpc/README.md | 233 ++ .../autoscale-into-existing-vpc/locals.tf | 63 + .../autoscale-into-existing-vpc/main.tf | 197 + .../autoscale-into-existing-vpc/output.tf | 33 + .../terraform.tfvars | 36 + .../autoscale-into-existing-vpc/variables.tf | 157 + .../autoscale-into-new-vpc/README.md | 241 ++ .../autoscale-into-new-vpc/locals.tf | 48 + .../R8040-R81/autoscale-into-new-vpc/main.tf | 73 + .../autoscale-into-new-vpc/output.tf | 46 + .../autoscale-into-new-vpc/terraform.tfvars | 34 + .../autoscale-into-new-vpc/variables.tf | 150 + .../R8040-R81/common/cluster-member/main.tf | 130 + .../R8040-R81/common/cluster-member/output.tf | 6 + .../common/cluster-member/variables.tf | 174 + .../R8040-R81/common/firewall-rule/main.tf | 10 + .../R8040-R81/common/firewall-rule/output.tf | 3 + .../common/firewall-rule/variables.tf | 17 + .../gcp/R8040-R81/common/members-a-b/main.tf | 85 + .../R8040-R81/common/members-a-b/output.tf | 13 + .../R8040-R81/common/members-a-b/variables.tf | 175 + .../common/network-and-subnet/main.tf | 21 + .../common/network-and-subnet/output.tf | 18 + .../common/network-and-subnet/variables.tf | 27 + .../gcp/R8040-R81/common/startup-script.sh | 3 + .../gcp/R8040-R81/high-availability/README.md | 317 ++ .../gcp/R8040-R81/high-availability/locals.tf | 106 + .../gcp/R8040-R81/high-availability/main.tf | 250 ++ .../gcp/R8040-R81/high-availability/output.tf | 117 + .../high-availability/terraform.tfvars | 53 + .../R8040-R81/high-availability/variables.tf | 302 ++ .../single-into-existing-vpc/README.md | 275 ++ .../single-into-existing-vpc/locals.tf | 55 + .../single-into-existing-vpc/main.tf | 218 ++ .../single-into-existing-vpc/output.tf | 18 + .../single-into-existing-vpc/terraform.tfvars | 46 + .../single-into-existing-vpc/variables.tf | 254 ++ .../R8040-R81/single-into-new-vpc/README.md | 270 ++ .../gcp/R8040-R81/single-into-new-vpc/main.tf | 90 + .../R8040-R81/single-into-new-vpc/output.tf | 30 + .../single-into-new-vpc/terraform.tfvars | 45 + .../single-into-new-vpc/variables.tf | 256 ++ gcp/deployment-packages/README.MD | 5 + .../autoscale-byol/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--byol.py | 379 ++ .../check-point-autoscale--byol.py.schema | 213 ++ .../autoscale-byol/common.py | 262 ++ .../autoscale-byol/config.yaml | 50 + .../autoscale-byol/default.py | 134 + .../autoscale-byol/images.py | 34 + .../autoscale-byol/password.py | 135 + .../autoscale-payg/README.md | 126 + .../c2d_deployment_configuration.json | 7 + .../check-point-autoscale--payg.py | 379 ++ .../check-point-autoscale--payg.py.schema | 213 ++ .../autoscale-payg/common.py | 262 ++ .../autoscale-payg/config.yaml | 50 + .../autoscale-payg/default.py | 134 + .../autoscale-payg/images.py | 34 + .../autoscale-payg/password.py | 135 + gcp/deployment-packages/ha-byol/README.md | 187 + .../ha-byol/c2d_deployment_configuration.json | 7 + .../ha-byol/check-point-cluster--byol.py | 492 +++ .../check-point-cluster--byol.py.schema | 398 ++ gcp/deployment-packages/ha-byol/common.py | 262 ++ gcp/deployment-packages/ha-byol/config.yaml | 73 + gcp/deployment-packages/ha-byol/default.py | 134 + gcp/deployment-packages/ha-byol/images.py | 34 + gcp/deployment-packages/ha-byol/password.py | 135 + gcp/deployment-packages/ha-payg/README.md | 187 + .../ha-payg/c2d_deployment_configuration.json | 7 + .../ha-payg/check-point-cluster--payg.py | 492 +++ .../check-point-cluster--payg.py.schema | 398 ++ gcp/deployment-packages/ha-payg/common.py | 262 ++ gcp/deployment-packages/ha-payg/config.yaml | 73 + gcp/deployment-packages/ha-payg/default.py | 134 + gcp/deployment-packages/ha-payg/images.py | 34 + gcp/deployment-packages/ha-payg/password.py | 135 + gcp/deployment-packages/single-byol/README.md | 134 + .../c2d_deployment_configuration.json | 7 + .../single-byol/check-point-vsec--byol.py | 475 +++ .../check-point-vsec--byol.py.schema | 355 ++ gcp/deployment-packages/single-byol/common.py | 262 ++ .../single-byol/config.yaml | 50 + .../single-byol/default.py | 134 + gcp/deployment-packages/single-byol/images.py | 34 + .../single-byol/password.py | 135 + gcp/deployment-packages/single-payg/README.md | 133 + .../c2d_deployment_configuration.json | 7 + .../single-payg/check-point-vsec--payg.py | 475 +++ .../check-point-vsec--payg.py.schema | 353 ++ gcp/deployment-packages/single-payg/common.py | 262 ++ .../single-payg/config.yaml | 48 + .../single-payg/default.py | 134 + gcp/deployment-packages/single-payg/images.py | 34 + .../single-payg/password.py | 135 + terraform/.gitattributes | 1 + terraform/.gitignore | 14 + terraform/LICENSE | 199 + terraform/alicloud/cluster-master/README.md | 174 + terraform/alicloud/cluster-master/locals.tf | 28 + terraform/alicloud/cluster-master/main.tf | 53 + terraform/alicloud/cluster-master/output.tf | 48 + .../alicloud/cluster-master/terraform.tfvars | 47 + .../alicloud/cluster-master/variables.tf | 150 + terraform/alicloud/cluster-master/versions.tf | 9 + terraform/alicloud/cluster/README.md | 158 + .../cluster/cluster_member_a_userdata.yaml | 4 + .../cluster/cluster_member_b_userdata.yaml | 4 + terraform/alicloud/cluster/locals.tf | 46 + terraform/alicloud/cluster/main.tf | 178 + terraform/alicloud/cluster/output.tf | 33 + terraform/alicloud/cluster/terraform.tfvars | 40 + terraform/alicloud/cluster/variables.tf | 144 + terraform/alicloud/cluster/versions.tf | 9 + terraform/alicloud/gateway-master/README.md | 155 + terraform/alicloud/gateway-master/locals.tf | 17 + terraform/alicloud/gateway-master/main.tf | 49 + terraform/alicloud/gateway-master/output.tf | 33 + .../alicloud/gateway-master/terraform.tfvars | 42 + .../alicloud/gateway-master/variables.tf | 140 + terraform/alicloud/gateway-master/versions.tf | 9 + terraform/alicloud/gateway/README.md | 141 + terraform/alicloud/gateway/locals.tf | 23 + terraform/alicloud/gateway/main.tf | 70 + terraform/alicloud/gateway/output.tf | 21 + terraform/alicloud/gateway/terraform.tfvars | 37 + terraform/alicloud/gateway/variables.tf | 133 + terraform/alicloud/gateway/versions.tf | 9 + .../alicloud/management-master/README.md | 135 + .../alicloud/management-master/locals.tf | 20 + terraform/alicloud/management-master/main.tf | 40 + .../alicloud/management-master/output.tf | 25 + .../management-master/terraform.tfvars | 40 + .../alicloud/management-master/variables.tf | 137 + .../alicloud/management-master/versions.tf | 9 + terraform/alicloud/management/README.md | 128 + terraform/alicloud/management/locals.tf | 24 + terraform/alicloud/management/main.tf | 177 + .../management/management_userdata.yaml | 4 + terraform/alicloud/management/output.tf | 19 + .../alicloud/management/terraform.tfvars | 35 + terraform/alicloud/management/variables.tf | 128 + terraform/alicloud/management/versions.tf | 9 + .../modules/cluster-ram-role/locals.tf | 5 + .../alicloud/modules/cluster-ram-role/main.tf | 54 + .../modules/cluster-ram-role/output.tf | 9 + .../modules/cluster-ram-role/variables.tf | 5 + .../modules/cluster-ram-role/versions.tf | 9 + .../modules/common/elastic_ip/locals.tf | 12 + .../modules/common/elastic_ip/main.tf | 10 + .../modules/common/elastic_ip/output.tf | 7 + .../modules/common/elastic_ip/variables.tf | 22 + .../modules/common/elastic_ip/versions.tf | 9 + .../gateway_instance/gateway_userdata.yaml | 4 + .../modules/common/gateway_instance/locals.tf | 22 + .../modules/common/gateway_instance/main.tf | 28 + .../modules/common/gateway_instance/output.tf | 6 + .../common/gateway_instance/variables.tf | 100 + .../common/gateway_instance/versions.tf | 9 + .../modules/common/instance_type/main.tf | 28 + .../modules/common/instance_type/variables.tf | 20 + .../modules/common/instance_type/versions.tf | 3 + .../common/internal_default_route/locals.tf | 3 + .../common/internal_default_route/main.tf | 7 + .../common/internal_default_route/output.tf | 3 + .../internal_default_route/variables.tf | 9 + .../common/internal_default_route/versions.tf | 9 + .../modules/common/permissive_sg/main.tf | 27 + .../modules/common/permissive_sg/output.tf | 6 + .../modules/common/permissive_sg/variables.tf | 13 + .../modules/common/permissive_sg/versions.tf | 9 + .../modules/common/version_license/main.tf | 23 + .../common/version_license/variables.tf | 19 + .../common/version_license/versions.tf | 9 + terraform/alicloud/modules/images/images.yaml | 210 ++ terraform/alicloud/modules/images/main.tf | 20 + terraform/alicloud/modules/images/output.tf | 6 + .../alicloud/modules/images/variables.tf | 20 + terraform/alicloud/modules/images/versions.tf | 3 + terraform/alicloud/modules/vpc/locals.tf | 6 + terraform/alicloud/modules/vpc/main.tf | 38 + terraform/alicloud/modules/vpc/output.tf | 15 + terraform/alicloud/modules/vpc/variables.tf | 23 + terraform/alicloud/modules/vpc/versions.tf | 9 + terraform/aws/README.md | 13 + terraform/aws/autoscale-gwlb/README.md | 185 + .../aws/autoscale-gwlb/asg_userdata.yaml | 29 + terraform/aws/autoscale-gwlb/locals.tf | 56 + terraform/aws/autoscale-gwlb/main.tf | 202 + terraform/aws/autoscale-gwlb/output.tf | 41 + terraform/aws/autoscale-gwlb/terraform.tfvars | 42 + terraform/aws/autoscale-gwlb/variables.tf | 191 + terraform/aws/autoscale-gwlb/versions.tf | 15 + terraform/aws/autoscale/README.md | 199 + terraform/aws/autoscale/asg_userdata.yaml | 4 + terraform/aws/autoscale/locals.tf | 62 + terraform/aws/autoscale/main.tf | 248 ++ terraform/aws/autoscale/output.tf | 43 + terraform/aws/autoscale/terraform.tfvars | 45 + terraform/aws/autoscale/variables.tf | 190 + terraform/aws/autoscale/versions.tf | 15 + terraform/aws/cluster-master/README.md | 221 ++ terraform/aws/cluster-master/locals.tf | 52 + terraform/aws/cluster-master/main.tf | 64 + terraform/aws/cluster-master/output.tf | 24 + terraform/aws/cluster-master/terraform.tfvars | 47 + terraform/aws/cluster-master/variables.tf | 183 + terraform/aws/cluster-master/versions.tf | 12 + terraform/aws/cluster/README.md | 201 + .../cluster/cluster_member_a_userdata.yaml | 4 + .../cluster/cluster_member_b_userdata.yaml | 4 + terraform/aws/cluster/locals.tf | 69 + terraform/aws/cluster/main.tf | 291 ++ terraform/aws/cluster/output.tf | 24 + terraform/aws/cluster/terraform.tfvars | 43 + terraform/aws/cluster/variables.tf | 181 + terraform/aws/cluster/versions.tf | 12 + terraform/aws/cme-iam-role-gwlb/README.md | 101 + terraform/aws/cme-iam-role-gwlb/main.tf | 110 + terraform/aws/cme-iam-role-gwlb/output.tf | 13 + .../aws/cme-iam-role-gwlb/terraform.tfvars | 5 + terraform/aws/cme-iam-role-gwlb/variables.tf | 42 + terraform/aws/cme-iam-role-gwlb/versions.tf | 9 + terraform/aws/cme-iam-role/README.md | 102 + terraform/aws/cme-iam-role/main.tf | 136 + terraform/aws/cme-iam-role/output.tf | 12 + terraform/aws/cme-iam-role/terraform.tfvars | 5 + terraform/aws/cme-iam-role/variables.tf | 42 + terraform/aws/cme-iam-role/versions.tf | 9 + .../aws/cross-az-cluster-master/README.md | 219 ++ .../aws/cross-az-cluster-master/locals.tf | 58 + terraform/aws/cross-az-cluster-master/main.tf | 70 + .../aws/cross-az-cluster-master/output.tf | 24 + .../cross-az-cluster-master/terraform.tfvars | 48 + .../aws/cross-az-cluster-master/variables.tf | 183 + .../aws/cross-az-cluster-master/versions.tf | 12 + terraform/aws/cross-az-cluster/README.md | 196 + .../cluster_member_a_userdata.yaml | 4 + .../cluster_member_b_userdata.yaml | 4 + terraform/aws/cross-az-cluster/locals.tf | 75 + terraform/aws/cross-az-cluster/main.tf | 294 ++ terraform/aws/cross-az-cluster/output.tf | 30 + .../aws/cross-az-cluster/terraform.tfvars | 42 + terraform/aws/cross-az-cluster/variables.tf | 181 + terraform/aws/cross-az-cluster/versions.tf | 12 + terraform/aws/gateway-master/README.md | 216 ++ terraform/aws/gateway-master/locals.tf | 48 + terraform/aws/gateway-master/main.tf | 66 + terraform/aws/gateway-master/output.tf | 33 + terraform/aws/gateway-master/terraform.tfvars | 50 + terraform/aws/gateway-master/variables.tf | 195 + terraform/aws/gateway-master/versions.tf | 12 + terraform/aws/gateway/README.md | 191 + terraform/aws/gateway/locals.tf | 48 + terraform/aws/gateway/main.tf | 119 + terraform/aws/gateway/output.tf | 21 + terraform/aws/gateway/terraform.tfvars | 46 + terraform/aws/gateway/variables.tf | 192 + terraform/aws/gateway/versions.tf | 12 + terraform/aws/gwlb-master/README.md | 235 ++ terraform/aws/gwlb-master/locals.tf | 61 + terraform/aws/gwlb-master/main.tf | 69 + terraform/aws/gwlb-master/output.tf | 24 + terraform/aws/gwlb-master/terraform.tfvars | 56 + terraform/aws/gwlb-master/variables.tf | 274 ++ terraform/aws/gwlb-master/versions.tf | 15 + terraform/aws/gwlb/README.md | 228 ++ terraform/aws/gwlb/locals.tf | 55 + terraform/aws/gwlb/main.tf | 99 + terraform/aws/gwlb/output.tf | 22 + terraform/aws/gwlb/terraform.tfvars | 52 + terraform/aws/gwlb/variables.tf | 263 ++ terraform/aws/gwlb/versions.tf | 15 + terraform/aws/management/README.md | 200 + terraform/aws/management/locals.tf | 76 + terraform/aws/management/main.tf | 221 ++ .../aws/management/management_userdata.yaml | 4 + terraform/aws/management/output.tf | 19 + terraform/aws/management/terraform.tfvars | 42 + terraform/aws/management/variables.tf | 194 + terraform/aws/management/versions.tf | 12 + terraform/aws/mds/README.md | 190 + terraform/aws/mds/locals.tf | 69 + terraform/aws/mds/main.tf | 194 + terraform/aws/mds/mds_userdata.yaml | 4 + terraform/aws/mds/output.tf | 13 + terraform/aws/mds/terraform.tfvars | 41 + terraform/aws/mds/variables.tf | 175 + terraform/aws/mds/versions.tf | 12 + terraform/aws/modules/amis/main.tf | 22 + terraform/aws/modules/amis/output.tf | 6 + terraform/aws/modules/amis/variables.tf | 26 + .../aws/modules/cloudwatch-policy/main.tf | 18 + .../modules/cloudwatch-policy/variables.tf | 9 + .../aws/modules/cluster-iam-role/main.tf | 38 + .../aws/modules/cluster-iam-role/output.tf | 9 + .../aws/modules/common/elastic_ip/locals.tf | 3 + .../aws/modules/common/elastic_ip/main.tf | 10 + .../aws/modules/common/elastic_ip/output.tf | 9 + .../modules/common/elastic_ip/variables.tf | 13 + .../gateway_instance/gateway_userdata.yaml | 4 + .../modules/common/gateway_instance/locals.tf | 39 + .../modules/common/gateway_instance/main.tf | 63 + .../modules/common/gateway_instance/output.tf | 9 + .../common/gateway_instance/variables.tf | 147 + .../aws/modules/common/instance_type/main.tf | 353 ++ .../modules/common/instance_type/variables.tf | 22 + .../common/internal_default_route/locals.tf | 3 + .../common/internal_default_route/main.tf | 6 + .../common/internal_default_route/output.tf | 3 + .../internal_default_route/variables.tf | 9 + .../aws/modules/common/load_balancer/main.tf | 36 + .../modules/common/load_balancer/output.tf | 18 + .../modules/common/load_balancer/variables.tf | 62 + .../aws/modules/common/permissive_sg/main.tf | 20 + .../modules/common/permissive_sg/output.tf | 9 + .../modules/common/permissive_sg/variables.tf | 13 + .../modules/common/version_license/main.tf | 60 + .../common/version_license/variables.tf | 21 + .../aws/modules/custom-autoscale/locals.tf | 9 + .../aws/modules/custom-autoscale/main.tf | 94 + .../aws/modules/custom-autoscale/variables.tf | 89 + .../aws/modules/custom-autoscale/vpc/main.tf | 52 + .../modules/custom-autoscale/vpc/output.tf | 12 + .../modules/custom-autoscale/vpc/variables.tf | 17 + terraform/aws/modules/vpc/main.tf | 66 + terraform/aws/modules/vpc/output.tf | 18 + terraform/aws/modules/vpc/variables.tf | 22 + terraform/aws/qs-autoscale-master/README.md | 258 ++ terraform/aws/qs-autoscale-master/locals.tf | 63 + terraform/aws/qs-autoscale-master/main.tf | 60 + terraform/aws/qs-autoscale-master/output.tf | 58 + .../aws/qs-autoscale-master/terraform.tfvars | 57 + .../aws/qs-autoscale-master/variables.tf | 240 ++ terraform/aws/qs-autoscale-master/versions.tf | 15 + terraform/aws/qs-autoscale/README.md | 239 ++ terraform/aws/qs-autoscale/locals.tf | 71 + terraform/aws/qs-autoscale/main.tf | 165 + terraform/aws/qs-autoscale/output.tf | 45 + terraform/aws/qs-autoscale/terraform.tfvars | 48 + terraform/aws/qs-autoscale/variables.tf | 231 ++ terraform/aws/qs-autoscale/versions.tf | 15 + terraform/aws/standalone-master/README.md | 201 + terraform/aws/standalone-master/locals.tf | 35 + terraform/aws/standalone-master/main.tf | 63 + terraform/aws/standalone-master/output.tf | 27 + .../aws/standalone-master/terraform.tfvars | 43 + terraform/aws/standalone-master/variables.tf | 174 + terraform/aws/standalone-master/versions.tf | 12 + terraform/aws/standalone/README.md | 177 + terraform/aws/standalone/locals.tf | 41 + terraform/aws/standalone/main.tf | 145 + terraform/aws/standalone/output.tf | 15 + .../aws/standalone/standalone_userdata.yaml | 4 + terraform/aws/standalone/terraform.tfvars | 39 + terraform/aws/standalone/variables.tf | 172 + terraform/aws/standalone/versions.tf | 12 + .../tap/Check Point NOW onboarding page.docx | Bin 0 -> 287849 bytes .../tap/CheckPoint_NOW_onboarding_page.pdf | Bin 0 -> 390187 bytes terraform/aws/tap/README.md | 259 ++ terraform/aws/tap/main.tf | 301 ++ terraform/aws/tap/output.tf | 34 + terraform/aws/tap/tap_lambda.py | 155 + terraform/aws/tap/tap_termination_lambda.py | 26 + terraform/aws/tap/tap_user_data.sh | 37 + terraform/aws/tap/terraform.tfvars | 21 + terraform/aws/tap/variables.tf | 89 + terraform/aws/tgw-asg-master/README.md | 223 ++ terraform/aws/tgw-asg-master/locals.tf | 64 + terraform/aws/tgw-asg-master/main.tf | 55 + terraform/aws/tgw-asg-master/output.tf | 24 + terraform/aws/tgw-asg-master/terraform.tfvars | 47 + terraform/aws/tgw-asg-master/variables.tf | 217 ++ terraform/aws/tgw-asg-master/versions.tf | 15 + terraform/aws/tgw-asg/README.md | 213 ++ terraform/aws/tgw-asg/locals.tf | 64 + terraform/aws/tgw-asg/main.tf | 64 + terraform/aws/tgw-asg/output.tf | 18 + terraform/aws/tgw-asg/terraform.tfvars | 43 + terraform/aws/tgw-asg/variables.tf | 211 ++ terraform/aws/tgw-asg/versions.tf | 15 + .../aws/tgw-cross-az-cluster-master/README.md | 210 ++ .../aws/tgw-cross-az-cluster-master/locals.tf | 61 + .../aws/tgw-cross-az-cluster-master/main.tf | 73 + .../aws/tgw-cross-az-cluster-master/output.tf | 30 + .../terraform.tfvars | 48 + .../tgw-cross-az-cluster-master/variables.tf | 200 + .../tgw-cross-az-cluster-master/versions.tf | 15 + terraform/aws/tgw-cross-az-cluster/README.md | 205 ++ terraform/aws/tgw-cross-az-cluster/locals.tf | 60 + terraform/aws/tgw-cross-az-cluster/main.tf | 62 + terraform/aws/tgw-cross-az-cluster/output.tf | 27 + .../aws/tgw-cross-az-cluster/terraform.tfvars | 43 + .../aws/tgw-cross-az-cluster/variables.tf | 201 + .../aws/tgw-cross-az-cluster/versions.tf | 15 + terraform/aws/tgw-gwlb-master/README.md | 264 ++ terraform/aws/tgw-gwlb-master/locals.tf | 62 + terraform/aws/tgw-gwlb-master/main.tf | 85 + terraform/aws/tgw-gwlb-master/output.tf | 24 + .../aws/tgw-gwlb-master/terraform.tfvars | 76 + terraform/aws/tgw-gwlb-master/variables.tf | 326 ++ terraform/aws/tgw-gwlb-master/versions.tf | 15 + terraform/aws/tgw-gwlb/README.md | 263 ++ terraform/aws/tgw-gwlb/locals.tf | 60 + terraform/aws/tgw-gwlb/main.tf | 438 +++ terraform/aws/tgw-gwlb/output.tf | 24 + terraform/aws/tgw-gwlb/terraform.tfvars | 69 + terraform/aws/tgw-gwlb/variables.tf | 333 ++ terraform/aws/tgw-gwlb/versions.tf | 15 + terraform/azure/README.md | 12 + .../high-availability-existing-vnet/README.md | 239 ++ .../azure_public_key | 0 .../cloud-init.sh | 22 + .../high-availability-existing-vnet/main.tf | 531 +++ .../terraform.tfvars | 38 + .../variables.tf | 339 ++ .../versions.tf | 12 + .../high-availability-new-vnet/README.md | 242 ++ .../azure_public_key | 0 .../high-availability-new-vnet/cloud-init.sh | 22 + .../azure/high-availability-new-vnet/main.tf | 550 +++ .../terraform.tfvars | 36 + .../high-availability-new-vnet/variables.tf | 328 ++ .../high-availability-new-vnet/versions.tf | 12 + .../azure/management-existing-vnet/README.md | 189 + .../management-existing-vnet/azure_public_key | 0 .../management-existing-vnet/cloud-init.sh | 16 + .../azure/management-existing-vnet/main.tf | 312 ++ .../management-existing-vnet/terraform.tfvars | 30 + .../management-existing-vnet/variables.tf | 251 ++ .../management-existing-vnet/versions.tf | 12 + terraform/azure/management-new-vnet/README.md | 187 + .../management-new-vnet/azure_public_key | 0 .../azure/management-new-vnet/cloud-init.sh | 16 + terraform/azure/management-new-vnet/main.tf | 316 ++ .../management-new-vnet/terraform.tfvars | 29 + .../azure/management-new-vnet/variables.tf | 249 ++ .../azure/management-new-vnet/versions.tf | 12 + terraform/azure/mds-existing-vnet/README.md | 195 + .../azure/mds-existing-vnet/azure_public_key | 0 .../azure/mds-existing-vnet/cloud-init.sh | 20 + terraform/azure/mds-existing-vnet/main.tf | 316 ++ .../azure/mds-existing-vnet/terraform.tfvars | 35 + .../azure/mds-existing-vnet/variables.tf | 280 ++ terraform/azure/mds-existing-vnet/versions.tf | 12 + terraform/azure/mds-new-vnet/README.md | 188 + terraform/azure/mds-new-vnet/azure_public_key | 0 terraform/azure/mds-new-vnet/cloud-init.sh | 20 + terraform/azure/mds-new-vnet/main.tf | 321 ++ terraform/azure/mds-new-vnet/terraform.tfvars | 34 + terraform/azure/mds-new-vnet/variables.tf | 278 ++ terraform/azure/mds-new-vnet/versions.tf | 12 + terraform/azure/modules/add-routing-intent.py | 29 + terraform/azure/modules/common/main.tf | 5 + terraform/azure/modules/common/outputs.tf | 130 + terraform/azure/modules/common/variables.tf | 369 ++ terraform/azure/modules/common/versions.tf | 3 + .../modules/network-security-group/main.tf | 23 + .../modules/network-security-group/output.tf | 7 + .../network-security-group/variables.tf | 43 + .../network-security-group/versions.tf | 3 + terraform/azure/modules/vnet/main.tf | 80 + terraform/azure/modules/vnet/outputs.tf | 27 + terraform/azure/modules/vnet/variables.tf | 63 + terraform/azure/modules/vnet/versions.tf | 3 + .../azure/nva-into-existing-hub/README.md | 172 + terraform/azure/nva-into-existing-hub/main.tf | 195 + .../nva-into-existing-hub/terraform.tfvars | 31 + .../azure/nva-into-existing-hub/variables.tf | 198 + .../azure/nva-into-existing-hub/versions.tf | 17 + terraform/azure/nva-into-new-vwan/README.md | 182 + terraform/azure/nva-into-new-vwan/main.tf | 202 + .../azure/nva-into-new-vwan/terraform.tfvars | 32 + .../azure/nva-into-new-vwan/variables.tf | 209 ++ terraform/azure/nva-into-new-vwan/versions.tf | 17 + .../single-gateway-existing-vnet/README.md | 200 + .../azure_public_key | 0 .../cloud-init.sh | 18 + .../single-gateway-existing-vnet/main.tf | 257 ++ .../terraform.tfvars | 35 + .../single-gateway-existing-vnet/variables.tf | 281 ++ .../single-gateway-existing-vnet/versions.tf | 12 + .../azure/single-gateway-new-vnet/README.md | 197 + .../single-gateway-new-vnet/azure_public_key | 0 .../single-gateway-new-vnet/cloud-init.sh | 18 + .../azure/single-gateway-new-vnet/main.tf | 256 ++ .../single-gateway-new-vnet/terraform.tfvars | 33 + .../single-gateway-new-vnet/variables.tf | 280 ++ .../azure/single-gateway-new-vnet/versions.tf | 12 + terraform/azure/vmss-existing-vnet/README.md | 247 ++ .../azure/vmss-existing-vnet/azure_public_key | 0 .../azure/vmss-existing-vnet/cloud-init.sh | 17 + terraform/azure/vmss-existing-vnet/main.tf | 446 +++ .../azure/vmss-existing-vnet/terraform.tfvars | 43 + .../azure/vmss-existing-vnet/variables.tf | 404 ++ .../azure/vmss-existing-vnet/versions.tf | 14 + terraform/azure/vmss-new-vnet/README.md | 247 ++ .../azure/vmss-new-vnet/azure_public_key | 0 terraform/azure/vmss-new-vnet/cloud-init.sh | 17 + terraform/azure/vmss-new-vnet/main.tf | 442 +++ .../azure/vmss-new-vnet/terraform.tfvars | 42 + terraform/azure/vmss-new-vnet/variables.tf | 393 ++ terraform/azure/vmss-new-vnet/versions.tf | 14 + terraform/gcp/README.md | 12 + .../gcp/autoscale-into-existing-vpc/README.md | 233 ++ .../gcp/autoscale-into-existing-vpc/locals.tf | 63 + .../gcp/autoscale-into-existing-vpc/main.tf | 197 + .../gcp/autoscale-into-existing-vpc/output.tf | 33 + .../terraform.tfvars | 36 + .../autoscale-into-existing-vpc/variables.tf | 157 + .../gcp/autoscale-into-new-vpc/README.md | 241 ++ .../gcp/autoscale-into-new-vpc/locals.tf | 48 + terraform/gcp/autoscale-into-new-vpc/main.tf | 73 + .../gcp/autoscale-into-new-vpc/output.tf | 46 + .../autoscale-into-new-vpc/terraform.tfvars | 34 + .../gcp/autoscale-into-new-vpc/variables.tf | 150 + terraform/gcp/common/cluster-member/main.tf | 130 + terraform/gcp/common/cluster-member/output.tf | 6 + .../gcp/common/cluster-member/variables.tf | 174 + terraform/gcp/common/firewall-rule/main.tf | 10 + terraform/gcp/common/firewall-rule/output.tf | 3 + .../gcp/common/firewall-rule/variables.tf | 17 + terraform/gcp/common/members-a-b/main.tf | 85 + terraform/gcp/common/members-a-b/output.tf | 13 + terraform/gcp/common/members-a-b/variables.tf | 175 + .../gcp/common/network-and-subnet/main.tf | 21 + .../gcp/common/network-and-subnet/output.tf | 18 + .../common/network-and-subnet/variables.tf | 27 + terraform/gcp/common/startup-script.sh | 3 + terraform/gcp/high-availability/README.md | 317 ++ terraform/gcp/high-availability/locals.tf | 106 + terraform/gcp/high-availability/main.tf | 250 ++ terraform/gcp/high-availability/output.tf | 117 + .../gcp/high-availability/terraform.tfvars | 53 + terraform/gcp/high-availability/variables.tf | 302 ++ .../gcp/single-into-existing-vpc/README.md | 275 ++ .../gcp/single-into-existing-vpc/locals.tf | 55 + .../gcp/single-into-existing-vpc/main.tf | 218 ++ .../gcp/single-into-existing-vpc/output.tf | 18 + .../single-into-existing-vpc/terraform.tfvars | 46 + .../gcp/single-into-existing-vpc/variables.tf | 254 ++ terraform/gcp/single-into-new-vpc/README.md | 270 ++ terraform/gcp/single-into-new-vpc/main.tf | 90 + terraform/gcp/single-into-new-vpc/output.tf | 30 + .../gcp/single-into-new-vpc/terraform.tfvars | 45 + .../gcp/single-into-new-vpc/variables.tf | 256 ++ 1061 files changed, 198947 insertions(+) create mode 100644 .github/workflows/code-analysis.yaml create mode 100755 .gitignore create mode 100644 README.md create mode 100755 aws/images/launch.png create mode 100755 aws/images/step1_aws.png create mode 100755 aws/images/step2_aws.png create mode 100644 aws/templates/README.md create mode 100644 aws/templates/asg/README.md create mode 100644 aws/templates/asg/autoscale.yaml create mode 100644 aws/templates/cluster/README.md create mode 100755 aws/templates/cluster/cluster-master.yaml create mode 100755 aws/templates/cluster/cluster.yaml create mode 100644 aws/templates/cross-az-cluster/README.md create mode 100644 aws/templates/cross-az-cluster/cross-az-cluster-master.yaml create mode 100644 aws/templates/cross-az-cluster/cross-az-cluster.yaml create mode 100644 aws/templates/general/README.md create mode 100644 aws/templates/general/amis.yaml create mode 100644 aws/templates/general/cme-iam-role.yaml create mode 100644 aws/templates/geo-cluster/README.md create mode 100644 aws/templates/geo-cluster/geo-cluster-master.yaml create mode 100644 aws/templates/geo-cluster/geo-cluster.yaml create mode 100644 aws/templates/gwlb-asg/README.md create mode 100644 aws/templates/gwlb-asg/gwlb-master.yaml create mode 100644 aws/templates/gwlb-asg/gwlb.yaml create mode 100644 aws/templates/gwlb-asg/qs-gwlb-master.yaml create mode 100644 aws/templates/gwlb-asg/qs-gwlb.yaml create mode 100644 aws/templates/gwlb-asg/tgw-gwlb-master.yaml create mode 100644 aws/templates/gwlb-asg/tgw-gwlb.yaml create mode 100644 aws/templates/management/README.md create mode 100755 aws/templates/management/management.yaml create mode 100644 aws/templates/mds/README.md create mode 100644 aws/templates/mds/mds.yaml create mode 100644 aws/templates/single-gw/README.md create mode 100644 aws/templates/single-gw/gateway-master.yaml create mode 100644 aws/templates/single-gw/gateway.yaml create mode 100644 aws/templates/standalone/README.md create mode 100644 aws/templates/standalone/standalone-master.yaml create mode 100644 aws/templates/standalone/standalone.yaml create mode 100644 aws/templates/tgw-asg/README.md create mode 100644 aws/templates/tgw-asg/tgw-asg-master.yaml create mode 100644 aws/templates/tgw-asg/tgw-asg.yaml create mode 100644 aws/templates/tgw-cross-az-cluster/README.md create mode 100644 aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml create mode 100644 aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml create mode 100644 aws/templates/tgw-ha/README.md create mode 100644 aws/templates/tgw-ha/tgw-ha-master.yaml create mode 100644 aws/templates/tgw-ha/tgw-ha.yaml create mode 100755 azure/misc/azure_ha_test.py create mode 100644 azure/misc/nva_bgp_config.conf create mode 100644 azure/templates/README.MD create mode 100644 azure/templates/marketplace-gateway-load-balancer/README.md create mode 100644 azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json create mode 100644 azure/templates/marketplace-gateway-load-balancer/mainTemplate.json create mode 100644 azure/templates/marketplace-ha/README.md create mode 100644 azure/templates/marketplace-ha/createUiDefinition.json create mode 100644 azure/templates/marketplace-ha/mainTemplate.json create mode 100644 azure/templates/marketplace-management/README.md create mode 100644 azure/templates/marketplace-management/createUiDefinition.json create mode 100644 azure/templates/marketplace-management/mainTemplate.json create mode 100644 azure/templates/marketplace-mds/README.md create mode 100644 azure/templates/marketplace-mds/createUiDefinition.json create mode 100644 azure/templates/marketplace-mds/mainTemplate.json create mode 100755 azure/templates/marketplace-single-waap/createUiDefinition.json create mode 100755 azure/templates/marketplace-single-waap/mainTemplate.json create mode 100644 azure/templates/marketplace-single/README.md create mode 100644 azure/templates/marketplace-single/createUiDefinition.json create mode 100644 azure/templates/marketplace-single/mainTemplate.json create mode 100644 azure/templates/marketplace-stack-ha/createUiDefinition.json create mode 100755 azure/templates/marketplace-stack-ha/mainTemplate.json create mode 100644 azure/templates/marketplace-stack-management/createUiDefinition.json create mode 100755 azure/templates/marketplace-stack-management/mainTemplate.json create mode 100644 azure/templates/marketplace-stack-single/createUiDefinition.json create mode 100755 azure/templates/marketplace-stack-single/mainTemplate.json create mode 100755 azure/templates/marketplace-vmss-waap/createUiDefinition.json create mode 100755 azure/templates/marketplace-vmss-waap/mainTemplate.json create mode 100644 azure/templates/marketplace-vmss/README.md create mode 100644 azure/templates/marketplace-vmss/createUiDefinition.json create mode 100644 azure/templates/marketplace-vmss/mainTemplate.json create mode 100644 azure/templates/nestedtemplates/CreateUIDefinition.MultiVm.json create mode 100755 azure/templates/nestedtemplates/azure-func-sami.json create mode 100755 azure/templates/nestedtemplates/existing-nsg-RoleAssignment.json create mode 100755 azure/templates/nestedtemplates/gateway-load-balancers.json create mode 100755 azure/templates/nestedtemplates/load-balancers-waap.json create mode 100644 azure/templates/nestedtemplates/load-balancers.json create mode 100644 azure/templates/nestedtemplates/storageAccount-existing.json create mode 100644 azure/templates/nestedtemplates/storageAccount-new.json create mode 100644 azure/templates/nestedtemplates/vnet-1-subnet-existing.json create mode 100644 azure/templates/nestedtemplates/vnet-1-subnet-new.json create mode 100644 azure/templates/nestedtemplates/vnet-2-subnet-ha-existing.json create mode 100644 azure/templates/nestedtemplates/vnet-2-subnet-ha-new.json create mode 100644 azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json create mode 100644 azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json create mode 100644 azure/templates/nestedtemplates/vnet-4-subnet-existing.json create mode 100644 azure/templates/nestedtemplates/vnet-4-subnet-new.json create mode 100644 azure/templates/nestedtemplates/vnet-existing-no-rt.json create mode 100644 azure/templates/nestedtemplates/vnet-existing-stack-ha.json create mode 100644 azure/templates/nestedtemplates/vnet-existing-stack-mgmt.json create mode 100644 azure/templates/nestedtemplates/vnet-existing-stack.json create mode 100644 azure/templates/nestedtemplates/vnet-existing.json create mode 100644 azure/templates/nestedtemplates/vnet-new-no-rt.json create mode 100644 azure/templates/nestedtemplates/vnet-new-stack-ha.json create mode 100644 azure/templates/nestedtemplates/vnet-new-stack-mgmt.json create mode 100644 azure/templates/nestedtemplates/vnet-new-stack.json create mode 100644 azure/templates/nestedtemplates/vnet-new.json create mode 100755 azure/templates/single-ipv6/README.md create mode 100755 azure/templates/single-ipv6/mainTemplate.json create mode 100755 azure/templates/vmss-ipv6/README.md create mode 100755 azure/templates/vmss-ipv6/mainTemplate.json create mode 100644 azure/templates/vwan-managed-app/README.md create mode 100644 azure/templates/vwan-managed-app/mainTemplate.json create mode 100755 common/central_license_debug_collector.sh create mode 100644 common/cme_api_postman/CME_API.postman_collection create mode 100755 common/cme_api_postman/README.md create mode 100644 common/cme_xff_inject.sh create mode 100755 common/custom-management-script.py create mode 100644 common/custom_scripts/README.md create mode 100644 common/custom_scripts/password_script.sh create mode 100755 common/maintenance_mode/README.md create mode 100755 common/maintenance_mode/grub.conf create mode 100644 common/simulate_cpu_load.sh create mode 100755 common/static_route_config.sh create mode 100644 common/vwan_postman/README.md create mode 100755 common/vwan_postman/vwan.postman_collection.json create mode 100644 contrib/README.md create mode 100644 contrib/azure/templates/ha-public-ip-prefix/README.MD create mode 100644 contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix-parameters.json create mode 100644 contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix.json create mode 100644 contrib/azure/templates/ha-redeploy-single-member/README.MD create mode 100644 contrib/azure/templates/ha-redeploy-single-member/ha-redeploy-single-member.json create mode 100644 contrib/azure/templates/ha-redeploy-single-member/mainTemplate.json create mode 100644 contrib/azure/templates/vmss-publicipprefixinstances/README.MD create mode 100644 contrib/azure/templates/vmss-publicipprefixinstances/vmss-publicipprefix-instances.json create mode 100644 contrib/azure/templates/vmss-publicipprefixinstanceselb/README.MD create mode 100644 contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json create mode 100644 contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/load-balancers.json create mode 100644 contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/vnet-2-subnet-ha-existing.json create mode 100644 contrib/cme/examples/README.md create mode 100644 contrib/terraform-azure-gwlb/README.md create mode 100644 contrib/terraform-azure-gwlb/app-main.tf create mode 100644 contrib/terraform-azure-gwlb/app-variables.tf create mode 100644 contrib/terraform-azure-gwlb/cpcluster-main.tf create mode 100644 contrib/terraform-azure-gwlb/cpcluster-variables.tf create mode 100644 contrib/terraform-azure-gwlb/cpmgmt-main.tf create mode 100644 contrib/terraform-azure-gwlb/cpmgmt-variables.tf create mode 100644 contrib/terraform-azure-gwlb/customdata.sh create mode 100644 contrib/terraform-azure-gwlb/deployment-variables.tf create mode 100644 contrib/terraform-azure-gwlb/files/azure-gwlb-template.json create mode 100644 contrib/terraform-azure-gwlb/gwlb-main.tf create mode 100644 contrib/terraform-azure-gwlb/gwlb-variables.tf create mode 100644 contrib/terraform-azure-gwlb/modules/common/main.tf create mode 100644 contrib/terraform-azure-gwlb/modules/common/outputs.tf create mode 100644 contrib/terraform-azure-gwlb/modules/common/variables.tf create mode 100644 contrib/terraform-azure-gwlb/modules/common/versions.tf create mode 100644 contrib/terraform-azure-gwlb/modules/network-security-group/main.tf create mode 100644 contrib/terraform-azure-gwlb/modules/network-security-group/output.tf create mode 100644 contrib/terraform-azure-gwlb/modules/network-security-group/variables.tf create mode 100644 contrib/terraform-azure-gwlb/modules/network-security-group/versions.tf create mode 100644 contrib/terraform-azure-gwlb/modules/vnet/main.tf create mode 100644 contrib/terraform-azure-gwlb/modules/vnet/outputs.tf create mode 100644 contrib/terraform-azure-gwlb/modules/vnet/variables.tf create mode 100644 contrib/terraform-azure-gwlb/modules/vnet/versions.tf create mode 100644 contrib/terraform-azure-gwlb/net-main.tf create mode 100644 contrib/terraform-azure-gwlb/net-variables.tf create mode 100644 contrib/terraform-azure-gwlb/terraform.tfvars create mode 100644 contrib/terraform-azure-gwlb/tfc-project.tf create mode 100644 contrib/terraform-azure-gwlb/zimages/azure-gwlb-design.jpg create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/README.md create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/azure_public_key create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/cloud-init.sh create mode 100644 contrib/terraform/azure/vmss-new-vnet-with-peer/images/Topology-2.JPG create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/main.tf create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars create mode 100755 contrib/terraform/azure/vmss-new-vnet-with-peer/variables.tf create mode 100644 deprecated/README.md create mode 100644 deprecated/aws/templates/README.md create mode 100644 deprecated/aws/templates/asg-r8030/README.md create mode 100755 deprecated/aws/templates/asg-r8030/autoscale.json create mode 100644 deprecated/aws/templates/cluster-r8030/README.md create mode 100644 deprecated/aws/templates/cluster-r8030/cluster-into-vpc.json create mode 100644 deprecated/aws/templates/cluster-r8030/cluster.json create mode 100644 deprecated/aws/templates/gateway-r7730/README.md create mode 100755 deprecated/aws/templates/gateway-r7730/gateway-2-nic-existing-vpc.json create mode 100644 deprecated/aws/templates/gateways-r7730/README.md create mode 100755 deprecated/aws/templates/gateways-r7730/inter-az-cluster.json create mode 100644 deprecated/aws/templates/instance-r7730/README.md create mode 100755 deprecated/aws/templates/instance-r7730/gwinvpc.json create mode 100644 deprecated/aws/templates/management-r7730/README.md create mode 100755 deprecated/aws/templates/management-r7730/r7730-management.json create mode 100644 deprecated/aws/templates/management-r80/README.md create mode 100755 deprecated/aws/templates/management-r80/r80.json create mode 100644 deprecated/aws/templates/management-r8030/README.md create mode 100755 deprecated/aws/templates/management-r8030/management.json create mode 100644 deprecated/aws/templates/mds-r8030/README.md create mode 100755 deprecated/aws/templates/mds-r8030/mds.json create mode 100644 deprecated/aws/templates/single-gw-r8030/README.md create mode 100644 deprecated/aws/templates/single-gw-r8030/gateway-into-vpc.json create mode 100644 deprecated/aws/templates/single-gw-r8030/gateway.json create mode 100644 deprecated/aws/templates/tgw-asg-r8030/README.md create mode 100755 deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg-master.yaml create mode 100755 deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg.yaml create mode 100644 deprecated/aws/templates/transit-vpc-r8030/README.md create mode 100755 deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit-master.yaml create mode 100755 deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit.yaml create mode 100755 deprecated/aws/templates/transit-vpc-r8030/transit-master.yaml create mode 100755 deprecated/aws/templates/transit-vpc-r8030/transit.yaml create mode 100644 deprecated/azure/misc/azure_ha_test_python2.py create mode 100644 deprecated/azure/templates/R7730/cluster-r7730/README.MD create mode 100644 deprecated/azure/templates/R7730/cluster-r7730/createUiDefinition.json create mode 100644 deprecated/azure/templates/R7730/cluster-r7730/mainTemplate.json create mode 100644 deprecated/azure/templates/R7730/cluster-r7730/vnet-existing.json create mode 100644 deprecated/azure/templates/R7730/cluster-r7730/vnet-new.json create mode 100644 deprecated/azure/templates/R7730/mgmt-r7730/README.MD create mode 100644 deprecated/azure/templates/R7730/mgmt-r7730/createUiDefinition.json create mode 100644 deprecated/azure/templates/R7730/mgmt-r7730/mainTemplate.json create mode 100644 deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-existing.json create mode 100644 deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-new.json create mode 100644 deprecated/azure/templates/R7730/single-r7730/README.MD create mode 100644 deprecated/azure/templates/R7730/single-r7730/createUiDefinition.json create mode 100644 deprecated/azure/templates/R7730/single-r7730/mainTemplate.json create mode 100644 deprecated/azure/templates/R7730/single-r7730/vnet-existing.json create mode 100644 deprecated/azure/templates/R7730/single-r7730/vnet-new.json create mode 100644 deprecated/azure/templates/R7730/vmss-r7730/README.MD create mode 100644 deprecated/azure/templates/R7730/vmss-r7730/createUiDefinition.json create mode 100644 deprecated/azure/templates/R7730/vmss-r7730/mainTemplate.json create mode 100644 deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-existing.json create mode 100644 deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-new.json create mode 100644 deprecated/azure/templates/R8010-R8020/cluster-r8010/README.MD create mode 100644 deprecated/azure/templates/R8010-R8020/cluster-r8010/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8010-R8020/cluster-r8010/mainTemplate.json create mode 100644 deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-existing.json create mode 100644 deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-new.json create mode 100644 deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/README.MD create mode 100644 deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/mainTemplate.json create mode 100644 deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-existing.json create mode 100644 deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-new.json create mode 100644 deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/README.MD create mode 100644 deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/mainTemplate.json create mode 100644 deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-existing.json create mode 100644 deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-new.json create mode 100644 deprecated/azure/templates/R8010-R8020/single-r8010-r8020/README.MD create mode 100644 deprecated/azure/templates/R8010-R8020/single-r8010-r8020/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8010-R8020/single-r8010-r8020/mainTemplate.json create mode 100644 deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-existing.json create mode 100644 deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-new.json create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/README.MD create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/mainTemplate.json create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/load-balancers.json create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-existing.json create mode 100644 deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-new.json create mode 100644 deprecated/azure/templates/R8030/ha-r8030/README.MD create mode 100644 deprecated/azure/templates/R8030/ha-r8030/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8030/ha-r8030/mainTemplate.json create mode 100644 deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-existing.json create mode 100644 deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-new.json create mode 100644 deprecated/azure/templates/R8030/mds-r8030/README.MD create mode 100644 deprecated/azure/templates/R8030/mds-r8030/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8030/mds-r8030/mainTemplate.json create mode 100644 deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-existing.json create mode 100644 deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-new.json create mode 100644 deprecated/azure/templates/R8030/mgmt-r8030/README.MD create mode 100644 deprecated/azure/templates/R8030/mgmt-r8030/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8030/mgmt-r8030/mainTemplate.json create mode 100644 deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-existing.json create mode 100644 deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-new.json create mode 100644 deprecated/azure/templates/R8030/single-r8030/README.MD create mode 100644 deprecated/azure/templates/R8030/single-r8030/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8030/single-r8030/mainTemplate.json create mode 100644 deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-existing.json create mode 100644 deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-new.json create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/README.MD create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/mainTemplate.json create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/load-balancers.json create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-existing.json create mode 100644 deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-new.json create mode 100644 deprecated/azure/templates/R8040-R81/ha-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/ha-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/mds-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/mds-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/mgmt-r840-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/mgmt-r840-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/single-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/single-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/R8040-R81/vmss-r8040-r81/README.md create mode 100644 deprecated/azure/templates/R8040-R81/vmss-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/README.MD create mode 100644 deprecated/azure/templates/stack-R8030/stack-ha/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8030/stack-ha/mainTemplate.json create mode 100644 deprecated/azure/templates/stack-R8030/stack-mgmt/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8030/stack-mgmt/mainTemplate.json create mode 100644 deprecated/azure/templates/stack-R8030/stack-single/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8030/stack-single/mainTemplate.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/createUiDefinition.json create mode 100644 deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py.schema create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/autoscale-byol-R80.30/password.py create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py.schema create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/autoscale-payg-R80.30/password.py create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py.schema create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/ha-byol-R80.30/password.py create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py.schema create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/ha-payg-R80.30/password.py create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py.schema create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/single-byol-R80.30/password.py create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/README.md create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py.schema create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/common.py create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/config.yaml create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/default.py create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/images.py create mode 100644 deprecated/gcp/R80.30/single-payg-R80.30/password.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/README.md create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py.schema create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/common.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/default.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/images.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-byol/password.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/README.md create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py.schema create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/common.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/default.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/images.py create mode 100644 deprecated/gcp/R80.40-R81/autoscale-payg/password.py create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/README.md create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py.schema create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/common.py create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/default.py create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/images.py create mode 100644 deprecated/gcp/R80.40-R81/ha-byol/password.py create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/README.md create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py.schema create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/common.py create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/default.py create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/images.py create mode 100644 deprecated/gcp/R80.40-R81/ha-payg/password.py create mode 100644 deprecated/gcp/R80.40-R81/single-byol/README.md create mode 100644 deprecated/gcp/R80.40-R81/single-byol/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py create mode 100644 deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py.schema create mode 100644 deprecated/gcp/R80.40-R81/single-byol/common.py create mode 100644 deprecated/gcp/R80.40-R81/single-byol/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/single-byol/default.py create mode 100644 deprecated/gcp/R80.40-R81/single-byol/images.py create mode 100644 deprecated/gcp/R80.40-R81/single-byol/password.py create mode 100644 deprecated/gcp/R80.40-R81/single-payg/README.md create mode 100644 deprecated/gcp/R80.40-R81/single-payg/c2d_deployment_configuration.json create mode 100644 deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py create mode 100644 deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py.schema create mode 100644 deprecated/gcp/R80.40-R81/single-payg/common.py create mode 100644 deprecated/gcp/R80.40-R81/single-payg/config.yaml create mode 100644 deprecated/gcp/R80.40-R81/single-payg/default.py create mode 100644 deprecated/gcp/R80.40-R81/single-payg/images.py create mode 100644 deprecated/gcp/R80.40-R81/single-payg/password.py create mode 100644 deprecated/gcp/README.MD create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-existing-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/management-new-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-existing-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/mds-new-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/add-routing-intent.py create mode 100644 deprecated/terraform/azure/R8040-R81/modules/common/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/common/outputs.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/common/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/common/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/network-security-group/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/network-security-group/output.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/network-security-group/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/network-security-group/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/vnet/outputs.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/modules/vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/versions.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/README.md create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/azure_public_key create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/cloud-init.sh create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/main.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/terraform.tfvars create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/variables.tf create mode 100644 deprecated/terraform/azure/R8040-R81/vmss-new-vnet/versions.tf create mode 100644 deprecated/terraform/azure/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/locals.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/terraform.tfvars create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/locals.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/terraform.tfvars create mode 100644 deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/cluster-member/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/cluster-member/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/cluster-member/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/firewall-rule/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/firewall-rule/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/firewall-rule/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/members-a-b/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/members-a-b/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/members-a-b/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/common/startup-script.sh create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/locals.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/terraform.tfvars create mode 100644 deprecated/terraform/gcp/R8040-R81/high-availability/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/locals.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/terraform.tfvars create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/variables.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/README.md create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/main.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/output.tf create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/terraform.tfvars create mode 100644 deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/variables.tf create mode 100644 gcp/deployment-packages/README.MD create mode 100644 gcp/deployment-packages/autoscale-byol/README.md create mode 100755 gcp/deployment-packages/autoscale-byol/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py create mode 100755 gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema create mode 100755 gcp/deployment-packages/autoscale-byol/common.py create mode 100644 gcp/deployment-packages/autoscale-byol/config.yaml create mode 100755 gcp/deployment-packages/autoscale-byol/default.py create mode 100755 gcp/deployment-packages/autoscale-byol/images.py create mode 100755 gcp/deployment-packages/autoscale-byol/password.py create mode 100644 gcp/deployment-packages/autoscale-payg/README.md create mode 100755 gcp/deployment-packages/autoscale-payg/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py create mode 100755 gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema create mode 100755 gcp/deployment-packages/autoscale-payg/common.py create mode 100644 gcp/deployment-packages/autoscale-payg/config.yaml create mode 100755 gcp/deployment-packages/autoscale-payg/default.py create mode 100755 gcp/deployment-packages/autoscale-payg/images.py create mode 100755 gcp/deployment-packages/autoscale-payg/password.py create mode 100644 gcp/deployment-packages/ha-byol/README.md create mode 100755 gcp/deployment-packages/ha-byol/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/ha-byol/check-point-cluster--byol.py create mode 100755 gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema create mode 100755 gcp/deployment-packages/ha-byol/common.py create mode 100644 gcp/deployment-packages/ha-byol/config.yaml create mode 100755 gcp/deployment-packages/ha-byol/default.py create mode 100755 gcp/deployment-packages/ha-byol/images.py create mode 100755 gcp/deployment-packages/ha-byol/password.py create mode 100644 gcp/deployment-packages/ha-payg/README.md create mode 100755 gcp/deployment-packages/ha-payg/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/ha-payg/check-point-cluster--payg.py create mode 100755 gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema create mode 100755 gcp/deployment-packages/ha-payg/common.py create mode 100644 gcp/deployment-packages/ha-payg/config.yaml create mode 100755 gcp/deployment-packages/ha-payg/default.py create mode 100755 gcp/deployment-packages/ha-payg/images.py create mode 100755 gcp/deployment-packages/ha-payg/password.py create mode 100644 gcp/deployment-packages/single-byol/README.md create mode 100755 gcp/deployment-packages/single-byol/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/single-byol/check-point-vsec--byol.py create mode 100755 gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema create mode 100755 gcp/deployment-packages/single-byol/common.py create mode 100644 gcp/deployment-packages/single-byol/config.yaml create mode 100755 gcp/deployment-packages/single-byol/default.py create mode 100755 gcp/deployment-packages/single-byol/images.py create mode 100755 gcp/deployment-packages/single-byol/password.py create mode 100644 gcp/deployment-packages/single-payg/README.md create mode 100755 gcp/deployment-packages/single-payg/c2d_deployment_configuration.json create mode 100755 gcp/deployment-packages/single-payg/check-point-vsec--payg.py create mode 100755 gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema create mode 100755 gcp/deployment-packages/single-payg/common.py create mode 100644 gcp/deployment-packages/single-payg/config.yaml create mode 100755 gcp/deployment-packages/single-payg/default.py create mode 100755 gcp/deployment-packages/single-payg/images.py create mode 100755 gcp/deployment-packages/single-payg/password.py create mode 100644 terraform/.gitattributes create mode 100644 terraform/.gitignore create mode 100644 terraform/LICENSE create mode 100755 terraform/alicloud/cluster-master/README.md create mode 100755 terraform/alicloud/cluster-master/locals.tf create mode 100755 terraform/alicloud/cluster-master/main.tf create mode 100755 terraform/alicloud/cluster-master/output.tf create mode 100755 terraform/alicloud/cluster-master/terraform.tfvars create mode 100755 terraform/alicloud/cluster-master/variables.tf create mode 100755 terraform/alicloud/cluster-master/versions.tf create mode 100755 terraform/alicloud/cluster/README.md create mode 100644 terraform/alicloud/cluster/cluster_member_a_userdata.yaml create mode 100644 terraform/alicloud/cluster/cluster_member_b_userdata.yaml create mode 100755 terraform/alicloud/cluster/locals.tf create mode 100755 terraform/alicloud/cluster/main.tf create mode 100755 terraform/alicloud/cluster/output.tf create mode 100755 terraform/alicloud/cluster/terraform.tfvars create mode 100755 terraform/alicloud/cluster/variables.tf create mode 100755 terraform/alicloud/cluster/versions.tf create mode 100755 terraform/alicloud/gateway-master/README.md create mode 100755 terraform/alicloud/gateway-master/locals.tf create mode 100755 terraform/alicloud/gateway-master/main.tf create mode 100755 terraform/alicloud/gateway-master/output.tf create mode 100755 terraform/alicloud/gateway-master/terraform.tfvars create mode 100755 terraform/alicloud/gateway-master/variables.tf create mode 100755 terraform/alicloud/gateway-master/versions.tf create mode 100755 terraform/alicloud/gateway/README.md create mode 100755 terraform/alicloud/gateway/locals.tf create mode 100755 terraform/alicloud/gateway/main.tf create mode 100755 terraform/alicloud/gateway/output.tf create mode 100755 terraform/alicloud/gateway/terraform.tfvars create mode 100755 terraform/alicloud/gateway/variables.tf create mode 100755 terraform/alicloud/gateway/versions.tf create mode 100755 terraform/alicloud/management-master/README.md create mode 100755 terraform/alicloud/management-master/locals.tf create mode 100755 terraform/alicloud/management-master/main.tf create mode 100755 terraform/alicloud/management-master/output.tf create mode 100755 terraform/alicloud/management-master/terraform.tfvars create mode 100755 terraform/alicloud/management-master/variables.tf create mode 100755 terraform/alicloud/management-master/versions.tf create mode 100755 terraform/alicloud/management/README.md create mode 100755 terraform/alicloud/management/locals.tf create mode 100755 terraform/alicloud/management/main.tf create mode 100644 terraform/alicloud/management/management_userdata.yaml create mode 100755 terraform/alicloud/management/output.tf create mode 100755 terraform/alicloud/management/terraform.tfvars create mode 100755 terraform/alicloud/management/variables.tf create mode 100755 terraform/alicloud/management/versions.tf create mode 100755 terraform/alicloud/modules/cluster-ram-role/locals.tf create mode 100755 terraform/alicloud/modules/cluster-ram-role/main.tf create mode 100755 terraform/alicloud/modules/cluster-ram-role/output.tf create mode 100755 terraform/alicloud/modules/cluster-ram-role/variables.tf create mode 100755 terraform/alicloud/modules/cluster-ram-role/versions.tf create mode 100755 terraform/alicloud/modules/common/elastic_ip/locals.tf create mode 100755 terraform/alicloud/modules/common/elastic_ip/main.tf create mode 100755 terraform/alicloud/modules/common/elastic_ip/output.tf create mode 100755 terraform/alicloud/modules/common/elastic_ip/variables.tf create mode 100755 terraform/alicloud/modules/common/elastic_ip/versions.tf create mode 100644 terraform/alicloud/modules/common/gateway_instance/gateway_userdata.yaml create mode 100755 terraform/alicloud/modules/common/gateway_instance/locals.tf create mode 100755 terraform/alicloud/modules/common/gateway_instance/main.tf create mode 100755 terraform/alicloud/modules/common/gateway_instance/output.tf create mode 100755 terraform/alicloud/modules/common/gateway_instance/variables.tf create mode 100755 terraform/alicloud/modules/common/gateway_instance/versions.tf create mode 100755 terraform/alicloud/modules/common/instance_type/main.tf create mode 100755 terraform/alicloud/modules/common/instance_type/variables.tf create mode 100755 terraform/alicloud/modules/common/instance_type/versions.tf create mode 100755 terraform/alicloud/modules/common/internal_default_route/locals.tf create mode 100755 terraform/alicloud/modules/common/internal_default_route/main.tf create mode 100755 terraform/alicloud/modules/common/internal_default_route/output.tf create mode 100755 terraform/alicloud/modules/common/internal_default_route/variables.tf create mode 100755 terraform/alicloud/modules/common/internal_default_route/versions.tf create mode 100755 terraform/alicloud/modules/common/permissive_sg/main.tf create mode 100755 terraform/alicloud/modules/common/permissive_sg/output.tf create mode 100755 terraform/alicloud/modules/common/permissive_sg/variables.tf create mode 100755 terraform/alicloud/modules/common/permissive_sg/versions.tf create mode 100755 terraform/alicloud/modules/common/version_license/main.tf create mode 100755 terraform/alicloud/modules/common/version_license/variables.tf create mode 100755 terraform/alicloud/modules/common/version_license/versions.tf create mode 100755 terraform/alicloud/modules/images/images.yaml create mode 100755 terraform/alicloud/modules/images/main.tf create mode 100755 terraform/alicloud/modules/images/output.tf create mode 100755 terraform/alicloud/modules/images/variables.tf create mode 100755 terraform/alicloud/modules/images/versions.tf create mode 100755 terraform/alicloud/modules/vpc/locals.tf create mode 100755 terraform/alicloud/modules/vpc/main.tf create mode 100755 terraform/alicloud/modules/vpc/output.tf create mode 100755 terraform/alicloud/modules/vpc/variables.tf create mode 100755 terraform/alicloud/modules/vpc/versions.tf create mode 100644 terraform/aws/README.md create mode 100755 terraform/aws/autoscale-gwlb/README.md create mode 100755 terraform/aws/autoscale-gwlb/asg_userdata.yaml create mode 100755 terraform/aws/autoscale-gwlb/locals.tf create mode 100755 terraform/aws/autoscale-gwlb/main.tf create mode 100755 terraform/aws/autoscale-gwlb/output.tf create mode 100755 terraform/aws/autoscale-gwlb/terraform.tfvars create mode 100644 terraform/aws/autoscale-gwlb/variables.tf create mode 100755 terraform/aws/autoscale-gwlb/versions.tf create mode 100755 terraform/aws/autoscale/README.md create mode 100755 terraform/aws/autoscale/asg_userdata.yaml create mode 100755 terraform/aws/autoscale/locals.tf create mode 100755 terraform/aws/autoscale/main.tf create mode 100755 terraform/aws/autoscale/output.tf create mode 100755 terraform/aws/autoscale/terraform.tfvars create mode 100755 terraform/aws/autoscale/variables.tf create mode 100755 terraform/aws/autoscale/versions.tf create mode 100755 terraform/aws/cluster-master/README.md create mode 100755 terraform/aws/cluster-master/locals.tf create mode 100755 terraform/aws/cluster-master/main.tf create mode 100755 terraform/aws/cluster-master/output.tf create mode 100755 terraform/aws/cluster-master/terraform.tfvars create mode 100755 terraform/aws/cluster-master/variables.tf create mode 100755 terraform/aws/cluster-master/versions.tf create mode 100755 terraform/aws/cluster/README.md create mode 100755 terraform/aws/cluster/cluster_member_a_userdata.yaml create mode 100755 terraform/aws/cluster/cluster_member_b_userdata.yaml create mode 100755 terraform/aws/cluster/locals.tf create mode 100755 terraform/aws/cluster/main.tf create mode 100755 terraform/aws/cluster/output.tf create mode 100755 terraform/aws/cluster/terraform.tfvars create mode 100755 terraform/aws/cluster/variables.tf create mode 100755 terraform/aws/cluster/versions.tf create mode 100644 terraform/aws/cme-iam-role-gwlb/README.md create mode 100644 terraform/aws/cme-iam-role-gwlb/main.tf create mode 100644 terraform/aws/cme-iam-role-gwlb/output.tf create mode 100644 terraform/aws/cme-iam-role-gwlb/terraform.tfvars create mode 100644 terraform/aws/cme-iam-role-gwlb/variables.tf create mode 100644 terraform/aws/cme-iam-role-gwlb/versions.tf create mode 100755 terraform/aws/cme-iam-role/README.md create mode 100755 terraform/aws/cme-iam-role/main.tf create mode 100755 terraform/aws/cme-iam-role/output.tf create mode 100755 terraform/aws/cme-iam-role/terraform.tfvars create mode 100755 terraform/aws/cme-iam-role/variables.tf create mode 100755 terraform/aws/cme-iam-role/versions.tf create mode 100755 terraform/aws/cross-az-cluster-master/README.md create mode 100755 terraform/aws/cross-az-cluster-master/locals.tf create mode 100755 terraform/aws/cross-az-cluster-master/main.tf create mode 100755 terraform/aws/cross-az-cluster-master/output.tf create mode 100755 terraform/aws/cross-az-cluster-master/terraform.tfvars create mode 100755 terraform/aws/cross-az-cluster-master/variables.tf create mode 100755 terraform/aws/cross-az-cluster-master/versions.tf create mode 100755 terraform/aws/cross-az-cluster/README.md create mode 100755 terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml create mode 100755 terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml create mode 100755 terraform/aws/cross-az-cluster/locals.tf create mode 100755 terraform/aws/cross-az-cluster/main.tf create mode 100755 terraform/aws/cross-az-cluster/output.tf create mode 100755 terraform/aws/cross-az-cluster/terraform.tfvars create mode 100755 terraform/aws/cross-az-cluster/variables.tf create mode 100755 terraform/aws/cross-az-cluster/versions.tf create mode 100755 terraform/aws/gateway-master/README.md create mode 100755 terraform/aws/gateway-master/locals.tf create mode 100755 terraform/aws/gateway-master/main.tf create mode 100755 terraform/aws/gateway-master/output.tf create mode 100755 terraform/aws/gateway-master/terraform.tfvars create mode 100755 terraform/aws/gateway-master/variables.tf create mode 100755 terraform/aws/gateway-master/versions.tf create mode 100755 terraform/aws/gateway/README.md create mode 100755 terraform/aws/gateway/locals.tf create mode 100755 terraform/aws/gateway/main.tf create mode 100755 terraform/aws/gateway/output.tf create mode 100755 terraform/aws/gateway/terraform.tfvars create mode 100755 terraform/aws/gateway/variables.tf create mode 100755 terraform/aws/gateway/versions.tf create mode 100755 terraform/aws/gwlb-master/README.md create mode 100755 terraform/aws/gwlb-master/locals.tf create mode 100755 terraform/aws/gwlb-master/main.tf create mode 100755 terraform/aws/gwlb-master/output.tf create mode 100755 terraform/aws/gwlb-master/terraform.tfvars create mode 100755 terraform/aws/gwlb-master/variables.tf create mode 100755 terraform/aws/gwlb-master/versions.tf create mode 100755 terraform/aws/gwlb/README.md create mode 100755 terraform/aws/gwlb/locals.tf create mode 100755 terraform/aws/gwlb/main.tf create mode 100755 terraform/aws/gwlb/output.tf create mode 100755 terraform/aws/gwlb/terraform.tfvars create mode 100755 terraform/aws/gwlb/variables.tf create mode 100755 terraform/aws/gwlb/versions.tf create mode 100755 terraform/aws/management/README.md create mode 100755 terraform/aws/management/locals.tf create mode 100755 terraform/aws/management/main.tf create mode 100755 terraform/aws/management/management_userdata.yaml create mode 100755 terraform/aws/management/output.tf create mode 100755 terraform/aws/management/terraform.tfvars create mode 100755 terraform/aws/management/variables.tf create mode 100755 terraform/aws/management/versions.tf create mode 100755 terraform/aws/mds/README.md create mode 100755 terraform/aws/mds/locals.tf create mode 100755 terraform/aws/mds/main.tf create mode 100755 terraform/aws/mds/mds_userdata.yaml create mode 100755 terraform/aws/mds/output.tf create mode 100755 terraform/aws/mds/terraform.tfvars create mode 100755 terraform/aws/mds/variables.tf create mode 100755 terraform/aws/mds/versions.tf create mode 100644 terraform/aws/modules/amis/main.tf create mode 100644 terraform/aws/modules/amis/output.tf create mode 100644 terraform/aws/modules/amis/variables.tf create mode 100755 terraform/aws/modules/cloudwatch-policy/main.tf create mode 100755 terraform/aws/modules/cloudwatch-policy/variables.tf create mode 100755 terraform/aws/modules/cluster-iam-role/main.tf create mode 100755 terraform/aws/modules/cluster-iam-role/output.tf create mode 100755 terraform/aws/modules/common/elastic_ip/locals.tf create mode 100755 terraform/aws/modules/common/elastic_ip/main.tf create mode 100755 terraform/aws/modules/common/elastic_ip/output.tf create mode 100755 terraform/aws/modules/common/elastic_ip/variables.tf create mode 100755 terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml create mode 100755 terraform/aws/modules/common/gateway_instance/locals.tf create mode 100755 terraform/aws/modules/common/gateway_instance/main.tf create mode 100755 terraform/aws/modules/common/gateway_instance/output.tf create mode 100755 terraform/aws/modules/common/gateway_instance/variables.tf create mode 100755 terraform/aws/modules/common/instance_type/main.tf create mode 100755 terraform/aws/modules/common/instance_type/variables.tf create mode 100755 terraform/aws/modules/common/internal_default_route/locals.tf create mode 100755 terraform/aws/modules/common/internal_default_route/main.tf create mode 100755 terraform/aws/modules/common/internal_default_route/output.tf create mode 100755 terraform/aws/modules/common/internal_default_route/variables.tf create mode 100755 terraform/aws/modules/common/load_balancer/main.tf create mode 100755 terraform/aws/modules/common/load_balancer/output.tf create mode 100755 terraform/aws/modules/common/load_balancer/variables.tf create mode 100755 terraform/aws/modules/common/permissive_sg/main.tf create mode 100755 terraform/aws/modules/common/permissive_sg/output.tf create mode 100755 terraform/aws/modules/common/permissive_sg/variables.tf create mode 100755 terraform/aws/modules/common/version_license/main.tf create mode 100755 terraform/aws/modules/common/version_license/variables.tf create mode 100755 terraform/aws/modules/custom-autoscale/locals.tf create mode 100755 terraform/aws/modules/custom-autoscale/main.tf create mode 100755 terraform/aws/modules/custom-autoscale/variables.tf create mode 100644 terraform/aws/modules/custom-autoscale/vpc/main.tf create mode 100644 terraform/aws/modules/custom-autoscale/vpc/output.tf create mode 100644 terraform/aws/modules/custom-autoscale/vpc/variables.tf create mode 100755 terraform/aws/modules/vpc/main.tf create mode 100755 terraform/aws/modules/vpc/output.tf create mode 100755 terraform/aws/modules/vpc/variables.tf create mode 100755 terraform/aws/qs-autoscale-master/README.md create mode 100755 terraform/aws/qs-autoscale-master/locals.tf create mode 100755 terraform/aws/qs-autoscale-master/main.tf create mode 100755 terraform/aws/qs-autoscale-master/output.tf create mode 100755 terraform/aws/qs-autoscale-master/terraform.tfvars create mode 100755 terraform/aws/qs-autoscale-master/variables.tf create mode 100755 terraform/aws/qs-autoscale-master/versions.tf create mode 100755 terraform/aws/qs-autoscale/README.md create mode 100755 terraform/aws/qs-autoscale/locals.tf create mode 100755 terraform/aws/qs-autoscale/main.tf create mode 100755 terraform/aws/qs-autoscale/output.tf create mode 100755 terraform/aws/qs-autoscale/terraform.tfvars create mode 100755 terraform/aws/qs-autoscale/variables.tf create mode 100755 terraform/aws/qs-autoscale/versions.tf create mode 100755 terraform/aws/standalone-master/README.md create mode 100755 terraform/aws/standalone-master/locals.tf create mode 100755 terraform/aws/standalone-master/main.tf create mode 100755 terraform/aws/standalone-master/output.tf create mode 100755 terraform/aws/standalone-master/terraform.tfvars create mode 100755 terraform/aws/standalone-master/variables.tf create mode 100755 terraform/aws/standalone-master/versions.tf create mode 100755 terraform/aws/standalone/README.md create mode 100755 terraform/aws/standalone/locals.tf create mode 100755 terraform/aws/standalone/main.tf create mode 100755 terraform/aws/standalone/output.tf create mode 100755 terraform/aws/standalone/standalone_userdata.yaml create mode 100755 terraform/aws/standalone/terraform.tfvars create mode 100755 terraform/aws/standalone/variables.tf create mode 100755 terraform/aws/standalone/versions.tf create mode 100644 terraform/aws/tap/Check Point NOW onboarding page.docx create mode 100644 terraform/aws/tap/CheckPoint_NOW_onboarding_page.pdf create mode 100644 terraform/aws/tap/README.md create mode 100644 terraform/aws/tap/main.tf create mode 100644 terraform/aws/tap/output.tf create mode 100644 terraform/aws/tap/tap_lambda.py create mode 100644 terraform/aws/tap/tap_termination_lambda.py create mode 100644 terraform/aws/tap/tap_user_data.sh create mode 100644 terraform/aws/tap/terraform.tfvars create mode 100644 terraform/aws/tap/variables.tf create mode 100755 terraform/aws/tgw-asg-master/README.md create mode 100755 terraform/aws/tgw-asg-master/locals.tf create mode 100755 terraform/aws/tgw-asg-master/main.tf create mode 100755 terraform/aws/tgw-asg-master/output.tf create mode 100755 terraform/aws/tgw-asg-master/terraform.tfvars create mode 100755 terraform/aws/tgw-asg-master/variables.tf create mode 100755 terraform/aws/tgw-asg-master/versions.tf create mode 100755 terraform/aws/tgw-asg/README.md create mode 100755 terraform/aws/tgw-asg/locals.tf create mode 100755 terraform/aws/tgw-asg/main.tf create mode 100755 terraform/aws/tgw-asg/output.tf create mode 100755 terraform/aws/tgw-asg/terraform.tfvars create mode 100755 terraform/aws/tgw-asg/variables.tf create mode 100755 terraform/aws/tgw-asg/versions.tf create mode 100755 terraform/aws/tgw-cross-az-cluster-master/README.md create mode 100755 terraform/aws/tgw-cross-az-cluster-master/locals.tf create mode 100755 terraform/aws/tgw-cross-az-cluster-master/main.tf create mode 100755 terraform/aws/tgw-cross-az-cluster-master/output.tf create mode 100755 terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars create mode 100755 terraform/aws/tgw-cross-az-cluster-master/variables.tf create mode 100755 terraform/aws/tgw-cross-az-cluster-master/versions.tf create mode 100755 terraform/aws/tgw-cross-az-cluster/README.md create mode 100755 terraform/aws/tgw-cross-az-cluster/locals.tf create mode 100755 terraform/aws/tgw-cross-az-cluster/main.tf create mode 100755 terraform/aws/tgw-cross-az-cluster/output.tf create mode 100755 terraform/aws/tgw-cross-az-cluster/terraform.tfvars create mode 100755 terraform/aws/tgw-cross-az-cluster/variables.tf create mode 100755 terraform/aws/tgw-cross-az-cluster/versions.tf create mode 100755 terraform/aws/tgw-gwlb-master/README.md create mode 100755 terraform/aws/tgw-gwlb-master/locals.tf create mode 100755 terraform/aws/tgw-gwlb-master/main.tf create mode 100755 terraform/aws/tgw-gwlb-master/output.tf create mode 100755 terraform/aws/tgw-gwlb-master/terraform.tfvars create mode 100755 terraform/aws/tgw-gwlb-master/variables.tf create mode 100755 terraform/aws/tgw-gwlb-master/versions.tf create mode 100755 terraform/aws/tgw-gwlb/README.md create mode 100755 terraform/aws/tgw-gwlb/locals.tf create mode 100755 terraform/aws/tgw-gwlb/main.tf create mode 100755 terraform/aws/tgw-gwlb/output.tf create mode 100755 terraform/aws/tgw-gwlb/terraform.tfvars create mode 100755 terraform/aws/tgw-gwlb/variables.tf create mode 100755 terraform/aws/tgw-gwlb/versions.tf create mode 100755 terraform/azure/README.md create mode 100755 terraform/azure/high-availability-existing-vnet/README.md create mode 100755 terraform/azure/high-availability-existing-vnet/azure_public_key create mode 100755 terraform/azure/high-availability-existing-vnet/cloud-init.sh create mode 100755 terraform/azure/high-availability-existing-vnet/main.tf create mode 100755 terraform/azure/high-availability-existing-vnet/terraform.tfvars create mode 100755 terraform/azure/high-availability-existing-vnet/variables.tf create mode 100755 terraform/azure/high-availability-existing-vnet/versions.tf create mode 100755 terraform/azure/high-availability-new-vnet/README.md create mode 100755 terraform/azure/high-availability-new-vnet/azure_public_key create mode 100755 terraform/azure/high-availability-new-vnet/cloud-init.sh create mode 100755 terraform/azure/high-availability-new-vnet/main.tf create mode 100755 terraform/azure/high-availability-new-vnet/terraform.tfvars create mode 100755 terraform/azure/high-availability-new-vnet/variables.tf create mode 100755 terraform/azure/high-availability-new-vnet/versions.tf create mode 100755 terraform/azure/management-existing-vnet/README.md create mode 100755 terraform/azure/management-existing-vnet/azure_public_key create mode 100755 terraform/azure/management-existing-vnet/cloud-init.sh create mode 100755 terraform/azure/management-existing-vnet/main.tf create mode 100755 terraform/azure/management-existing-vnet/terraform.tfvars create mode 100755 terraform/azure/management-existing-vnet/variables.tf create mode 100755 terraform/azure/management-existing-vnet/versions.tf create mode 100755 terraform/azure/management-new-vnet/README.md create mode 100755 terraform/azure/management-new-vnet/azure_public_key create mode 100755 terraform/azure/management-new-vnet/cloud-init.sh create mode 100755 terraform/azure/management-new-vnet/main.tf create mode 100755 terraform/azure/management-new-vnet/terraform.tfvars create mode 100755 terraform/azure/management-new-vnet/variables.tf create mode 100755 terraform/azure/management-new-vnet/versions.tf create mode 100755 terraform/azure/mds-existing-vnet/README.md create mode 100644 terraform/azure/mds-existing-vnet/azure_public_key create mode 100755 terraform/azure/mds-existing-vnet/cloud-init.sh create mode 100755 terraform/azure/mds-existing-vnet/main.tf create mode 100755 terraform/azure/mds-existing-vnet/terraform.tfvars create mode 100755 terraform/azure/mds-existing-vnet/variables.tf create mode 100755 terraform/azure/mds-existing-vnet/versions.tf create mode 100755 terraform/azure/mds-new-vnet/README.md create mode 100644 terraform/azure/mds-new-vnet/azure_public_key create mode 100755 terraform/azure/mds-new-vnet/cloud-init.sh create mode 100755 terraform/azure/mds-new-vnet/main.tf create mode 100755 terraform/azure/mds-new-vnet/terraform.tfvars create mode 100755 terraform/azure/mds-new-vnet/variables.tf create mode 100755 terraform/azure/mds-new-vnet/versions.tf create mode 100644 terraform/azure/modules/add-routing-intent.py create mode 100755 terraform/azure/modules/common/main.tf create mode 100755 terraform/azure/modules/common/outputs.tf create mode 100755 terraform/azure/modules/common/variables.tf create mode 100755 terraform/azure/modules/common/versions.tf create mode 100755 terraform/azure/modules/network-security-group/main.tf create mode 100755 terraform/azure/modules/network-security-group/output.tf create mode 100755 terraform/azure/modules/network-security-group/variables.tf create mode 100755 terraform/azure/modules/network-security-group/versions.tf create mode 100755 terraform/azure/modules/vnet/main.tf create mode 100755 terraform/azure/modules/vnet/outputs.tf create mode 100755 terraform/azure/modules/vnet/variables.tf create mode 100755 terraform/azure/modules/vnet/versions.tf create mode 100644 terraform/azure/nva-into-existing-hub/README.md create mode 100644 terraform/azure/nva-into-existing-hub/main.tf create mode 100644 terraform/azure/nva-into-existing-hub/terraform.tfvars create mode 100644 terraform/azure/nva-into-existing-hub/variables.tf create mode 100644 terraform/azure/nva-into-existing-hub/versions.tf create mode 100644 terraform/azure/nva-into-new-vwan/README.md create mode 100644 terraform/azure/nva-into-new-vwan/main.tf create mode 100644 terraform/azure/nva-into-new-vwan/terraform.tfvars create mode 100644 terraform/azure/nva-into-new-vwan/variables.tf create mode 100644 terraform/azure/nva-into-new-vwan/versions.tf create mode 100755 terraform/azure/single-gateway-existing-vnet/README.md create mode 100644 terraform/azure/single-gateway-existing-vnet/azure_public_key create mode 100755 terraform/azure/single-gateway-existing-vnet/cloud-init.sh create mode 100755 terraform/azure/single-gateway-existing-vnet/main.tf create mode 100755 terraform/azure/single-gateway-existing-vnet/terraform.tfvars create mode 100755 terraform/azure/single-gateway-existing-vnet/variables.tf create mode 100755 terraform/azure/single-gateway-existing-vnet/versions.tf create mode 100755 terraform/azure/single-gateway-new-vnet/README.md create mode 100644 terraform/azure/single-gateway-new-vnet/azure_public_key create mode 100755 terraform/azure/single-gateway-new-vnet/cloud-init.sh create mode 100755 terraform/azure/single-gateway-new-vnet/main.tf create mode 100755 terraform/azure/single-gateway-new-vnet/terraform.tfvars create mode 100755 terraform/azure/single-gateway-new-vnet/variables.tf create mode 100755 terraform/azure/single-gateway-new-vnet/versions.tf create mode 100755 terraform/azure/vmss-existing-vnet/README.md create mode 100755 terraform/azure/vmss-existing-vnet/azure_public_key create mode 100755 terraform/azure/vmss-existing-vnet/cloud-init.sh create mode 100755 terraform/azure/vmss-existing-vnet/main.tf create mode 100755 terraform/azure/vmss-existing-vnet/terraform.tfvars create mode 100755 terraform/azure/vmss-existing-vnet/variables.tf create mode 100644 terraform/azure/vmss-existing-vnet/versions.tf create mode 100755 terraform/azure/vmss-new-vnet/README.md create mode 100755 terraform/azure/vmss-new-vnet/azure_public_key create mode 100755 terraform/azure/vmss-new-vnet/cloud-init.sh create mode 100755 terraform/azure/vmss-new-vnet/main.tf create mode 100755 terraform/azure/vmss-new-vnet/terraform.tfvars create mode 100755 terraform/azure/vmss-new-vnet/variables.tf create mode 100644 terraform/azure/vmss-new-vnet/versions.tf create mode 100755 terraform/gcp/README.md create mode 100755 terraform/gcp/autoscale-into-existing-vpc/README.md create mode 100755 terraform/gcp/autoscale-into-existing-vpc/locals.tf create mode 100755 terraform/gcp/autoscale-into-existing-vpc/main.tf create mode 100755 terraform/gcp/autoscale-into-existing-vpc/output.tf create mode 100755 terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars create mode 100755 terraform/gcp/autoscale-into-existing-vpc/variables.tf create mode 100755 terraform/gcp/autoscale-into-new-vpc/README.md create mode 100755 terraform/gcp/autoscale-into-new-vpc/locals.tf create mode 100755 terraform/gcp/autoscale-into-new-vpc/main.tf create mode 100755 terraform/gcp/autoscale-into-new-vpc/output.tf create mode 100755 terraform/gcp/autoscale-into-new-vpc/terraform.tfvars create mode 100755 terraform/gcp/autoscale-into-new-vpc/variables.tf create mode 100755 terraform/gcp/common/cluster-member/main.tf create mode 100755 terraform/gcp/common/cluster-member/output.tf create mode 100755 terraform/gcp/common/cluster-member/variables.tf create mode 100755 terraform/gcp/common/firewall-rule/main.tf create mode 100755 terraform/gcp/common/firewall-rule/output.tf create mode 100755 terraform/gcp/common/firewall-rule/variables.tf create mode 100755 terraform/gcp/common/members-a-b/main.tf create mode 100755 terraform/gcp/common/members-a-b/output.tf create mode 100755 terraform/gcp/common/members-a-b/variables.tf create mode 100755 terraform/gcp/common/network-and-subnet/main.tf create mode 100755 terraform/gcp/common/network-and-subnet/output.tf create mode 100755 terraform/gcp/common/network-and-subnet/variables.tf create mode 100755 terraform/gcp/common/startup-script.sh create mode 100755 terraform/gcp/high-availability/README.md create mode 100755 terraform/gcp/high-availability/locals.tf create mode 100755 terraform/gcp/high-availability/main.tf create mode 100755 terraform/gcp/high-availability/output.tf create mode 100755 terraform/gcp/high-availability/terraform.tfvars create mode 100755 terraform/gcp/high-availability/variables.tf create mode 100755 terraform/gcp/single-into-existing-vpc/README.md create mode 100755 terraform/gcp/single-into-existing-vpc/locals.tf create mode 100755 terraform/gcp/single-into-existing-vpc/main.tf create mode 100755 terraform/gcp/single-into-existing-vpc/output.tf create mode 100755 terraform/gcp/single-into-existing-vpc/terraform.tfvars create mode 100755 terraform/gcp/single-into-existing-vpc/variables.tf create mode 100644 terraform/gcp/single-into-new-vpc/README.md create mode 100644 terraform/gcp/single-into-new-vpc/main.tf create mode 100644 terraform/gcp/single-into-new-vpc/output.tf create mode 100644 terraform/gcp/single-into-new-vpc/terraform.tfvars create mode 100644 terraform/gcp/single-into-new-vpc/variables.tf diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml new file mode 100644 index 00000000..527a9415 --- /dev/null +++ b/.github/workflows/code-analysis.yaml @@ -0,0 +1,10 @@ +name: Secure Code Analysis + +on: + - push + - pull_request + +jobs: + code-analysis: + uses: CheckPointSW/secure-code-workflow/.github/workflows/code-analysis.yml@latest + secrets: inherit diff --git a/.gitignore b/.gitignore new file mode 100755 index 00000000..b19ec88e --- /dev/null +++ b/.gitignore @@ -0,0 +1,140 @@ +.idea/ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +BUILD/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..70d47f9e --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Check Point CloudGuard Network Repository Overview +Check Point CloudGuard Network (formerly known as CloudGuard IaaS) repository. + +The repository contains: + +* Solution/CloudFormation templates +* Terraform modules +* Tools and scripts that can be used with CloudGuard for Public Cloud solutions +* Deprecated Solution/CloudFormation templates +* Community-supported content + +## Related Products and Solutions +* CloudGuard Network Security for Azure +* CloudGuard Network Security for AWS +* CloudGuard Network Security for GCP +* CloudGuard Network Security for AliCloud +* CloudGuard Network Security for Azure Stack + +## References +* For more information about Check Point CloudGuard for Public Cloud, see https://www.checkpoint.com/products/iaas-public-cloud-security/ +* CloudGuard documentation is available at https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk132552& +* CloudGuard Network CheckMates community is available at https://community.checkpoint.com/t5/CloudGuard-IaaS/bd-p/cloudguard-iaas diff --git a/aws/images/launch.png b/aws/images/launch.png new file mode 100755 index 0000000000000000000000000000000000000000..b16d779c493cfdac15923f3114ba94d01bf98999 GIT binary patch literal 2941 zcmV-@3xf2CP)004&&004{<00AEV003vB002H&00Br#000h50000B=O+L10005n zX+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHy;%bk$G_W^)-PS50WJ!Ba@scL5yTRrMFE7>J3iZ#h|3MEudGkN;2U76tA0Zyq@7uVVMS5rl zX7b6rnY@`dFF^a)?R%RuSAjG$I@nm1r_Y|t+$YSVg=@Hv>tR$D-sYn%P+Wg)CGb5D z|D*-{_-ZY1ddsfkd@>&u+VC@rE~$?X8T>a+w1kZ67KHGIJ6Y4N~QNydDF%rI|f8GqE6UI8s_UZA^;fh?Kg0rN)d*d_WUwG7RQBFQT zIGBzCegmpPnW^$|xPAZt010qNS#tmY3labT3lag+-G2N400|9AL_t(&L+zV?P*p_~ z$KOm%jYU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5DvgQ=gf~na`3$N9WW$^&@CK>{2TQ``F zJn8#JxdDNN2|Zq`OYPhXIYs0YlF&69;XTq@jcG~)3+7H^@!0+^3=au-qFh*7)*%Gft}b6G3UjQZbrJc^<6(XvF|NW;-hI1pHv&;^qO zmb0ixlZb#%JQqf0S{wWkJafs|H?0`MIsvx72f|+@qVk@?F?<2MP?R7iu!RYIo>=bN z7iA4iQX6cXQHF3}7tvu-S##f5ipgBcOPAkYB;s$PVHle~jp`RA(2Larc|(mr9XzFB zpA;rE!I+xBxSBu=W}RDR+~6u69O_pYn1vvsrNwEqxoiMGMmj-#n9yKr!5Kk)hc8m}Nh?uAr`{FjG(sO+9T5%)>UUvs ngnya({{|0K82{jZnM(9G9lJ2&?EU>R00000NkvXXu0mjfzX_8$ literal 0 HcmV?d00001 diff --git a/aws/images/step1_aws.png b/aws/images/step1_aws.png new file mode 100755 index 0000000000000000000000000000000000000000..a626c70530cbb151a9e99b2f236223c15265278a GIT binary patch literal 29773 zcmeFYd0dj||32DGGdc4qb!IA4b8D>3$u)OT$#KdpwY1!oa!nD<1vdny@ss9~nz&ZFq?kN8+)qm~UwM*XF={L_^yY|Q)UnhUJNA}85faV+7pRW=<9e>@08B<%7 z9efjM?`FSiS4-hu@s)37$KPLb@=M&cOQHYs<113!qp)4O5@(%%v%i=cyt0#b2L!GD zxU+qziud+0yj8Ks9rC2+$-+el?`7KAd(n+Hu%toHh>QchKX=L{<+)$Wzj@_{e66od z9`)Z;ws?8zyvl(ezPbLxPrv^9tHIHuN51dcb>!&Wuj4sg#oru<+C{>tY$}n7r7o=| zb>CV2lzyr2L`|?*Ax01 z2G1BT%6RzLqHG}TPCZGQIzPJ2a_qdVT;D61=CW$BJ>~@X;#}v3NcxjBV`15MZDE_D zaS7{|cajKCJC{b7xBTa-zo)-bMlYwE#r7tr_b&9b%|4I|&L=Gp4-}I9ezIT)JbR1P zkv4mDQ-W$|Y7W;L#=17XX&)S_>`WhT>IB2-S9&H%nybUHylq=Z1E52G!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C2c^b|~cFU`mk%#m70 zg1a~3tf~$v7VAWL*Mtb2Ma5CyBbfk_qA{P=hod}$l_)r<$`_TPZYmNzaSLWN0tSm) zZ>8OW`NF?y_5=Q&Wb!R;1=iX-7*$g&ro7)tumgd_zp8G7qQ~B+S4W32*FuO&vJ=-p z%-*4)S30P<`T`HWvQm(z_vBfaS0;3&=4sEgL+-ptIZR1v*fvWBO)L0M=ipNb7ph># z2_r!d%yz{~&>x?Vy+(z`C#57D>OH50fLkt*B&MyX^#?Bv&Qm6_2==CWxOFlgD7qxm zQg0aqa-l!kS^XyC0IR{9bG>_^bfRH153dbQMS)ikVS)YTH(f@q5^0qctMOl`*aBuC zMgEtE(Z$!Hq@zdF!`>dFwauXjD*|DS&RE^5xG}L8_l!8fd z0>3H5;fLGVmielDUqy6638M~-f6sA+*Waa|n%i@NWFD+EW*9xmk9&v2VoFxy14tXm zUtY|$B$eAcV1BLHt{2uV5~zv4b*2SD%e<*KYhmfIet3(BWZ6zk*GpGQzk&Yep*T@6 zIOjR>d(#Ju9dhb*ik3F&I9|2hU$TFtrhPXR--+Z^%0HP&HJF@wU*efSi4*enX>zc| zG8eJL2Kl3ad6EiWp*uUUXm0j;=eNu zL3!1(*<5Y4Tai?J=#GHly4>AopCijMJ+r}kkw<~3$$iRLDi6-*J>Gmcq%yqfiugLn{?h+I_#>}EATOadf~;~ z)fq*qQ+rbZ&SVKrr#R;AJuqQ~mAyokWs5{DXndhF*szrVx0S~!=7qyXW>d-ME&|(k zZ@DLjJ}^-tF0ns+g7lT0cDycuKr)?-rN>uIus@`Mkp8_N=k;=JiVL%c_v&f{Bg{9k z%4}(cHl1cb2)u8nVH)PZ(6|<*z-O{J)}xt|{S@op71m0NdY0g#fUD`O+m7T + + + Description + Notes + Direct Launch + + + + + + Deploys and configures the Security Gateways as an AWS Auto Scaling group.

For more details, refer to the
CloudGuard Network Auto Scaling for AWS R80.20 and Higher Deployment Guide . + + Deploys an Auto Scaling group of Security Gateways into an existing VPC. + + + + +
+
\ No newline at end of file diff --git a/aws/templates/asg/autoscale.yaml b/aws/templates/asg/autoscale.yaml new file mode 100644 index 00000000..15e36d55 --- /dev/null +++ b/aws/templates/asg/autoscale.yaml @@ -0,0 +1,607 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Create an Auto Scaling group of Check Point gateways (20240417) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - GatewaysSubnets + - Label: + default: EC2 Instances Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - VolumeSize + - VolumeType + - EnableVolumeEncryption + - EnableInstanceConnect + - Label: + default: Auto Scaling Configuration + Parameters: + - GatewaysMinSize + - GatewaysMaxSize + - AdminEmail + - GatewaysTargetGroups + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - Label: + default: Automatic Provisioning with Security Management Server Settings + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + - Label: + default: Proxy Configuration (optional) + Parameters: + - ELBType + - ELBPort + - ELBClients + ParameterLabels: + VPC: + default: VPC + GatewaysSubnets: + default: Gateways subnets + GatewayName: + default: Gateways name + GatewayInstanceType: + default: Gateways instance type + KeyName: + default: Key name + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableVolumeEncryption: + default: Enable volume encryption + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewaysMinSize: + default: Minimum Gateway group size + GatewaysMaxSize: + default: Maximum Gateway group size + AdminEmail: + default: Email address + GatewaysTargetGroups: + default: Gateways target groups + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Gateways bootstrap script + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + ELBType: + default: Proxy type + ELBPort: + default: Proxy port + ELBClients: + default: Allowed proxy clients +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + GatewaysSubnets: + Description: Select at least 2 public subnets in the VPC. + Type: List + MinLength: 2 + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The instance type of the Secutiry Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableVolumeEncryption: + Description: Encrypt Auto Scaling instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewaysMinSize: + Description: The minimal number of gateways in the Auto Scaling group. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of gateways in the Auto Scaling group. + Type: Number + Default: 10 + MinValue: 1 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + ConstraintDescription: Must be a valid email address. + GatewaysTargetGroups: + Description: A list of Target Groups to associate with the Auto Scaling. + group (comma separated list of ARNs, without spaces) (optional) + Type: String + Default: '' + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD". + to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections. + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Improve product experience by sending data to Check Point + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: ASG-configuration + MinLength: 1 + MaxLength: 30 + ELBType: + Type: String + Default: none + AllowedValues: + - none + - internal + - internet-facing + ELBPort: + Type: Number + Default: 8080 + ELBClients: + Type: String + Default: 0.0.0.0/0 + AllowedPattern: '^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})$' +Conditions: + ProvidedAdminEmail: !Not [!Equals [!Ref AdminEmail, '']] + ProvidedTargetGroups: !Not [!Equals [!Ref GatewaysTargetGroups, '']] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] + CreateELB: !Not [!Equals [!Ref ELBType, none]] +Resources: + ChkpGatewayRole: + Type: AWS::IAM::Role + Condition: EnableCloudWatch + Properties: + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: + Service: + - ec2.amazonaws.com + Action: + - sts:AssumeRole + Path: / + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: ChkpGatewayPolicy + PolicyRole: !Ref ChkpGatewayRole + InstanceProfile: + Type: AWS::IAM::InstanceProfile + Condition: EnableCloudWatch + Properties: + Path: / + Roles: + - !Ref ChkpGatewayRole + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref GatewayVersion, GW]] + NotificationTopic: + Type: AWS::SNS::Topic + Condition: ProvidedAdminEmail + Properties: + Subscription: + - Endpoint: !Ref AdminEmail + Protocol: email + ElasticLoadBalancer: + Type: AWS::ElasticLoadBalancing::LoadBalancer + Condition: CreateELB + Properties: + CrossZone: true + Listeners: + - LoadBalancerPort: !Ref ELBPort + InstancePort: !Ref ELBPort + Protocol: TCP + HealthCheck: + Target: !Join [':', [TCP, !Ref ELBPort]] + HealthyThreshold: 3 + UnhealthyThreshold: 5 + Interval: 30 + Timeout: 5 + Scheme: !Ref ELBType + Subnets: !Ref GatewaysSubnets + Policies: + - PolicyName: EnableProxyProtocol + PolicyType: ProxyProtocolPolicyType + Attributes: + - Name: ProxyProtocol + Value: true + InstancePorts: + - !Ref ELBPort + SecurityGroups: + - !Ref ELBSecurityGroup + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + Tags: + - Key: Name + Value: !Join ['_', [!Ref 'AWS::StackName', PermissiveSecurityGroup]] + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + GatewayGroup: + Type: AWS::AutoScaling::AutoScalingGroup + DependsOn: GatewayLaunchTemplate + Properties: + VPCZoneIdentifier: !Ref GatewaysSubnets + LaunchTemplate: + LaunchTemplateId: !Ref GatewayLaunchTemplate + Version: !GetAtt GatewayLaunchTemplate.LatestVersionNumber + MinSize: !Ref GatewaysMinSize + MaxSize: !Ref GatewaysMaxSize + LoadBalancerNames: !If [CreateELB, [!Ref ElasticLoadBalancer], !Ref 'AWS::NoValue'] + TargetGroupARNs: !If [ProvidedTargetGroups, !Split [',', !Ref GatewaysTargetGroups], !Ref 'AWS::NoValue'] + HealthCheckGracePeriod: 3600 + HealthCheckType: ELB + NotificationConfiguration: !If + - ProvidedAdminEmail + - TopicARN: !Ref NotificationTopic + NotificationTypes: + - autoscaling:EC2_INSTANCE_LAUNCH + - autoscaling:EC2_INSTANCE_LAUNCH_ERROR + - autoscaling:EC2_INSTANCE_TERMINATE + - autoscaling:EC2_INSTANCE_TERMINATE_ERROR + - !Ref 'AWS::NoValue' + Tags: + - Key: Name + Value: !Ref GatewayName + PropagateAtLaunch: true + - Key: x-chkp-tags + Value: !Join + - ':' + - - !Join ['=', [management, !Ref ManagementServer]] + - !Join ['=', [template, !Ref ConfigurationTemplate]] + - !Join ['=', [ip-address, !Ref ControlGatewayOverPrivateOrPublicAddress]] + PropagateAtLaunch: true + GatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + AssociatePublicIpAddress: true + Groups: + - !Ref PermissiveSecurityGroup + Monitoring: + Enabled: true + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !If [EnableCloudWatch, !Ref InstanceProfile, !Ref 'AWS::NoValue'] + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect}' + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"autoscale\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version + GatewayScaleUpPolicy: + Type: AWS::AutoScaling::ScalingPolicy + Properties: + AdjustmentType: ChangeInCapacity + AutoScalingGroupName: !Ref GatewayGroup + Cooldown: 300 + ScalingAdjustment: 1 + GatewayScaleDownPolicy: + Type: AWS::AutoScaling::ScalingPolicy + Properties: + AdjustmentType: ChangeInCapacity + AutoScalingGroupName: !Ref GatewayGroup + Cooldown: 300 + ScalingAdjustment: -1 + CPUAlarmHigh: + Type: AWS::CloudWatch::Alarm + Properties: + AlarmDescription: Scale-up if CPU > 80% for 10 minutes. + MetricName: CPUUtilization + Namespace: AWS/EC2 + Statistic: Average + Period: 300 + EvaluationPeriods: 2 + Threshold: 80 + AlarmActions: + - !Ref GatewayScaleUpPolicy + Dimensions: + - Name: AutoScalingGroupName + Value: !Ref GatewayGroup + ComparisonOperator: GreaterThanThreshold + CPUAlarmLow: + Type: AWS::CloudWatch::Alarm + Properties: + AlarmDescription: Scale-down if CPU < 60% for 10 minutes. + MetricName: CPUUtilization + Namespace: AWS/EC2 + Statistic: Average + Period: 300 + EvaluationPeriods: 2 + Threshold: 60 + AlarmActions: + - !Ref GatewayScaleDownPolicy + Dimensions: + - Name: AutoScalingGroupName + Value: !Ref GatewayGroup + ComparisonOperator: LessThanThreshold + ELBSecurityGroup: + Type: AWS::EC2::SecurityGroup + Condition: CreateELB + Properties: + GroupDescription: ELB security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: tcp + CidrIp: !Ref ELBClients + FromPort: !Ref ELBPort + ToPort: !Ref ELBPort +Outputs: + URL: + Description: The URL of the Proxy. + Condition: CreateELB + Value: !Join ['', ['http://', !GetAtt ElasticLoadBalancer.DNSName]] + SecurityGroup: + Description: The Security Group of the Auto Scaling group. + Value: !GetAtt PermissiveSecurityGroup.GroupId diff --git a/aws/templates/cluster/README.md b/aws/templates/cluster/README.md new file mode 100644 index 00000000..03bbe934 --- /dev/null +++ b/aws/templates/cluster/README.md @@ -0,0 +1,26 @@ +## Security Cluster + + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures two Security Gateways as a Cluster.

For more details, refer to the CloudGuard Network for AWS Security Cluster R80.20 and Higher Deployment Guide. +
Creates a new VPC and deploys a Cluster into it.
Deploys a Cluster into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/cluster/cluster-master.yaml b/aws/templates/cluster/cluster-master.yaml new file mode 100755 index 00000000..0f73a08c --- /dev/null +++ b/aws/templates/cluster/cluster-master.yaml @@ -0,0 +1,510 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Check Point Cluster in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZone + - VPCCIDR + - PublicSubnetCIDR + - PrivateSubnetCIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPCCIDR: + default: VPC CIDR + AvailabilityZone: + default: Availability zone + PublicSubnetCIDR: + default: Public subnet CIDR + PrivateSubnetCIDR: + default: Private subnet CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + AvailabilityZone: + Description: The availability zone in which to deploy the cluster. + Type: AWS::EC2::AvailabilityZone::Name + MinLength: 1 + VPCCIDR: + Description: The CIDR block for your VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnetCIDR: + Description: The external subnet of the cluster. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnetCIDR: + Description: The internal subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Default: false + Type: String + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD". + to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections. + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources (optional). + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Ref AvailabilityZone + NumberOfAZs: 1 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnetCIDR + PrivateSubnet1CIDR: !Ref PrivateSubnetCIDR + InternalRouteTable: + Type: AWS::EC2::RouteTable + DependsOn: VPCStack + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: Private Subnets Route Table + ClusterStack: + Type: AWS::CloudFormation::Stack + DependsOn: VPCStack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cluster.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PrivateSubnet: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberAExternalInterface: + Condition: AllocateAddress + Description: The external interface of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAExternalInterface + MemberAPrivateExternalAddress: + Description: The private external address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateExternalAddress + MemberAPrivateInternalAddress: + Description: The private internal address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateInternalAddress + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL + MemberBPrivateExternalAddress: + Description: The private external address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateExternalAddress + MemberBPrivateInternalAddress: + Description: The private internal address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateInternalAddress + ClusterPrivateAliasExternalAddress: + Description: The secondary external private IP address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPrivateAliasExternalAddress + ClusterPrivateAliasInternalAddress: + Description: The secondary internal private IP address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPrivateAliasInternalAddress +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/cluster/cluster.yaml b/aws/templates/cluster/cluster.yaml new file mode 100755 index 00000000..f065f4f3 --- /dev/null +++ b/aws/templates/cluster/cluster.yaml @@ -0,0 +1,736 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnet + - PrivateSubnet + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + PublicSubnet: + default: Public subnet + PrivateSubnet: + default: Private subnet + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + PublicSubnet: + Description: The public subnet of the cluster. The cluster's public IPs will be generated from this subnet. The subnet's route table must have 0.0.0.0/0 route to Internet Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + PrivateSubnet: + Description: The private subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + InternalRouteTable: + Description: The route table id in which to set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Cluster, this requires manual configuration in the route table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD". + to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections. + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources (optional). + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Improve product experience by sending data to Check Point + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + CreateRole: !Equals [!Ref GatewayPredefinedRole, ''] + ProvidedPassHash: !Not [!Equals [!Ref GatewayPasswordHash, '']] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + EmptyHostName: !Equals [!Ref GatewayHostname, ''] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] +Resources: + ClusterReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: AllocateAddress + Properties: {} + ClusterReadyCondition: + Type: AWS::CloudFormation::WaitCondition + DependsOn: [MemberAInstance, MemberBInstance] + Condition: AllocateAddress + Properties: + Count: 2 + Handle: !Ref ClusterReadyHandle + Timeout: 1800 + ClusterRole: + Condition: CreateRole + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + ClusterInstanceProfile: + Type: AWS::IAM::InstanceProfile + Properties: + Path: / + Roles: [!If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole]] + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join [-, [!Ref GatewayVersion, GW]] + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - PermissiveSecurityGroup + MemberAExternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member A external. + SecondaryPrivateIpAddressCount: 1 + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnet + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_ExternalInterface + MemberBExternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member B external. + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnet + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_ExternalInterface + MemberAInternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member A internal. + SecondaryPrivateIpAddressCount: 1 + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnet + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_InternalInterface + MemberBInternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member B internal. + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnet + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_InternalInterface + InternalDefaultRoute: + Type: AWS::EC2::Route + Condition: ProvidedRouteTable + DependsOn: MemberAInternalInterface + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !Ref MemberAInternalInterface + RouteTableId: !Ref InternalRouteTable + PrivateSubnetRouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: ProvidedRouteTable + Properties: + RouteTableId: !Ref InternalRouteTable + SubnetId: !Ref PrivateSubnet + MemberAInstance: + Type: AWS::EC2::Instance + DependsOn: [MemberAExternalInterface, MemberAInternalInterface] + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-A]] + - Key: x-chkp-member-ips + Value: !Join + - ':' + - - !Join [ '=', [ public-ip, !If [ AllocateAddress, !Ref MemberAPublicAddress, '' ] ] ] + - !Join [ '=', [ external-private-ip, !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress ] ] + - !Join [ '=', [ internal-private-ip, !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress ] ] + - Key: x-chkp-cluster-ips + Value: !Join + - ':' + - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] + - !Join [ '=', [ cluster-eth0-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] + - !Join [ '=', [ cluster-eth1-private-ip, !Select [ 0, !GetAtt MemberAInternalInterface.SecondaryPrivateIpAddresses ] ] ] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + MemberBInstance: + Type: AWS::EC2::Instance + DependsOn: [MemberBExternalInterface, MemberBInternalInterface] + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-B]] + - Key: x-chkp-member-ips + Value: !Join + - ':' + - - !Join [ '=', [ public-ip, !If [ AllocateAddress, !Ref MemberBPublicAddress, '' ] ] ] + - !Join [ '=', [ external-private-ip, !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress ] ] + - !Join [ '=', [ internal-private-ip, !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress ] ] + - Key: x-chkp-cluster-ips + Value: !Join + - ':' + - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] + - !Join [ '=', [ cluster-eth0-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] + - !Join [ '=', [ cluster-eth1-private-ip, !Select [ 0, !GetAtt MemberAInternalInterface.SecondaryPrivateIpAddresses ] ] ] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['.', !Select [0, !Split ['-', !Ref GatewayVersion]]]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20230923\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + ClusterPublicAddress: + Type: AWS::EC2::EIP + Properties: + Domain: vpc + MemberAPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + MemberBPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + ClusterAddressAssoc: + Type: AWS::EC2::EIPAssociation + DependsOn: MemberAInstance + Properties: + NetworkInterfaceId: !Ref MemberAExternalInterface + AllocationId: !GetAtt ClusterPublicAddress.AllocationId + PrivateIpAddress: !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses] + MemberAAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberAInstance + Properties: + NetworkInterfaceId: !Ref MemberAExternalInterface + AllocationId: !GetAtt MemberAPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberBAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberBInstance + Properties: + NetworkInterfaceId: !Ref MemberBExternalInterface + AllocationId: !GetAtt MemberBPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !Ref ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !Ref MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberAPublicAddress]] + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !Join ['', ['https://', !Ref MemberAPublicAddress]] + MemberAExternalInterface: + Condition: AllocateAddress + Description: The external interface of member A. + Value: !Ref MemberAExternalInterface + MemberAPrivateExternalAddress: + Description: The private external address of member A. + Value: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberAPrivateInternalAddress: + Description: The private internal address of member A. + Value: !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !Ref MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberBPublicAddress]] + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !Join ['', ['https://', !Ref MemberBPublicAddress]] + MemberBPrivateExternalAddress: + Description: The private external address of member B. + Value: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress + MemberBPrivateInternalAddress: + Description: The private internal address of member B. + Value: !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress + ClusterPrivateAliasExternalAddress: + Description: The secondary external private IP address of the cluster. + Value: !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] + ClusterPrivateAliasInternalAddress: + Description: The secondary internal private IP address of the cluster. + Value: !Select [ 0, !GetAtt MemberAInternalInterface.SecondaryPrivateIpAddresses ] + +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [[!Ref MemberBToken], !Ref MemberAToken] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] + diff --git a/aws/templates/cross-az-cluster/README.md b/aws/templates/cross-az-cluster/README.md new file mode 100644 index 00000000..1a44f78e --- /dev/null +++ b/aws/templates/cross-az-cluster/README.md @@ -0,0 +1,26 @@ + +## Cross Availability Zone Cluster + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys two Security Gateways, each in a different Availability Zone.

For more details, refer to Cross Availability Zone Cluster for AWS R81.20 Administration Guide. +
Creates a new VPC and deploys a Cross Availability Zone Cluster of Security Gateways into it.
Deploys a Cross Availability Zone Cluster of Security Gateways into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml new file mode 100644 index 00000000..65ed15aa --- /dev/null +++ b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml @@ -0,0 +1,513 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Check Point Cluster in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PrivateSubnet1CIDR + - PrivateSubnet2CIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + AvailabilityZones: + default: Availability zones + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public subnet 1 CIDR + PublicSubnet2CIDR: + default: Public subnet 2 CIDR + PrivateSubnet1CIDR: + default: Private subnet 1 CIDR + PrivateSubnet2CIDR: + default: Private subnet 2 CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs + VolumeSize: + default: Root volume size (GB) + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + AvailabilityZones: + Description: The availability zones in which to deploy the cluster. + Type: List + MinLength: 2 + VPCCIDR: + Description: The CIDR block for your VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: The 1st external subnet of the cluster. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: The 2nd external subnet of the cluster. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet1CIDR: + Description: The 1st internal subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet2CIDR: + Description: The 2nd internal subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.21.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Default: false + Type: String + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD". + to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections. + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Improve product experience by sending data to Check Point. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: 2 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PrivateSubnet1CIDR: !Ref PrivateSubnet1CIDR + PrivateSubnet2CIDR: !Ref PrivateSubnet2CIDR + InternalRouteTable: + Type: AWS::EC2::RouteTable + DependsOn: VPCStack + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: Private Subnets Route Table + ClusterStack: + Type: AWS::CloudFormation::Stack + DependsOn: VPCStack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberAExternalInterface: + Condition: AllocateAddress + Description: The external interface of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAExternalInterface + MemberAPrivateExternalAddress: + Description: The primary external private address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateExternalAddress + MemberAPrivateAliasAddress: + Description: The secondary external private IP address of Member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateAliasAddress + MemberAPrivateInternalAddress: + Description: The private Internal address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateInternalAddress + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL + MemberBPrivateExternalAddress: + Description: The primary external private address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateExternalAddress + MemberBPrivateAliasAddress: + Description: The secondary external private IP address of Member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateAliasAddress + MemberBPrivateInternalAddress: + Description: The private Internal address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateInternalAddress +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/cross-az-cluster/cross-az-cluster.yaml b/aws/templates/cross-az-cluster/cross-az-cluster.yaml new file mode 100644 index 00000000..7f4a56ac --- /dev/null +++ b/aws/templates/cross-az-cluster/cross-az-cluster.yaml @@ -0,0 +1,755 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway. + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway. + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway. + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway. + InternalRouteTable: + Description: Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Cluster, this requires manual configuration in the Route Table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose + Improve product experience by sending data to Check Point. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + CreateRole: !Equals [!Ref GatewayPredefinedRole, ''] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + EmptyHostName: !Equals [!Ref GatewayHostname, ''] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] +Resources: + ClusterReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: AllocateAddress + Properties: {} + ClusterReadyCondition: + Type: AWS::CloudFormation::WaitCondition + DependsOn: [MemberAInstance, MemberBInstance] + Condition: AllocateAddress + Properties: + Count: 2 + Handle: !Ref ClusterReadyHandle + Timeout: 1800 + ClusterRole: + Condition: CreateRole + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + ClusterInstanceProfile: + Type: AWS::IAM::InstanceProfile + Properties: + Path: / + Roles: [!If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole]] + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] + PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref GatewayVersion, GW]] + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - PermissiveSecurityGroup + MemberAExternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member A external. + SecondaryPrivateIpAddressCount: 1 + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnetA + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_ExternalInterface + MemberBExternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member B external. + SecondaryPrivateIpAddressCount: 1 + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnetB + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_ExternalInterface + MemberAInternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member A internal. + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnetA + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_InternalInterface + MemberBInternalInterface: + Type: AWS::EC2::NetworkInterface + DependsOn: PermissiveSecurityGroup + Properties: + Description: Member B internal. + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnetB + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_InternalInterface + InternalDefaultRoute: + Type: AWS::EC2::Route + Condition: ProvidedRouteTable + DependsOn: MemberAInternalInterface + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !Ref MemberAInternalInterface + RouteTableId: !Ref InternalRouteTable + PrivateSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: ProvidedRouteTable + Properties: + RouteTableId: !Ref InternalRouteTable + SubnetId: !Ref PrivateSubnetA + PrivateSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: ProvidedRouteTable + Properties: + RouteTableId: !Ref InternalRouteTable + SubnetId: !Ref PrivateSubnetB + ClusterPublicAddress: + Type: AWS::EC2::EIP + Properties: + Domain: vpc + MemberAPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + MemberBPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + ClusterAddressAssoc: + Type: AWS::EC2::EIPAssociation + DependsOn: MemberAInstance + Properties: + NetworkInterfaceId: !Ref MemberAExternalInterface + AllocationId: !GetAtt ClusterPublicAddress.AllocationId + PrivateIpAddress: !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses] + MemberAAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberAInstance + Properties: + NetworkInterfaceId: !Ref MemberAExternalInterface + AllocationId: !GetAtt MemberAPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberBAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberBInstance + Properties: + NetworkInterfaceId: !Ref MemberBExternalInterface + AllocationId: !GetAtt MemberBPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress + MemberAInstance: + Type: AWS::EC2::Instance + DependsOn: [MemberAExternalInterface, MemberAInternalInterface, ClusterPublicAddress, MemberBInternalInterface, MemberBExternalInterface] + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-A]] + - Key: x-chkp-member-ips + Value: !Join + - ':' + - - !Join [ '=', [ public-ip, !Ref MemberAPublicAddress ] ] + - !Join [ '=', [ external-private-ip, !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress ] ] + - !Join [ '=', [ internal-private-ip, !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress ] ] + - Key: x-chkp-cluster-ips + Value: !Join + - ':' + - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] + - !Join [ '=', [ secondary-external-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + MemberBInstance: + Type: AWS::EC2::Instance + DependsOn: [MemberBExternalInterface, MemberBInternalInterface, ClusterPublicAddress, MemberAInternalInterface, MemberAExternalInterface] + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-B]] + - Key: x-chkp-member-ips + Value: !Join + - ':' + - - !Join [ '=', [ public-ip, !Ref MemberBPublicAddress ] ] + - !Join [ '=', [ external-private-ip, !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress ] ] + - !Join [ '=', [ internal-private-ip, !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress ] ] + - Key: x-chkp-cluster-ips + Value: !Join + - ':' + - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] + - !Join [ '=', [ secondary-external-private-ip, !Select [ 0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses ] ] ] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join [ '', [ ' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !Ref ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !Ref MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberAPublicAddress]] + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !Join ['', ['https://', !Ref MemberAPublicAddress]] + MemberAExternalInterface: + Condition: AllocateAddress + Description: The external interface of member A. + Value: !Ref MemberAExternalInterface + MemberAPrivateExternalAddress: + Description: The primary external private address of member A. + Value: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberAPrivateAliasAddress: + Description: The secondary external private IP address of Member A. + Value: !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses] + MemberAPrivateInternalAddress: + Description: The private Internal address of member A. + Value: !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !Ref MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberBPublicAddress]] + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !Join ['', ['https://', !Ref MemberBPublicAddress]] + MemberBPrivateExternalAddress: + Description: The primary external private address of member B. + Value: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress + MemberBPrivateAliasAddress: + Description: The secondary external private IP address of Member B. + Value: !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses] + MemberBPrivateInternalAddress: + Description: The private Internal address of member B. + Value: !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] diff --git a/aws/templates/general/README.md b/aws/templates/general/README.md new file mode 100644 index 00000000..67940b88 --- /dev/null +++ b/aws/templates/general/README.md @@ -0,0 +1,29 @@ +## General + + + + + + + + + + + + + + + + + + +
DescriptionDirect Launch
+ Create an IAM role for Security Management Server
+ Creates an IAM role in your account preconfigured with permissions to manage resources.
+ For more details, refer to sk122074 . +
+ Current Check Point AMIs
+ A helper template that returns the latest Check Point AMIs in a given region. +
+
+
diff --git a/aws/templates/general/amis.yaml b/aws/templates/general/amis.yaml new file mode 100644 index 00000000..bd3bd833 --- /dev/null +++ b/aws/templates/general/amis.yaml @@ -0,0 +1,915 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Returns a Check Point Amazon Machine ID (20211212) +Parameters: + Version: + Description: Security Gateway or Management Server version + Type: String + Default: R81.10-BYOL-GW + AllowedValues: + - BYOL + - PAYG + - R80 + - R77.30-BYOL + - R77.30-PAYG-NGTP + - R80.10-BYOL + - R80.10-PAYG-NGTP + - R80.10-PAYG-MGMT + - R80.10-BYOL-GW + - R80.10-PAYG-NGTP-GW + - R80.10-PAYG-NGTX-GW + - R80.20-BYOL-MGMT + - R80.20-PAYG-MGMT + - R80.20-BYOL-GW + - R80.20-PAYG-NGTP-GW + - R80.20-PAYG-NGTX-GW + - R80.30-BYOL-MGMT + - R80.30-PAYG-MGMT + - R80.30-BYOL-GW + - R80.30-PAYG-NGTP-GW + - R80.30-PAYG-NGTX-GW + - R80.40-PAYG-NGTP + - R80.40-BYOL-MGMT + - R80.40-PAYG-MGMT + - R80.40-BYOL-GW + - R80.40-PAYG-NGTP-GW + - R80.40-PAYG-NGTX-GW + - R81-PAYG-NGTP + - R81-BYOL-MGMT + - R81-PAYG-MGMT + - R81-BYOL-GW + - R81-PAYG-NGTP-GW + - R81-PAYG-NGTX-GW + - R81.10-PAYG-NGTP + - R81.10-BYOL-MGMT + - R81.10-PAYG-MGMT + - R81.10-BYOL-GW + - R81.10-PAYG-NGTP-GW + - R81.10-PAYG-NGTX-GW +Mappings: + ConverterMap: + BYOL: + Value: R7730BYOL + PAYG: + Value: R7730PAYGNGTP + R77.30-BYOL: + Value: R7730BYOL + R77.30-PAYG-NGTP: + Value: R7730PAYGNGTP + R80: + Value: R80 + R80.10-BYOL: + Value: R8010BYOL + R80.10-PAYG-NGTP: + Value: R8010PAYGNGTP + R80.10-PAYG-MGMT: + Value: R8010PAYGMGMT + R80.10-BYOL-GW: + Value: R8010BYOLGW + R80.10-PAYG-NGTP-GW: + Value: R8010PAYGNGTPGW + R80.10-PAYG-NGTX-GW: + Value: R8010PAYGNGTXGW + R80.20-BYOL-MGMT: + Value: R8020BYOLMGMT + R80.20-PAYG-MGMT: + Value: R8020PAYGMGMT + R80.20-BYOL-GW: + Value: R8020BYOLGW + R80.20-PAYG-NGTP-GW: + Value: R8020PAYGNGTPGW + R80.20-PAYG-NGTX-GW: + Value: R8020PAYGNGTXGW + R80.30-BYOL-MGMT: + Value: R8030BYOLMGMT + R80.30-PAYG-MGMT: + Value: R8030PAYGMGMT + R80.30-BYOL-GW: + Value: R8030BYOLGW + R80.30-PAYG-NGTP-GW: + Value: R8030PAYGNGTPGW + R80.30-PAYG-NGTX-GW: + Value: R8030PAYGNGTXGW + R80.40-PAYG-NGTP: + Value: R8040PAYGNGTP + R80.40-BYOL-MGMT: + Value: R8040BYOLMGMT + R80.40-PAYG-MGMT: + Value: R8040PAYGMGMT + R80.40-BYOL-GW: + Value: R8040BYOLGW + R80.40-PAYG-NGTP-GW: + Value: R8040PAYGNGTPGW + R80.40-PAYG-NGTX-GW: + Value: R8040PAYGNGTXGW + R81-PAYG-NGTP: + Value: R81PAYGNGTP + R81-BYOL-MGMT: + Value: R81BYOLMGMT + R81-PAYG-MGMT: + Value: R81PAYGMGMT + R81-BYOL-GW: + Value: R81BYOLGW + R81-PAYG-NGTP-GW: + Value: R81PAYGNGTPGW + R81-PAYG-NGTX-GW: + Value: R81PAYGNGTXGW + R81.10-PAYG-NGTP: + Value: R8110PAYGNGTP + R81.10-BYOL-MGMT: + Value: R8110BYOLMGMT + R81.10-PAYG-MGMT: + Value: R8110PAYGMGMT + R81.10-BYOL-GW: + Value: R8110BYOLGW + R81.10-PAYG-NGTP-GW: + Value: R8110PAYGNGTPGW + R81.10-PAYG-NGTX-GW: + Value: R8110PAYGNGTXGW + RegionMap: + af-south-1: + R8030BYOLGW: ami-03af0e13c4ef52af0 + R8030BYOLMGMT: ami-0878d191130b438b8 + R8030PAYGMGMT: ami-084cc07760fdf3661 + R8030PAYGNGTPGW: ami-0abbe0a796322f47b + R8030PAYGNGTXGW: ami-0f1e5dc1dd05952fe + R8040BYOLGW: ami-0b722a57c402895db + R8040BYOLMGMT: ami-0841f5aed2d637bca + R8040PAYGMGMT: ami-027fbb6429155a5a2 + R8040PAYGNGTP: ami-0de82fe9b5d9212a7 + R8040PAYGNGTPGW: ami-0df93235cb8356c71 + R8040PAYGNGTXGW: ami-07dde32d9e2583902 + R8110BYOLGW: ami-02ea93d096df66a1e + R8110BYOLMGMT: ami-0b17daa9dfb81932e + R8110PAYGMGMT: ami-0b1e138e3f28d2741 + R8110PAYGNGTP: ami-0d9cc6c53e32a7993 + R8110PAYGNGTPGW: ami-0e0ea459f8809c0f8 + R8110PAYGNGTXGW: ami-0b3bf34bb4cc98f7a + R81BYOLGW: ami-0d608e9a55af43b14 + R81BYOLMGMT: ami-05e4f33f1f4f5980b + R81PAYGMGMT: ami-09826060728c2dd20 + R81PAYGNGTP: ami-0ae8bc19770eb9318 + R81PAYGNGTPGW: ami-08d2f92d2e494d09c + R81PAYGNGTXGW: ami-0ece2b66ace15fc73 + ap-east-1: + R8020BYOLGW: ami-de9be2af + R8020BYOLMGMT: ami-e3067d92 + R8020PAYGMGMT: ami-ee057e9f + R8020PAYGNGTPGW: ami-fc94ed8d + R8020PAYGNGTXGW: ami-5f443c2e + R8030BYOLGW: ami-0e7a79dcfdb34b21f + R8030BYOLMGMT: ami-0ddc119eedf4ad071 + R8030PAYGMGMT: ami-05dcd50979140f7e1 + R8030PAYGNGTPGW: ami-0aa9e5c4d92ba1240 + R8030PAYGNGTXGW: ami-04e3451134ccb2e26 + R8040BYOLGW: ami-006e36addf78026b9 + R8040BYOLMGMT: ami-03f1429f8fe15a6d0 + R8040PAYGMGMT: ami-09aad7825e4cf9984 + R8040PAYGNGTP: ami-036d3215f14b5718d + R8040PAYGNGTPGW: ami-0f6ab2c88f1a75df8 + R8040PAYGNGTXGW: ami-09573df975d8670f4 + R8110BYOLGW: ami-0edcc40517f40e403 + R8110BYOLMGMT: ami-0b14934c8573d930a + R8110PAYGMGMT: ami-0c1184517cfd96142 + R8110PAYGNGTP: ami-03880aad4b38db61f + R8110PAYGNGTPGW: ami-03b3418800bf690a1 + R8110PAYGNGTXGW: ami-098c38485679d798b + R81BYOLGW: ami-0b3f9ba1975e21b71 + R81BYOLMGMT: ami-08ca394f0eca95d8c + R81PAYGMGMT: ami-07ae3a976760167f1 + R81PAYGNGTP: ami-0832f4c1f50aab8e8 + R81PAYGNGTPGW: ami-0c97a829e15d5abef + R81PAYGNGTXGW: ami-0b51df5d83f1f0df7 + ap-northeast-1: + R7730BYOL: ami-62dea804 + R7730PAYGNGTP: ami-16dfa970 + R80: ami-baccb2dd + R8010BYOL: ami-03b171c04f1a2b667 + R8010BYOLGW: ami-01733527b6ed34b77 + R8010PAYGMGMT: ami-089f2a71639b800da + R8010PAYGNGTP: ami-009b7d100548b52d7 + R8010PAYGNGTPGW: ami-022b5fbf3b014333a + R8010PAYGNGTXGW: ami-07533055a2d3d7c9e + R8020BYOLGW: ami-04c278979cdcde217 + R8020BYOLMGMT: ami-0f17b285accca6862 + R8020PAYGMGMT: ami-0ad39d1aada8aa0c7 + R8020PAYGNGTPGW: ami-08c2fbdbe73946ff2 + R8020PAYGNGTXGW: ami-0314cd1c93e71d931 + R8030BYOLGW: ami-0baa10c7e12142d6a + R8030BYOLMGMT: ami-039628b16ebd96076 + R8030PAYGMGMT: ami-0325f629deba2005d + R8030PAYGNGTPGW: ami-0b6010e142d4ab70e + R8030PAYGNGTXGW: ami-0ec559ca316eb2f83 + R8040BYOLGW: ami-094062bcb4dab8cc0 + R8040BYOLMGMT: ami-0a444eda520768e41 + R8040PAYGMGMT: ami-0906a2bc4a85e0a13 + R8040PAYGNGTP: ami-04d2676b1e71e8a88 + R8040PAYGNGTPGW: ami-0b36510632878236e + R8040PAYGNGTXGW: ami-0ba537b6674ba611b + R8110BYOLGW: ami-0c75ce281bb868a7a + R8110BYOLMGMT: ami-083f8bde2db27d7cc + R8110PAYGMGMT: ami-0a35ea9836259ccc9 + R8110PAYGNGTP: ami-092eb4506998b13a1 + R8110PAYGNGTPGW: ami-0b7574f386f46f351 + R8110PAYGNGTXGW: ami-044a10f3c57f840b8 + R81BYOLGW: ami-051a44f3e6052f590 + R81BYOLMGMT: ami-00915b46b649664e9 + R81PAYGMGMT: ami-08e00074b1ca97206 + R81PAYGNGTP: ami-031aadfb6aacf577c + R81PAYGNGTPGW: ami-062d4bb88963b8f1d + R81PAYGNGTXGW: ami-0a510d5041fc8887b + ap-northeast-2: + R7730BYOL: ami-e5b1138b + R7730PAYGNGTP: ami-74b6141a + R80: ami-d3d302bd + R8010BYOL: ami-07861c833126ee7d3 + R8010BYOLGW: ami-00c10f7a335270f92 + R8010PAYGMGMT: ami-00a975c02fe778029 + R8010PAYGNGTP: ami-07d71e25ae8c42424 + R8010PAYGNGTPGW: ami-0a375565bb42bf9a6 + R8010PAYGNGTXGW: ami-00617bdd53d331eb4 + R8020BYOLGW: ami-097c7847403a3920f + R8020BYOLMGMT: ami-076736817cfbcd7c1 + R8020PAYGMGMT: ami-067a469f8d4bf291e + R8020PAYGNGTPGW: ami-0d2c45ce8157240ec + R8020PAYGNGTXGW: ami-04c9b29e62efbfa55 + R8030BYOLGW: ami-030c8cc568b1900db + R8030BYOLMGMT: ami-018baaa632f91cd8b + R8030PAYGMGMT: ami-0a63498f1aa49672e + R8030PAYGNGTPGW: ami-0486b0f96466ad215 + R8030PAYGNGTXGW: ami-017bc94a3e5416857 + R8040BYOLGW: ami-032176aff103778eb + R8040BYOLMGMT: ami-0138ead19c026f65c + R8040PAYGMGMT: ami-07302dd5572efdfc4 + R8040PAYGNGTP: ami-0319a1e03b1dfd6e5 + R8040PAYGNGTPGW: ami-024dbc3fd51e4b8ea + R8040PAYGNGTXGW: ami-0b715c8b68b798034 + R8110BYOLGW: ami-01b7bbd71ba2b072c + R8110BYOLMGMT: ami-03252124476deab9c + R8110PAYGMGMT: ami-0fb1ff7bccd89f976 + R8110PAYGNGTP: ami-08cb4bb054ced809b + R8110PAYGNGTPGW: ami-0f2f3b4489a03cfe9 + R8110PAYGNGTXGW: ami-0e5fc77ffe7d9d58e + R81BYOLGW: ami-00ed25702180b8842 + R81BYOLMGMT: ami-0cad014d84f076dfa + R81PAYGMGMT: ami-062316a77d8c3b8fd + R81PAYGNGTP: ami-01a04065eb10dd19d + R81PAYGNGTPGW: ami-00c11ac82e44c15fc + R81PAYGNGTXGW: ami-0613a2c7ec8fd6fdc + ap-northeast-3: + R8030BYOLGW: ami-0bd69e21a2c3fa214 + R8030BYOLMGMT: ami-066cbf5a9b72b348c + R8030PAYGMGMT: ami-07418824f5e711d1e + R8030PAYGNGTPGW: ami-0f4e515c0a7213995 + R8030PAYGNGTXGW: ami-0eabc25e39142662c + R8040BYOLGW: ami-05b2f228936560013 + R8040BYOLMGMT: ami-05b0aa65f503642e4 + R8040PAYGMGMT: ami-00127e01f45734c14 + R8040PAYGNGTP: ami-01d6c7a76383df85d + R8040PAYGNGTPGW: ami-0d95a38a0cbdf3645 + R8040PAYGNGTXGW: ami-0bf9331d722000bcd + R8110BYOLGW: ami-08548b821cfe1d351 + R8110BYOLMGMT: ami-051b08ab5fd0ae08e + R8110PAYGMGMT: ami-0569a418f5bef264b + R8110PAYGNGTP: ami-0a31b87f265f0f302 + R8110PAYGNGTPGW: ami-044134b1978f89842 + R8110PAYGNGTXGW: ami-058f377c27868969c + R81BYOLGW: ami-0f991b47f87d4ea49 + R81BYOLMGMT: ami-0097e6a80df53335c + R81PAYGMGMT: ami-09044a81932d0323f + R81PAYGNGTP: ami-01211212c98b5f87d + R81PAYGNGTPGW: ami-0acdce80f2cc5f96e + R81PAYGNGTXGW: ami-0990cfbb26be4fb9a + ap-south-1: + R7730BYOL: ami-ef104280 + R7730PAYGNGTP: ami-7412401b + R80: ami-54d7a13b + R8010BYOL: ami-0d70af9a3bf7ed166 + R8010BYOLGW: ami-005813656f2cc2109 + R8010PAYGMGMT: ami-0fc83d32e683d94f9 + R8010PAYGNGTP: ami-0ca38a5ab32a32402 + R8010PAYGNGTPGW: ami-0bdbc0c3c684b67da + R8010PAYGNGTXGW: ami-028a56db679aae09d + R8020BYOLGW: ami-04cadb01804793765 + R8020BYOLMGMT: ami-0373d39ed8e2a4547 + R8020PAYGMGMT: ami-08e59f7d8f19321c6 + R8020PAYGNGTPGW: ami-02624d5f00eeb282b + R8020PAYGNGTXGW: ami-036b79a31e0f7c8de + R8030BYOLGW: ami-0ba102ca3b3ece6fb + R8030BYOLMGMT: ami-0cfb57dfdd59176e9 + R8030PAYGMGMT: ami-029fdb9a3ce21a696 + R8030PAYGNGTPGW: ami-0281167f57d2c45d0 + R8030PAYGNGTXGW: ami-05b7128205d79d2b1 + R8040BYOLGW: ami-0daa614bc473454e8 + R8040BYOLMGMT: ami-02c4ce0de18c28067 + R8040PAYGMGMT: ami-0fc426b26027390d9 + R8040PAYGNGTP: ami-038ed08d18172138c + R8040PAYGNGTPGW: ami-0234b18cf63ecbe52 + R8040PAYGNGTXGW: ami-0d0d4f47aa8d3dab3 + R8110BYOLGW: ami-04410172c35fd9678 + R8110BYOLMGMT: ami-01f93cb97096b6f55 + R8110PAYGMGMT: ami-0b41e8f9a15db769f + R8110PAYGNGTP: ami-0480043e64ab1ed06 + R8110PAYGNGTPGW: ami-03b42ad050bdf0273 + R8110PAYGNGTXGW: ami-061efa414e3be09ac + R81BYOLGW: ami-0e01f76a7e99869f4 + R81BYOLMGMT: ami-02e7869a8e45be6da + R81PAYGMGMT: ami-0c18a5c4267c7faa1 + R81PAYGNGTP: ami-024893a43ba55f2e1 + R81PAYGNGTPGW: ami-02a622558079e1ae7 + R81PAYGNGTXGW: ami-052839dfcc5ed25d1 + ap-southeast-1: + R7730BYOL: ami-ecf8b990 + R7730PAYGNGTP: ami-95fbbae9 + R80: ami-4dd3792e + R8010BYOL: ami-07760a643c67c74e9 + R8010BYOLGW: ami-01df2f1c8a432f0bd + R8010PAYGMGMT: ami-095b04b5b63ea4abc + R8010PAYGNGTP: ami-0e726234e298325f8 + R8010PAYGNGTPGW: ami-023f0cf2bfc594e49 + R8010PAYGNGTXGW: ami-01899ce6a0aff8a62 + R8020BYOLGW: ami-077131e03ee155037 + R8020BYOLMGMT: ami-0aace42e71cc045a3 + R8020PAYGMGMT: ami-05fe62173e8a32170 + R8020PAYGNGTPGW: ami-0b465f9ba2e93f2eb + R8020PAYGNGTXGW: ami-07982feb9d5f02ab9 + R8030BYOLGW: ami-08a3e82440e058919 + R8030BYOLMGMT: ami-01efe7e8fe8e615cb + R8030PAYGMGMT: ami-065d880f3472eaf09 + R8030PAYGNGTPGW: ami-019d509bb164d4288 + R8030PAYGNGTXGW: ami-04f09f44342ca3dc0 + R8040BYOLGW: ami-0155db11f7ad84c17 + R8040BYOLMGMT: ami-085ec63e383296b71 + R8040PAYGMGMT: ami-0f3e9b8b75d81ada6 + R8040PAYGNGTP: ami-025e3836ec1b70932 + R8040PAYGNGTPGW: ami-0d34a3a2afa4c374f + R8040PAYGNGTXGW: ami-0d3b255ae35c2a587 + R8110BYOLGW: ami-031b7f0794d89b308 + R8110BYOLMGMT: ami-045bb128b10c86256 + R8110PAYGMGMT: ami-07c69f5dc41dd5179 + R8110PAYGNGTP: ami-0758258154b907b8c + R8110PAYGNGTPGW: ami-0dca2c0a6cb0c3d4e + R8110PAYGNGTXGW: ami-0e998a70357981080 + R81BYOLGW: ami-0e9e27a4084357f94 + R81BYOLMGMT: ami-0c7930970435d9eb7 + R81PAYGMGMT: ami-09969ebb367a585c6 + R81PAYGNGTP: ami-05e858d288a762c60 + R81PAYGNGTPGW: ami-0dab47829bf181d9a + R81PAYGNGTXGW: ami-0f7e09a0683f3803b + ap-southeast-2: + R7730BYOL: ami-e3728981 + R7730PAYGNGTP: ami-56778c34 + R80: ami-1a8d8979 + R8010BYOL: ami-057c1ce8ef1c5c545 + R8010BYOLGW: ami-03fe7ae0469b2be02 + R8010PAYGMGMT: ami-045e1a116c83c5b6c + R8010PAYGNGTP: ami-0aa3f436612fc8303 + R8010PAYGNGTPGW: ami-028638674c03bc856 + R8010PAYGNGTXGW: ami-0158539021dc0b3b6 + R8020BYOLGW: ami-0f4872cba7b3d8520 + R8020BYOLMGMT: ami-01315a5548051c5a9 + R8020PAYGMGMT: ami-0cb5a075174025ab6 + R8020PAYGNGTPGW: ami-00ccc52d9a39e8213 + R8020PAYGNGTXGW: ami-0f46b9f96931f3fd2 + R8030BYOLGW: ami-0a66cddf714abcb06 + R8030BYOLMGMT: ami-043fa31e4909cb774 + R8030PAYGMGMT: ami-01ebceb26a5f96b64 + R8030PAYGNGTPGW: ami-01ac4c817f522742f + R8030PAYGNGTXGW: ami-0ee7e08cb3e411862 + R8040BYOLGW: ami-0f9992f519edd8622 + R8040BYOLMGMT: ami-09563abb4e6ca2c2b + R8040PAYGMGMT: ami-094fd3ae1bac73f89 + R8040PAYGNGTP: ami-066b84b7ee7a3ac5c + R8040PAYGNGTPGW: ami-08680ca28120e95b2 + R8040PAYGNGTXGW: ami-0c5e5d03d92a61044 + R8110BYOLGW: ami-07a177a53e3237fa3 + R8110BYOLMGMT: ami-01d8e8958d9f5d9c1 + R8110PAYGMGMT: ami-03a3d8289487d8bf0 + R8110PAYGNGTP: ami-0769e1512bf08b7d4 + R8110PAYGNGTPGW: ami-0ad8de5f3f9542c1a + R8110PAYGNGTXGW: ami-065f0ab151a5f439b + R81BYOLGW: ami-0d14873e1dd7fca1f + R81BYOLMGMT: ami-09a07c2845bdd1e21 + R81PAYGMGMT: ami-0a1a9ae35d53d4d95 + R81PAYGNGTP: ami-0d58088decdfe42c1 + R81PAYGNGTPGW: ami-0d249a36533a5711b + R81PAYGNGTXGW: ami-07b22b64d1ffee34f + ca-central-1: + R7730BYOL: ami-4faa2e2b + R7730PAYGNGTP: ami-5ea82c3a + R80: ami-09ec516d + R8010BYOL: ami-088b18e35373a7f00 + R8010BYOLGW: ami-004f7b86744ca27ac + R8010PAYGMGMT: ami-0639bf109ec7eea53 + R8010PAYGNGTP: ami-03dd17eaeffc101a5 + R8010PAYGNGTPGW: ami-0386853b322be7389 + R8010PAYGNGTXGW: ami-0b6aca50c60adc5f3 + R8020BYOLGW: ami-0fa35bf3cbb283cc9 + R8020BYOLMGMT: ami-025d9f859062b9e23 + R8020PAYGMGMT: ami-037991f7332217dcd + R8020PAYGNGTPGW: ami-068837ad2434bbff6 + R8020PAYGNGTXGW: ami-00e1cdc4afa3cc45d + R8030BYOLGW: ami-003becb34e252f67a + R8030BYOLMGMT: ami-0e278a92f273fc18c + R8030PAYGMGMT: ami-08f5829bd83489e3e + R8030PAYGNGTPGW: ami-03fc40c7bfdcab1c3 + R8030PAYGNGTXGW: ami-097dea5c130823562 + R8040BYOLGW: ami-05313c79b6d30fb39 + R8040BYOLMGMT: ami-0031b0c17b9125fb8 + R8040PAYGMGMT: ami-0511998dee05d0c9a + R8040PAYGNGTP: ami-0871962466b8a5a51 + R8040PAYGNGTPGW: ami-063d657a7212ae300 + R8040PAYGNGTXGW: ami-0ead7d67e4f5f2381 + R8110BYOLGW: ami-0457f615ae8f850a1 + R8110BYOLMGMT: ami-01c246da1dfd702ca + R8110PAYGMGMT: ami-03385bbba3bf1f6d0 + R8110PAYGNGTP: ami-05e80af4effb8bc0a + R8110PAYGNGTPGW: ami-01ebb32b1bec3d943 + R8110PAYGNGTXGW: ami-0df8a5610363ccf00 + R81BYOLGW: ami-0835b73dfce287bbc + R81BYOLMGMT: ami-00c1c8bbec305d13d + R81PAYGMGMT: ami-09364e355a9f699eb + R81PAYGNGTP: ami-0c9dc29bee4d535e9 + R81PAYGNGTPGW: ami-08ea9297f04c33c6e + R81PAYGNGTXGW: ami-0556b84ce43d25eae + eu-central-1: + R7730BYOL: ami-98f397f7 + R7730PAYGNGTP: ami-a1f195ce + R80: ami-1cb77873 + R8010BYOL: ami-0408826efa12e9aa8 + R8010BYOLGW: ami-08909417a335f2cc6 + R8010PAYGMGMT: ami-01d678ffb4f4cbced + R8010PAYGNGTP: ami-065126c92c0fbb5c4 + R8010PAYGNGTPGW: ami-0613f0114c9ba42f1 + R8010PAYGNGTXGW: ami-0096fb48b37a4eb59 + R8020BYOLGW: ami-05c1cd8fcc05d02b9 + R8020BYOLMGMT: ami-0d35e44e22e1efbbc + R8020PAYGMGMT: ami-0d7166fcb095f0bcc + R8020PAYGNGTPGW: ami-00400189047c609d0 + R8020PAYGNGTXGW: ami-0e0f11dd7f27ae927 + R8030BYOLGW: ami-0868e270693016bff + R8030BYOLMGMT: ami-07fea8b7f7a20109e + R8030PAYGMGMT: ami-08622043d6ded1e73 + R8030PAYGNGTPGW: ami-092d6d417212f00f4 + R8030PAYGNGTXGW: ami-0fb7b15a4209025b2 + R8040BYOLGW: ami-0855a673a7851cfd8 + R8040BYOLMGMT: ami-02d56f4858b97006a + R8040PAYGMGMT: ami-0c07596fb04d06615 + R8040PAYGNGTP: ami-0fd4c287a100e5154 + R8040PAYGNGTPGW: ami-0da7ec09e4914e0b5 + R8040PAYGNGTXGW: ami-0a9eca0d6cfc9a435 + R8110BYOLGW: ami-055a6317fb9047379 + R8110BYOLMGMT: ami-0a578b3bb366567c2 + R8110PAYGMGMT: ami-068718d593d49d052 + R8110PAYGNGTP: ami-05c17b5cc05d68745 + R8110PAYGNGTPGW: ami-0e0a21ef6f5da6411 + R8110PAYGNGTXGW: ami-0deb975082e100670 + R81BYOLGW: ami-0aeb92f140fe36d7b + R81BYOLMGMT: ami-0f5e71cc274362538 + R81PAYGMGMT: ami-044d2fca4574bc93d + R81PAYGNGTP: ami-0c9ee5867b1bad025 + R81PAYGNGTPGW: ami-0f36e6aed64a1b6a0 + R81PAYGNGTXGW: ami-034d41e17d6013377 + eu-north-1: + R8020BYOLGW: ami-b2b03ecc + R8020BYOLMGMT: ami-b4cf44ca + R8020PAYGMGMT: ami-b4c843ca + R8020PAYGNGTPGW: ami-34b13f4a + R8020PAYGNGTXGW: ami-66ec6418 + R8030BYOLGW: ami-0816a2896171bbb38 + R8030BYOLMGMT: ami-0c33f93d2c5a7685b + R8030PAYGMGMT: ami-083fd7c7de13b067f + R8030PAYGNGTPGW: ami-0db2ad56f0a8cf8da + R8030PAYGNGTXGW: ami-0842095fc68703677 + R8040BYOLGW: ami-02740e516f96ece83 + R8040BYOLMGMT: ami-09d208d0a88dbe462 + R8040PAYGMGMT: ami-050be078a0fa63335 + R8040PAYGNGTP: ami-0aa468ef4fecab848 + R8040PAYGNGTPGW: ami-00b70b7e2d05cc149 + R8040PAYGNGTXGW: ami-015b058b058156900 + R8110BYOLGW: ami-08dd0f9d65a063cde + R8110BYOLMGMT: ami-054ec01dfc0ad7535 + R8110PAYGMGMT: ami-0472926c7b42e41bf + R8110PAYGNGTP: ami-04dc222edf7549957 + R8110PAYGNGTPGW: ami-0ae7e62c14c5d8e3c + R8110PAYGNGTXGW: ami-008aa1284773c4674 + R81BYOLGW: ami-0c5876920fea1437c + R81BYOLMGMT: ami-0123aaa0e57bbf717 + R81PAYGMGMT: ami-0f5b03c0ae5424752 + R81PAYGNGTP: ami-08178122a9dc108f7 + R81PAYGNGTPGW: ami-0f0a64c683931f061 + R81PAYGNGTXGW: ami-0ef26b4e8e9603cab + eu-south-1: + R8030BYOLGW: ami-0f6ea5a3ecd690516 + R8030BYOLMGMT: ami-0513a62780606c2b7 + R8030PAYGMGMT: ami-0f91fa9d0000e6ecb + R8030PAYGNGTPGW: ami-00a307e402c74bfa6 + R8030PAYGNGTXGW: ami-08c752aa84df99b8b + R8040BYOLGW: ami-0cdec9d8d3c343ded + R8040BYOLMGMT: ami-0e2b5308c9d3c9711 + R8040PAYGMGMT: ami-0bff34e6245603903 + R8040PAYGNGTP: ami-060b71dfc4cb80a73 + R8040PAYGNGTPGW: ami-0832ec87cb1e3f07d + R8040PAYGNGTXGW: ami-0ac2c78aa3edb83ae + R8110BYOLGW: ami-083744fddd654e487 + R8110BYOLMGMT: ami-0d526cc274b3384b7 + R8110PAYGMGMT: ami-0b4b35f666b3e20cf + R8110PAYGNGTP: ami-031199fb24a9d8361 + R8110PAYGNGTPGW: ami-0e7aedc192fb693a3 + R8110PAYGNGTXGW: ami-0477ae2d12c77ad70 + R81BYOLGW: ami-06ad92019911a3212 + R81BYOLMGMT: ami-09ec9482f4a30da1a + R81PAYGMGMT: ami-021d560084aac2532 + R81PAYGNGTP: ami-00f4c8a8c323859f5 + R81PAYGNGTPGW: ami-095e9af13d0c973ac + R81PAYGNGTXGW: ami-00ba54000e62a2ce8 + eu-west-1: + R7730BYOL: ami-0d610a74 + R7730PAYGNGTP: ami-0f600b76 + R80: ami-7c66510f + R8010BYOL: ami-0afd8ac581c0910ba + R8010BYOLGW: ami-09dc5e32b9dfc0579 + R8010PAYGMGMT: ami-0bc54382eefa16887 + R8010PAYGNGTP: ami-08114474e1a2eeb8a + R8010PAYGNGTPGW: ami-029e2439e1e2776ae + R8010PAYGNGTXGW: ami-0f30ab8d92b94ddb9 + R8020BYOLGW: ami-0f33541dab1ed55a3 + R8020BYOLMGMT: ami-0ac513a63e08647e6 + R8020PAYGMGMT: ami-012f09b535dabef2b + R8020PAYGNGTPGW: ami-000e62e5fab54198d + R8020PAYGNGTXGW: ami-0505fe24955ed29ea + R8030BYOLGW: ami-0701d32fd9db6b5b9 + R8030BYOLMGMT: ami-0cc64c5d8138a1b8e + R8030PAYGMGMT: ami-0b82b9e18b3e6f90c + R8030PAYGNGTPGW: ami-09ae59bb48e8d164d + R8030PAYGNGTXGW: ami-0f29a9e7513326b97 + R8040BYOLGW: ami-03da5e7684e334493 + R8040BYOLMGMT: ami-0ef7a4188bd04d498 + R8040PAYGMGMT: ami-0c08a90bcb2c0be3a + R8040PAYGNGTP: ami-074709d485f6bc7ec + R8040PAYGNGTPGW: ami-02ac1d55a1abacf85 + R8040PAYGNGTXGW: ami-09ce21bf6754bea02 + R8110BYOLGW: ami-07ed98090d847cc26 + R8110BYOLMGMT: ami-085bde5b02743e747 + R8110PAYGMGMT: ami-08374ce7537ffb39b + R8110PAYGNGTP: ami-0484f2a3a88751652 + R8110PAYGNGTPGW: ami-0e0790923e34e010b + R8110PAYGNGTXGW: ami-0b00364820a669886 + R81BYOLGW: ami-0aadac035dc0f2205 + R81BYOLMGMT: ami-0c41c52b0c4408240 + R81PAYGMGMT: ami-0dc9932fbecfe21a3 + R81PAYGNGTP: ami-0c9e08d5296655112 + R81PAYGNGTPGW: ami-0d91e6001ec249b73 + R81PAYGNGTXGW: ami-0e47038524a4cdf88 + eu-west-2: + R7730BYOL: ami-f1947196 + R7730PAYGNGTP: ami-5896733f + R80: ami-d49c96b0 + R8010BYOL: ami-037cbdfb453b16460 + R8010BYOLGW: ami-022a1b343943e2290 + R8010PAYGMGMT: ami-0a68722435a74b89a + R8010PAYGNGTP: ami-0bc5171032edd1240 + R8010PAYGNGTPGW: ami-05259824ddeb5cb0a + R8010PAYGNGTXGW: ami-070c6359481b8d365 + R8020BYOLGW: ami-0f646df97f3aca149 + R8020BYOLMGMT: ami-074e6a2e97c5d38e7 + R8020PAYGMGMT: ami-02aaa3e97e2ec504e + R8020PAYGNGTPGW: ami-09f1bda44f355ca32 + R8020PAYGNGTXGW: ami-00bfdd98ad57b4833 + R8030BYOLGW: ami-082007c24f226aa4e + R8030BYOLMGMT: ami-01f6f69a1301b3a67 + R8030PAYGMGMT: ami-0f96d688301d136b7 + R8030PAYGNGTPGW: ami-03362fc955bf0bb73 + R8030PAYGNGTXGW: ami-064750e60bf6e7176 + R8040BYOLGW: ami-0c97bd4fdb04eedb8 + R8040BYOLMGMT: ami-0aaba8b6227eed80f + R8040PAYGMGMT: ami-000d562ab106f8e8e + R8040PAYGNGTP: ami-0cbb495ad0c90d2f3 + R8040PAYGNGTPGW: ami-069ec73aa8655d3ce + R8040PAYGNGTXGW: ami-0b0da8b8647bf7261 + R8110BYOLGW: ami-0fbdb431d9207f894 + R8110BYOLMGMT: ami-0ea05e6685bbf246c + R8110PAYGMGMT: ami-0b5edaecd89a30b82 + R8110PAYGNGTP: ami-09bc49698e3856b4a + R8110PAYGNGTPGW: ami-00e840aed0ccf8830 + R8110PAYGNGTXGW: ami-0e7fea16089ca6a10 + R81BYOLGW: ami-014af5cbb8f08ef76 + R81BYOLMGMT: ami-081af5a6474747996 + R81PAYGMGMT: ami-0873651f596c5af79 + R81PAYGNGTP: ami-09a2e3c4de113eb63 + R81PAYGNGTPGW: ami-0cdce7d36370388eb + R81PAYGNGTXGW: ami-024dba915d3f488a5 + eu-west-3: + R8020BYOLGW: ami-0e3cf44775e0b27f3 + R8020BYOLMGMT: ami-0ab52dca5ee654c3d + R8020PAYGMGMT: ami-0cfafe191cd830615 + R8020PAYGNGTPGW: ami-0a984b71664d90df8 + R8020PAYGNGTXGW: ami-0c0ad90b14474144b + R8030BYOLGW: ami-0058d3a2fd9bbf331 + R8030BYOLMGMT: ami-0b698ba03b931ea4a + R8030PAYGMGMT: ami-0d7abb21c40c139f8 + R8030PAYGNGTPGW: ami-015409ae2b88cd570 + R8030PAYGNGTXGW: ami-0167b0ff3c9965ed9 + R8040BYOLGW: ami-0c6a225b2b71784e0 + R8040BYOLMGMT: ami-04a6f4836d98dfffb + R8040PAYGMGMT: ami-02db135d2fa15c2ed + R8040PAYGNGTP: ami-08b683f8ec3df7cb5 + R8040PAYGNGTPGW: ami-085aeef1012ed1fde + R8040PAYGNGTXGW: ami-04adcc0f685b2a479 + R8110BYOLGW: ami-0b5636b102723d564 + R8110BYOLMGMT: ami-0616bad63e08c09b4 + R8110PAYGMGMT: ami-0cd642e130fb7b36c + R8110PAYGNGTP: ami-03d3dfad3a0507f0b + R8110PAYGNGTPGW: ami-03905701ed8a809bb + R8110PAYGNGTXGW: ami-079ea6ebbaab9c655 + R81BYOLGW: ami-04891a02af063a69c + R81BYOLMGMT: ami-0abae9ef622c81ce8 + R81PAYGMGMT: ami-075f8df13b3b8585d + R81PAYGNGTP: ami-05026a3694a8fea2f + R81PAYGNGTPGW: ami-0cde0d7793223781b + R81PAYGNGTXGW: ami-005b1b1a04545669d + me-south-1: + R8020BYOLGW: ami-0ced3e9c36e09eb77 + R8020BYOLMGMT: ami-05a7a580a372e9477 + R8030BYOLGW: ami-00ad6307498e44ef9 + R8030BYOLMGMT: ami-033a6660cacfc6031 + R8030PAYGMGMT: ami-0fab614028aba78da + R8030PAYGNGTPGW: ami-0e72ce61de66d2f77 + R8030PAYGNGTXGW: ami-040a8969a32e4c8fd + R8040BYOLGW: ami-0caca3f57055802fc + R8040BYOLMGMT: ami-0c5f3511b4b6775b3 + R8040PAYGMGMT: ami-0ac7336be75148e1c + R8040PAYGNGTP: ami-0414273614b637bc0 + R8040PAYGNGTPGW: ami-06c2b3f198dbafd4e + R8040PAYGNGTXGW: ami-0508c5354df7e53cb + R8110BYOLGW: ami-07e978b51867321c7 + R8110BYOLMGMT: ami-0633660ba7692f184 + R8110PAYGMGMT: ami-0bc1787aee83f0748 + R8110PAYGNGTP: ami-06adfd8f8f0954715 + R8110PAYGNGTPGW: ami-0f4d7b17ef77821df + R8110PAYGNGTXGW: ami-0c85339635434298b + R81BYOLGW: ami-0af48660d3165c57f + R81BYOLMGMT: ami-0f5415c537d0284aa + R81PAYGMGMT: ami-09b62c52acd3f9e61 + R81PAYGNGTP: ami-0b7a2a76014d38401 + R81PAYGNGTPGW: ami-04860faf1af991ef2 + R81PAYGNGTXGW: ami-0704114c9325bb4c1 + sa-east-1: + R7730BYOL: ami-465a142a + R7730PAYGNGTP: ami-145f1178 + R80: ami-902a4ffc + R8010BYOL: ami-07260e53cab503dba + R8010BYOLGW: ami-0eeacdb5e101d1cae + R8010PAYGMGMT: ami-0380f7acf92398c71 + R8010PAYGNGTP: ami-0ce6ae0b05edf700d + R8010PAYGNGTPGW: ami-0ab0b9d970bbc1999 + R8010PAYGNGTXGW: ami-07001708edf1a5d19 + R8020BYOLGW: ami-0770cd3dd2f8015b4 + R8020BYOLMGMT: ami-0954d03f5c4518a01 + R8020PAYGMGMT: ami-0a8f3a430cfc237bb + R8020PAYGNGTPGW: ami-02c6354520206a247 + R8020PAYGNGTXGW: ami-0de5ac9524daac7fa + R8030BYOLGW: ami-03a504b71a46c4969 + R8030BYOLMGMT: ami-04e0f3314ca1514e1 + R8030PAYGMGMT: ami-006e4dfec0a5c8400 + R8030PAYGNGTPGW: ami-0330aa745160cf710 + R8030PAYGNGTXGW: ami-0815ab34344057cff + R8040BYOLGW: ami-033f68a4773e50095 + R8040BYOLMGMT: ami-0206fc7a2f2a85e98 + R8040PAYGMGMT: ami-0278b17df7e8560a9 + R8040PAYGNGTP: ami-032f39036c0d6f0d9 + R8040PAYGNGTPGW: ami-0b965f729db8917d6 + R8040PAYGNGTXGW: ami-0fff9b5c847027203 + R8110BYOLGW: ami-0e2f9a46317b9d1d8 + R8110BYOLMGMT: ami-0506598a227058d4d + R8110PAYGMGMT: ami-09c4c6b27dcb0f089 + R8110PAYGNGTP: ami-06dd56f72f0dae01c + R8110PAYGNGTPGW: ami-05d6285e27ca9a12e + R8110PAYGNGTXGW: ami-0c5a33ccb2dbab1c8 + R81BYOLGW: ami-0b02761297e8cc184 + R81BYOLMGMT: ami-0aad379a2e76871c4 + R81PAYGMGMT: ami-05a8eaafd0086dd30 + R81PAYGNGTP: ami-0aabf7d0c4e06f558 + R81PAYGNGTPGW: ami-04b8196cc52d9cc77 + R81PAYGNGTXGW: ami-031af8b5efac7a855 + us-east-1: + R7730BYOL: ami-a5e7ecdf + R7730PAYGNGTP: ami-38e3e842 + R80: ami-a66981b0 + R8010BYOL: ami-0440ee050d3e88cfb + R8010BYOLGW: ami-0124c88f4fdd536ad + R8010PAYGMGMT: ami-08eade031a29d7baa + R8010PAYGNGTP: ami-091e783ea2c3140f5 + R8010PAYGNGTPGW: ami-020c71af2189ed276 + R8010PAYGNGTXGW: ami-0b57721fd1acec863 + R8020BYOLGW: ami-0a6b1e46c8f177855 + R8020BYOLMGMT: ami-0ea21bf4cc69253ba + R8020PAYGMGMT: ami-01fb6697db4809fb2 + R8020PAYGNGTPGW: ami-0a3134e64a8bf4a72 + R8020PAYGNGTXGW: ami-00a8424868cdd4279 + R8030BYOLGW: ami-03170775e3dcdc0fd + R8030BYOLMGMT: ami-0f4efe815a0d05ada + R8030PAYGMGMT: ami-07cf15e8e47c0b63f + R8030PAYGNGTPGW: ami-0ba0d6dc0ee67d195 + R8030PAYGNGTXGW: ami-06a91bdda557b2154 + R8040BYOLGW: ami-0ff245803cb655372 + R8040BYOLMGMT: ami-03c9ca61805b44229 + R8040PAYGMGMT: ami-06f4b914d5d4126e7 + R8040PAYGNGTP: ami-0b7a1ca7f5ee3f0e6 + R8040PAYGNGTPGW: ami-0eff7e741b2b1dcbd + R8040PAYGNGTXGW: ami-049ac6bede4e97a69 + R8110BYOLGW: ami-007424b2d44c31736 + R8110BYOLMGMT: ami-0ac445e19e4e78df8 + R8110PAYGMGMT: ami-0084c0d044ae2f224 + R8110PAYGNGTP: ami-0a87db56a71c29734 + R8110PAYGNGTPGW: ami-07446fd99ed3ad3c6 + R8110PAYGNGTXGW: ami-0b793df740544b65a + R81BYOLGW: ami-03174299fab6da85a + R81BYOLMGMT: ami-02266130eb2e8d7b3 + R81PAYGMGMT: ami-096757964d178972a + R81PAYGNGTP: ami-0b6be36b68c920621 + R81PAYGNGTPGW: ami-0b5e54d90f2650c87 + R81PAYGNGTXGW: ami-06640d255ed8de0d1 + us-east-2: + R7730BYOL: ami-da6652bf + R7730PAYGNGTP: ami-7d675318 + R80: ami-5840653d + R8010BYOL: ami-0a10586bafc475f7d + R8010BYOLGW: ami-05cfbd1548bc51b40 + R8010PAYGMGMT: ami-08627e9d094884b6d + R8010PAYGNGTP: ami-0d304c8b8895df14b + R8010PAYGNGTPGW: ami-0c6ed3eef7fc48b59 + R8010PAYGNGTXGW: ami-0f9e87edcb3adeb6b + R8020BYOLGW: ami-07adfc0ccbd419b8d + R8020BYOLMGMT: ami-013d31a41cbace161 + R8020PAYGMGMT: ami-0578aad5c8d5e117d + R8020PAYGNGTPGW: ami-0fe9baf33b2fc46c7 + R8020PAYGNGTXGW: ami-034eb4193422cd09e + R8030BYOLGW: ami-0fccb40ef3e1bb986 + R8030BYOLMGMT: ami-0df45405c19402db5 + R8030PAYGMGMT: ami-02c0eb86c1cfda2d8 + R8030PAYGNGTPGW: ami-07be19e9bff005ddd + R8030PAYGNGTXGW: ami-023346b8d18cfe326 + R8040BYOLGW: ami-076d9e0f09a5b4c9d + R8040BYOLMGMT: ami-088a4cb03ab6615c5 + R8040PAYGMGMT: ami-0399edc966bc550f4 + R8040PAYGNGTP: ami-045500ebd9f70e687 + R8040PAYGNGTPGW: ami-0c6a8b8dda122a2d3 + R8040PAYGNGTXGW: ami-06bb92cd6f1f4bee8 + R8110BYOLGW: ami-0fe85e5c21e91ea44 + R8110BYOLMGMT: ami-039ffa22f6cb700fa + R8110PAYGMGMT: ami-0ff42bfcd43b9ebb1 + R8110PAYGNGTP: ami-0ca516c6fe13248e3 + R8110PAYGNGTPGW: ami-053d15df7035bffa9 + R8110PAYGNGTXGW: ami-03a8882e7e9268d53 + R81BYOLGW: ami-0e584963b2a998078 + R81BYOLMGMT: ami-0ab75994f0ad3d853 + R81PAYGMGMT: ami-050116f25c888713a + R81PAYGNGTP: ami-0b7f832d76085989e + R81PAYGNGTPGW: ami-01937447a0b671fb5 + R81PAYGNGTXGW: ami-020f075b90d4f31d2 + us-gov-east-1: + R8030BYOLGW: ami-020c3c10069e62316 + R8030BYOLMGMT: ami-02d527d37a8dd2f4e + R8030PAYGMGMT: ami-0a96048bd5acaf6e5 + R8030PAYGNGTPGW: ami-0a306691000515541 + R8030PAYGNGTXGW: ami-04a8ac3953a87499d + R8040BYOLGW: ami-047323d40ba898e21 + R8040BYOLMGMT: ami-086027b27b8a71892 + R8040PAYGMGMT: ami-0573429d8bf258f54 + R8040PAYGNGTP: ami-0479eafce15f392bc + R8040PAYGNGTPGW: ami-0bd921beeade72e91 + R8040PAYGNGTXGW: ami-0c2e611e2839d1a17 + R8110BYOLGW: ami-0dc68b66fb044298c + R8110BYOLMGMT: ami-04255be5c30842cee + R8110PAYGMGMT: ami-0980da9a23280d97d + R8110PAYGNGTP: ami-0d7012d3c5fdafdef + R8110PAYGNGTPGW: ami-0e9ded98fd1e23249 + R8110PAYGNGTXGW: ami-0ba0db07e14d72e65 + R81BYOLGW: ami-025e652ae7a7cf7ed + R81BYOLMGMT: ami-04255be5c30842cee + R81PAYGMGMT: ami-0a2db3233a27664e6 + R81PAYGNGTP: ami-0a3f74786a48358b8 + R81PAYGNGTPGW: ami-07b7c0602db8a843b + R81PAYGNGTXGW: ami-07446d49da0e508ad + us-gov-west-1: + R7730BYOL: ami-185dcb79 + R7730PAYGNGTP: ami-7c5cca1d + R80: ami-0b269d6a + R8010BYOL: ami-30851351 + R8010BYOLGW: ami-ed0f768c + R8010PAYGMGMT: ami-1b6f1f7a + R8010PAYGNGTP: ami-505cc231 + R8010PAYGNGTPGW: ami-090b7268 + R8010PAYGNGTXGW: ami-170d7476 + R8020BYOLGW: ami-1091f071 + R8020BYOLMGMT: ami-56e09a37 + R8020PAYGMGMT: ami-53e09a32 + R8020PAYGNGTPGW: ami-6693f207 + R8020PAYGNGTXGW: ami-1d74057c + R8030BYOLGW: ami-03ae5602e1eae6d32 + R8030BYOLMGMT: ami-0ad54e22c27a1692b + R8030PAYGMGMT: ami-0ba31a7758fd39c6d + R8030PAYGNGTPGW: ami-046a9871517b40485 + R8030PAYGNGTXGW: ami-05b079f04f0c20cb6 + R8040BYOLGW: ami-008501303b3e3f1f4 + R8040BYOLMGMT: ami-02af4fc9a4ab553e5 + R8040PAYGMGMT: ami-0763ecd1d1f92502b + R8040PAYGNGTP: ami-0e5a19ff2e6c723f7 + R8040PAYGNGTPGW: ami-055a35ab40c835338 + R8040PAYGNGTXGW: ami-0bb56cbc6a73f21fe + R8110BYOLGW: ami-0668982ff6606bb2f + R8110BYOLMGMT: ami-05f01726f897d5577 + R8110PAYGMGMT: ami-005a191a34c1e6681 + R8110PAYGNGTP: ami-0b22deca697af2647 + R8110PAYGNGTPGW: ami-031a5e8b5bfd6dc0f + R8110PAYGNGTXGW: ami-0c88eeb20a7eb0794 + R81BYOLGW: ami-007a9c4211a366b44 + R81BYOLMGMT: ami-05f01726f897d5577 + R81PAYGMGMT: ami-01bb8e4cef6359f8a + R81PAYGNGTP: ami-0946ef6884986e797 + R81PAYGNGTPGW: ami-03ed83cf79d74e3df + R81PAYGNGTXGW: ami-0d3fbf8119e88de82 + us-west-1: + R7730BYOL: ami-9a7779fa + R7730PAYGNGTP: ami-e9747a89 + R80: ami-6b04560b + R8010BYOL: ami-05638ae2b353d70af + R8010BYOLGW: ami-080e8737fb2e85e8c + R8010PAYGMGMT: ami-0c573cf5a90e27c95 + R8010PAYGNGTP: ami-0f859106e82110b41 + R8010PAYGNGTPGW: ami-0c0537945b239e780 + R8010PAYGNGTXGW: ami-054574dbcc5435088 + R8020BYOLGW: ami-0ec9959052929d301 + R8020BYOLMGMT: ami-0e9c3d76490288937 + R8020PAYGMGMT: ami-056da473b095447b3 + R8020PAYGNGTPGW: ami-066b154d2f9ac76dd + R8020PAYGNGTXGW: ami-034edfbdac10ba48a + R8030BYOLGW: ami-0f3d85f20b1e729e5 + R8030BYOLMGMT: ami-00c5c9257bb3abaab + R8030PAYGMGMT: ami-02a9479ed8f0e241e + R8030PAYGNGTPGW: ami-05db4ed60ed6d2ae2 + R8030PAYGNGTXGW: ami-084308058e95353ff + R8040BYOLGW: ami-06f0ec3aafb884e27 + R8040BYOLMGMT: ami-068afdebed6e687e0 + R8040PAYGMGMT: ami-050ee2a472c36293d + R8040PAYGNGTP: ami-0725b90f5b6749cb3 + R8040PAYGNGTPGW: ami-0890412c009fb4f41 + R8040PAYGNGTXGW: ami-033a2aaf71753d1a8 + R8110BYOLGW: ami-0dc3bb0b9b1ac2749 + R8110BYOLMGMT: ami-0c7a1913f94aa3ebf + R8110PAYGMGMT: ami-0fa2f04f282dc4680 + R8110PAYGNGTP: ami-0ad5745360fbbeac3 + R8110PAYGNGTPGW: ami-0be55276f5f1d7158 + R8110PAYGNGTXGW: ami-0fd592a3c70541d8b + R81BYOLGW: ami-0d9ec959469a34b98 + R81BYOLMGMT: ami-016fead41e7aef422 + R81PAYGMGMT: ami-0384d69d91bc76bf9 + R81PAYGNGTP: ami-00d659bf1a1da7dd3 + R81PAYGNGTPGW: ami-0ce96ce6035f8d574 + R81PAYGNGTXGW: ami-09ad09f82e06a21cd + us-west-2: + R7730BYOL: ami-d972f5a1 + R7730PAYGNGTP: ami-d77dfaaf + R80: ami-b7ff40d7 + R8010BYOL: ami-0b80165993f1dbae5 + R8010BYOLGW: ami-07336f4d55ecbfaa2 + R8010PAYGMGMT: ami-0348f20190c8dc7f8 + R8010PAYGNGTP: ami-0cbf6b8cb0655bcd6 + R8010PAYGNGTPGW: ami-05a257fbb4f202fff + R8010PAYGNGTXGW: ami-0b4794847d7185dab + R8020BYOLGW: ami-073d8ecd3b05d4a86 + R8020BYOLMGMT: ami-054b2881c9baced2e + R8020PAYGMGMT: ami-0467631c9da49090d + R8020PAYGNGTPGW: ami-0d941e5382ef77168 + R8020PAYGNGTXGW: ami-0759646662b017119 + R8030BYOLGW: ami-05ba79f4c2c0d2f71 + R8030BYOLMGMT: ami-0f8c54b15afe13f9f + R8030PAYGMGMT: ami-0429a4efb451f85d1 + R8030PAYGNGTPGW: ami-059e754e35e2825a4 + R8030PAYGNGTXGW: ami-08f8598c439143abc + R8040BYOLGW: ami-00d43219d98df6307 + R8040BYOLMGMT: ami-01e52ed8fde0994f7 + R8040PAYGMGMT: ami-09464f900adc59381 + R8040PAYGNGTP: ami-0c6294327d0ec776e + R8040PAYGNGTPGW: ami-08f6f71ebd33f47a6 + R8040PAYGNGTXGW: ami-07169f659d8cc0a86 + R8110BYOLGW: ami-01d9bb616b359a7de + R8110BYOLMGMT: ami-0309922da03f9f486 + R8110PAYGMGMT: ami-02cde105f1e8f8351 + R8110PAYGNGTP: ami-058cc8afc5b217cc3 + R8110PAYGNGTPGW: ami-051c82cead8b4a9f1 + R8110PAYGNGTXGW: ami-09228d9ff29e80659 + R81BYOLGW: ami-017e0b6d807998d6a + R81BYOLMGMT: ami-0005b60ab19904280 + R81PAYGMGMT: ami-018ea3c7f99152efc + R81PAYGNGTP: ami-0bc32f42a5bad02cc + R81PAYGNGTPGW: ami-0e3a1782975ed8dfd + R81PAYGNGTXGW: ami-080baf9e6316012e9 +Resources: + DummyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Properties: {} +Outputs: + ImageId: + Description: Check Point Security Gateway AMI + Value: !FindInMap [RegionMap ,!Ref 'AWS::Region', !FindInMap [ConverterMap, !Ref 'Version', Value]] diff --git a/aws/templates/general/cme-iam-role.yaml b/aws/templates/general/cme-iam-role.yaml new file mode 100644 index 00000000..45680af7 --- /dev/null +++ b/aws/templates/general/cme-iam-role.yaml @@ -0,0 +1,159 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Creates an IAM role for selected permissions (20240507) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: IAM + Parameters: + - Permissions + - Label: + default: Advanced Configuration (optional) + Parameters: + - STSRoles + - TrustedAccount + ParameterLabels: + Permissions: + default: IAM role + STSRoles: + default: STS roles + TrustedAccount: + default: Trusted Account ID +Parameters: + Permissions: + Type: String + Default: Create with read permissions + AllowedValues: + - Create with read permissions + - Create with read-write permissions + - Create with assume role permissions (specify an STS role ARN) + STSRoles: + Description: The IAM role will be able to assume these STS Roles (comma separated list of ARNs, without spaces). + Type: String + Default: '' + TrustedAccount: + Description: A 12 digits number that represents the ID of a trusted account. IAM users in this account will be able assume the IAM role and receive the permissions attached to it. + Type: String + Default: '' + AllowedPattern: '^([0-9]{12})|$' +Conditions: + AllowReadPermissions: !Or + - !Equals [!Ref Permissions, Create with read permissions] + - !Equals [!Ref Permissions, Create with read-write permissions] + AllowWritePermissions: !Equals [!Ref Permissions, Create with read-write permissions] + ProvidedSTSRoles: !Not [!Equals [!Ref STSRoles, '']] + NotProvidedTrustedAccount: !Equals ['', !Ref TrustedAccount] + ProvidedTrustedAccount: !Not [!Condition NotProvidedTrustedAccount] +Resources: + CMEIAMRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - !If + - ProvidedTrustedAccount + - Effect: Allow + Principal: + AWS: [!Ref TrustedAccount] + Action: ['sts:AssumeRole'] + - !Ref 'AWS::NoValue' + - !If + - NotProvidedTrustedAccount + - Effect: Allow + Principal: + Service: [ec2.amazonaws.com] + Action: ['sts:AssumeRole'] + - !Ref 'AWS::NoValue' + Path: / + Policies: + - PolicyName: CMEPolicy + PolicyDocument: + Version: 2012-10-17 + Statement: + - !If + - ProvidedSTSRoles + - Effect: Allow + Action: ['sts:AssumeRole'] + Resource: !Split [',', !Ref STSRoles] + - !Ref 'AWS::NoValue' + - !If + - AllowReadPermissions + - Effect: Allow + Action: + - autoscaling:DescribeAutoScalingGroups + - ec2:DescribeRegions + - ec2:DescribeCustomerGateways + - ec2:DescribeInstances + - ec2:DescribeNetworkInterfaces + - ec2:DescribeRouteTables + - ec2:DescribeSecurityGroups + - ec2:DescribeSubnets + - ec2:DescribeTransitGateways + - ec2:DescribeTransitGatewayAttachments + - ec2:DescribeTransitGatewayRouteTables + - ec2:DescribeVpcs + - ec2:DescribeVpnGateways + - ec2:DescribeVpnConnections + - ec2:GetTransitGatewayAttachmentPropagations + - elasticloadbalancing:DescribeLoadBalancers + - elasticloadbalancing:DescribeTags + - elasticloadbalancing:DescribeListeners + - elasticloadbalancing:DescribeTargetGroups + - elasticloadbalancing:DescribeRules + - elasticloadbalancing:DescribeTargetHealth + Resource: '*' + - !Ref 'AWS::NoValue' + - !If + - AllowWritePermissions + - Effect: Allow + Action: + - ec2:AssociateTransitGatewayRouteTable + - ec2:AttachVpnGateway + - ec2:CreateCustomerGateway + - ec2:CreateVpnConnection + - ec2:CreateVpnGateway + - ec2:DeleteCustomerGateway + - ec2:DeleteVpnConnection + - ec2:DeleteVpnGateway + - ec2:DetachVpnGateway + - ec2:DisableTransitGatewayRouteTablePropagation + - ec2:DisableVgwRoutePropagation + - ec2:DisassociateTransitGatewayRouteTable + - ec2:EnableTransitGatewayRouteTablePropagation + - ec2:EnableVgwRoutePropagation + Resource: '*' + - !Ref 'AWS::NoValue' + - !If + - AllowWritePermissions + - Effect: Allow + Action: + - cloudformation:DescribeStacks + - cloudformation:DescribeStackResources + - cloudformation:ListStacks + Resource: '*' + - !Ref 'AWS::NoValue' + - !If + - AllowWritePermissions + - Effect: Allow + Action: + - cloudformation:CreateStack + - cloudformation:DeleteStack + Resource: 'arn:aws:cloudformation:*:*:stack/vpn-by-tag--*/*' + - !Ref 'AWS::NoValue' + InstanceProfile: + Type: AWS::IAM::InstanceProfile + Properties: + InstanceProfileName: !Ref CMEIAMRole + Roles: + - !Ref CMEIAMRole +Outputs: + CMEIAMRole: + Description: The IAM role. + Value: !Ref CMEIAMRole + CMEARNRole: + Description: The IAM role ARN. + Value: !GetAtt CMEIAMRole.Arn + InstanceProfile: + Description: The Instance Profile ARN. + Value: !GetAtt InstanceProfile.Arn \ No newline at end of file diff --git a/aws/templates/geo-cluster/README.md b/aws/templates/geo-cluster/README.md new file mode 100644 index 00000000..e6e30d5d --- /dev/null +++ b/aws/templates/geo-cluster/README.md @@ -0,0 +1,26 @@ + +## Cross Availability Zone Cluster + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys two Security Gateways, each in a different Availability Zone.

For more details, refer to CloudGuard Transit Gateway High Availability for AWS R80.40 Administration Guide. +
Creates a new VPC and deploys a Cross Availability Zone Cluster of Security Gateways into it.
Deploys a Cross Availability Zone Cluster of Security Gateways into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/geo-cluster/geo-cluster-master.yaml b/aws/templates/geo-cluster/geo-cluster-master.yaml new file mode 100644 index 00000000..d030832c --- /dev/null +++ b/aws/templates/geo-cluster/geo-cluster-master.yaml @@ -0,0 +1,518 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Check Point cross AZ Cluster in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PrivateSubnet1CIDR + - PrivateSubnet2CIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + AvailabilityZones: + default: Availability Zones + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public subnet 1 CIDR + PublicSubnet2CIDR: + default: Public subnet 2 CIDR + PrivateSubnet1CIDR: + default: Private subnet 1 CIDR + PrivateSubnet2CIDR: + default: Private subnet 2 CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved). + Type: List + MinLength: 2 + VPCCIDR: + Description: CIDR block for the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet1CIDR: + Description: CIDR block for private subnet 1 located in the 1st Availability Zone. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet2CIDR: + Description: CIDR block for private subnet 2 located in the 2nd Availability Zone. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.21.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: When choosing "false", make sure the cluster members can connect to an ec2 endpoint. + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Description: The license to install on the Security Gateways. + Type: String + Default: R81.10-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to + get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between + Check Point components. Choose a random string consisting of at least 8 + alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: >- + Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: 2 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PrivateSubnet1CIDR: !Ref PrivateSubnet1CIDR + PrivateSubnet2CIDR: !Ref PrivateSubnet2CIDR + InternalRouteTable: + Type: AWS::EC2::RouteTable + DependsOn: VPCStack + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: Private Subnets Route Table + ClusterStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary +Outputs: + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberAPrivateExternalAddress: + Description: The private external address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateExternalAddress + MemberAPrivateInternalAddress: + Description: The private internal address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPrivateInternalAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBPrivateExternalAddress: + Description: The private external address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateExternalAddress + MemberBPrivateInternalAddress: + Description: The private internal address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPrivateInternalAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/geo-cluster/geo-cluster.yaml b/aws/templates/geo-cluster/geo-cluster.yaml new file mode 100644 index 00000000..86d9ea95 --- /dev/null +++ b/aws/templates/geo-cluster/geo-cluster.yaml @@ -0,0 +1,708 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point cross AZ Cluster into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: you must select a VPC. + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway. + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway. + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway. + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway. + InternalRouteTable: + Description: Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Cluster, this requires manual configuration in the Route Table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: When choosing "false", make sure the cluster members can connect to an ec2 endpoint. + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Description: The license to install on the Security Gateways. + Type: String + Default: R81.10-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to + get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between + Check Point components. Choose a random string consisting of at least 8 + alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: >- + Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + CreateRole: !Equals [!Ref GatewayPredefinedRole, ''] + ProvidedPassHash: !Not [!Equals [!Ref GatewayPasswordHash, '']] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + EmptyHostName: !Equals [!Ref GatewayHostname, ''] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] +Resources: + ClusterReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: AllocateAddress + Properties: {} + ClusterReadyCondition: + Type: AWS::CloudFormation::WaitCondition + Condition: AllocateAddress + DependsOn: [MemberAInstance, MemberBInstance] + Properties: + Count: 2 + Handle: !Ref ClusterReadyHandle + Timeout: 1800 + ClusterRole: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + ClusterInstanceProfile: + Type: AWS::IAM::InstanceProfile + Properties: + Path: / + Roles: [!If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole]] + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] + PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref GatewayVersion, GW]] + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - PermissiveSecurityGroup + MemberAExternalInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Description: External. + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnetA + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_ExternalInterface + MemberBExternalInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Description: External. + SourceDestCheck: false + GroupSet: [!Ref PermissiveSecurityGroup] + SubnetId: !Ref PublicSubnetB + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_ExternalInterface + MemberAInternalInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Description: Internal. + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnetA + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_A_InternalInterface + MemberBInternalInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Description: Internal. + GroupSet: [!Ref PermissiveSecurityGroup] + SourceDestCheck: false + SubnetId: !Ref PrivateSubnetB + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - Member_B_InternalInterface + InternalDefaultRoute: + Type: AWS::EC2::Route + Condition: ProvidedRouteTable + DependsOn: MemberAInternalInterface + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !Ref MemberAInternalInterface + RouteTableId: !Ref InternalRouteTable + PrivateSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: ProvidedRouteTable + Properties: + RouteTableId: !Ref InternalRouteTable + SubnetId: !Ref PrivateSubnetA + PrivateSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: ProvidedRouteTable + Properties: + RouteTableId: !Ref InternalRouteTable + SubnetId: !Ref PrivateSubnetB + MemberAInstance: + Type: AWS::EC2::Instance + DependsOn: MemberAInternalInterface + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-A]] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: !Base64 + 'Fn::Join': + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + MemberBInstance: + Type: AWS::EC2::Instance + DependsOn: MemberBInternalInterface + Properties: + Tags: + - Key: Name + Value: !Join ['-', [!Ref GatewayName, Member-B]] + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + IamInstanceProfile: !Ref ClusterInstanceProfile + DisableApiTermination: !Ref TerminationProtection + UserData: !Base64 + 'Fn::Join': + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + MemberAPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + MemberBPublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + MemberAAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberAInstance + Properties: + NetworkInterfaceId: !Ref MemberAExternalInterface + AllocationId: !GetAtt MemberAPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberBAddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: MemberBInstance + Properties: + NetworkInterfaceId: !Ref MemberBExternalInterface + AllocationId: !GetAtt MemberBPublicAddress.AllocationId + PrivateIpAddress: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress +Outputs: + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !Ref MemberAPublicAddress + MemberAPrivateExternalAddress: + Description: The private external address of member A. + Value: !GetAtt MemberAExternalInterface.PrimaryPrivateIpAddress + MemberAPrivateInternalAddress: + Description: The private internal address of member A. + Value: !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress + MemberAExternalInterface: + Description: The external interface of member A. + Value: !Ref MemberAExternalInterface + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberAPublicAddress]] + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !Join ['', ['https://', !Ref MemberAPublicAddress]] + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !Ref MemberBPublicAddress + MemberBPrivateExternalAddress: + Description: The private external address of member B. + Value: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress + MemberBPrivateInternalAddress: + Description: The private internal address of member B. + Value: !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress + MemberBExternalInterface: + Description: The external interface of member B. + Value: !Ref MemberBExternalInterface + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref MemberBPublicAddress]] + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !Join ['', ['https://', !Ref MemberBPublicAddress]] +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/gwlb-asg/README.md b/aws/templates/gwlb-asg/README.md new file mode 100644 index 00000000..26eda643 --- /dev/null +++ b/aws/templates/gwlb-asg/README.md @@ -0,0 +1,58 @@ + +## Gateway Load Balancer (GWLB) Auto Scaling Group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures an AWS Auto Scaling group configured for Gateway Load Balancer in a Centralized Security VPC.

For more details, refer to CloudGuard Network for AWS Centralized Gateway Load Balancer R80.40 Deployment Guide. +
Creates a new VPC and deploys into it a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server.
+ Deploys and configures an AWS Auto Scaling group configured for Gateway Load Balancer in a Centralized Security VPC.

For more details, refer to CloudGuard Network for AWS Centralized Gateway Load Balancer R80.40 Deployment Guide. +
Deploys a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server into an existing VPC.
+ Deploys and configures an AWS Auto Scaling group configured for Gateway Load Balancer in a Centralized Security VPC for Transit Gateway.

For more details, refer to CloudGuard Network for AWS Gateway Load Balancer Security VPC for Transit Gateway R80.40 Deployment Guide. +
Creates a new VPC and deploys into it a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, for Transit Gateway.
+ Deploys and configures an AWS Auto Scaling group configured for Gateway Load Balancer in a Centralized Security VPC for Transit Gateway.

For more details, refer to CloudGuard Network for AWS Gateway Load Balancer Security VPC for Transit Gateway R80.40 Deployment Guide. +
Deploys a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, for Transit Gateway into an existing VPC.
+ Deploys and configures a Quick Start AWS Auto Scaling Group configured for Gateway Load Balancer in a Centralized Security VPC, and Servers in Servers VPC

For more details, refer to CloudGuard Network for AWS Centralized Gateway Load Balancer R80.40 Deployment Guide. +
Creates a new Security VPC with Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, Servers' VPC with Gateway Load Balancer Endpoints (1 per Availability Zone), Application Load Balancer in Servers' VPC, Servers and optionally a Security Management Server.
+
+ Deploys and configures a Quick Start AWS Auto Scaling Group configured for Gateway Load Balancer in a Centralized Security VPC, and Servers in Servers VPC.

For more details, refer to CloudGuard Network for AWS Centralized Gateway Load Balancer R80.40 Deployment Guide. +
Deploys a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally a Security Management Server into an existing Security VPC, Gateway Load Balancer Endpoints (1 per Availability Zone), Application Load Balancer and Servers into an existing Servers' VPC.
+
+
+
diff --git a/aws/templates/gwlb-asg/gwlb-master.yaml b/aws/templates/gwlb-asg/gwlb-master.yaml new file mode 100644 index 00000000..d10e85ad --- /dev/null +++ b/aws/templates/gwlb-asg/gwlb-master.yaml @@ -0,0 +1,721 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - NumberOfAZs + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PublicSubnet3CIDR + - PublicSubnet4CIDR + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - AcceptConnectionRequired + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + ParameterLabels: + AvailabilityZones: + default: Availability Zones + NumberOfAZs: + default: Number of AZs + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Auto Scaling Group Public Subnet 1 + PublicSubnet2CIDR: + default: Auto Scaling Group Public Subnet 2 + PublicSubnet3CIDR: + default: Auto Scaling Group Public Subnet 3 + PublicSubnet4CIDR: + default: Auto Scaling Group Public Subnet 4 + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + AcceptConnectionRequired: + default: Connection Acceptance Required + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses +Parameters: + AvailabilityZones: + Description: List of Availability Zones (AZs) to use for the subnets in the VPC. Select at least two. + Type: List + MinLength: 2 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + VPCCIDR: + Description: CIDR block for the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. If you choose to deploy a Security Management Server it will be deployed in this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet3CIDR: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.30.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet4CIDR: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.40.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: gwlb1 + MaxLength: 32 + ConstraintDescription: Must be a valid GWLB Name. + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: tg1 + MaxLength: 32 + ConstraintDescription: Must be a valid target group name. + AcceptConnectionRequired: + Description: Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). + Default: "false" + AllowedValues: ["true", "false"] + Type: String + ConstraintDescription: Must be true or false. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',' , !Ref AvailabilityZones] + NumberOfAZs: !Ref NumberOfAZs + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PublicSubnet3CIDR: !Ref PublicSubnet3CIDR + PublicSubnet4CIDR: !Ref PublicSubnet4CIDR + CreatePrivateSubnets: false + GWLBStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + GatewaysSubnets: !Join + - ',' + - - !GetAtt VPCStack.Outputs.PublicSubnet1ID + - !GetAtt VPCStack.Outputs.PublicSubnet2ID + - !If [3AZs, !GetAtt VPCStack.Outputs.PublicSubnet3ID, !Ref 'AWS::NoValue'] + - !If [4AZs, !GetAtt VPCStack.Outputs.PublicSubnet4ID, !Ref 'AWS::NoValue'] + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + AllowUploadDownload: !Ref AllowUploadDownload + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + AdminEmail: !Ref AdminEmail + Shell: !Ref Shell + GWLBName: !Ref GWLBName + TargetGroupName: !Ref TargetGroupName + AcceptConnectionRequired: !Ref AcceptConnectionRequired + CrossZoneLoadBalancing: !Ref CrossZoneLoadBalancing + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + ManagementDeploy: !Ref ManagementDeploy + ManagementInstanceType: !Ref ManagementInstanceType + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + GatewaysPolicy: !Ref GatewaysPolicy + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses +Outputs: + VPCID: + Description: VPC ID. + Value: !GetAtt VPCStack.Outputs.VPCID + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt GWLBStack.Outputs.ManagementPublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !GetAtt GWLBStack.Outputs.ConfigurationTemplateName + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name + Value: !GetAtt GWLBStack.Outputs.ControllerName + GWLBName: + Description: Gateway Load Balancer Name. + Value: !Ref GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !GetAtt GWLBStack.Outputs.GWLBServiceName +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/gwlb.yaml b/aws/templates/gwlb-asg/gwlb.yaml new file mode 100644 index 00000000..8b2d8830 --- /dev/null +++ b/aws/templates/gwlb-asg/gwlb.yaml @@ -0,0 +1,720 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VPC + - GatewaysSubnets + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - AcceptConnectionRequired + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + ParameterLabels: + VPC: + default: VPC + GatewaysSubnets: + default: Gateways subnets + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + AcceptConnectionRequired: + default: Connection Acceptance Required + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC. + GatewaysSubnets: + Description: Select at least 2 public subnets in the VPC. + Type: List + MinLength: 2 + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: gwlb1 + ConstraintDescription: Must be a valid GWLB Name. + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: tg1 + ConstraintDescription: Must be a valid target group name. + AcceptConnectionRequired: + Description: Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). + Default: "false" + AllowedValues: ["true", "false"] + Type: String + ConstraintDescription: Must be true or false. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication acti.vation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' +Conditions: + DeployManagement: !Equals [!Ref ManagementDeploy, true] + VolumeEncryption: !Equals [!Ref EnableVolumeEncryption, true] +Resources: + GatewayLoadBalancer: + Type: AWS::ElasticLoadBalancingV2::LoadBalancer + Properties: + Type: gateway + Name: !Ref GWLBName + LoadBalancerAttributes: + - Key: load_balancing.cross_zone.enabled + Value: !Ref CrossZoneLoadBalancing + Subnets: !Ref GatewaysSubnets + Tags: + - Key: x-chkp-management + Value: !Ref ManagementServer + - Key: x-chkp-template + Value: !Ref ConfigurationTemplate + VpcEndpointService: + Type: AWS::EC2::VPCEndpointService + Properties: + AcceptanceRequired: !Ref AcceptConnectionRequired + GatewayLoadBalancerArns: + - !Ref GatewayLoadBalancer + TargetGroup: + Type: AWS::ElasticLoadBalancingV2::TargetGroup + Properties: + Name: !Ref TargetGroupName + Port: 6081 + Protocol: GENEVE + HealthCheckPort: 8117 + HealthCheckProtocol: TCP + TargetGroupAttributes: + - Key: deregistration_delay.timeout_seconds + Value: 20 + VpcId: !Ref VPC + TargetType: instance + Tags: + - Key: Name + Value: !Join + - "" + - - !Ref AWS::StackName + - "-tg1" + Listener: + Type: AWS::ElasticLoadBalancingV2::Listener + Properties: + DefaultActions: + - Type: forward + TargetGroupArn: !Ref TargetGroup + LoadBalancerArn: !Ref GatewayLoadBalancer + SecurityGatewaysStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml + Parameters: + VPC: !Ref VPC + GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + Shell: !Ref Shell + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + AdminEmail: !Ref AdminEmail + GatewaysTargetGroups: !Ref TargetGroup + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + AllowUploadDownload: !Ref AllowUploadDownload + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + ManagementStack: + Type: AWS::CloudFormation::Stack + Condition: DeployManagement + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml + Parameters: + VPC: !Ref VPC + ManagementSubnet: !Select [0, !Ref GatewaysSubnets] + ManagementName: !Ref ManagementServer + ManagementInstanceType: !Ref ManagementInstanceType + KeyName: !Ref KeyName + Shell: !Ref Shell + VolumeEncryption: !If [VolumeEncryption, alias/aws/ebs, ''] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + ManagementPermissions: Create with read-write permissions + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + TerminationProtection: !Ref TerminationProtection + ManagementBootstrapScript: !Join + - ';' + - - 'echo -e "\nStarting Bootstrap script\n"' + - !Sub 'policy=${GatewaysPolicy} ; region=${AWS::Region} ; conf_template=${ConfigurationTemplate} ; mgmt=${ManagementServer}' + - !Sub ['version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - !Join ['', ['sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ' | base64 -d)"']] + - 'controller="gwlb-controller"' + - 'echo "Creating CME configuration"' + - 'autoprov_cfg -f init AWS -mn "${mgmt}" -tn "${conf_template}" -cn "${controller}" -po "${policy}" -otp "${sic}" -r "${region}" -ver "${version}" -iam' + - 'echo -e "\nFinished Bootstrap script\n"' +Outputs: + VPCID: + Description: VPC ID. + Value: !Ref VPC + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt ManagementStack.Outputs.PublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: gwlb-controller + GWLBName: + Description: Gateway Load Balancer Name. + Value: !Ref GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !Sub ['com.amazonaws.vpce.${AWS::Region}.${Service}', {Service: !Ref VpcEndpointService}] +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/qs-gwlb-master.yaml b/aws/templates/gwlb-asg/qs-gwlb-master.yaml new file mode 100644 index 00000000..c95da46e --- /dev/null +++ b/aws/templates/gwlb-asg/qs-gwlb-master.yaml @@ -0,0 +1,947 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (05072024) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Security VPC Network Configuration + Parameters: + - AvailabilityZones + - NumberOfAZs + - SecurityVPCCIDR + - SecurityPublicSubnet1CIDR + - SecurityPublicSubnet2CIDR + - SecurityPublicSubnet3CIDR + - SecurityPublicSubnet4CIDR + - Label: + default: Servers VPC Network Configuration + Parameters: + - ServersVPCCIDR + - ServersPublicSubnet1CIDR + - ServersPublicSubnet2CIDR + - ServersPublicSubnet3CIDR + - ServersPublicSubnet4CIDR + - GWLBeSubnet1CIDR + - GWLBeSubnet2CIDR + - GWLBeSubnet3CIDR + - GWLBeSubnet4CIDR + - SubnetTagsInboundCIDR + - SubnetTagsOutboundCIDR + + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - AcceptConnectionRequired + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - GatewaysBlades + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Web Servers Auto Scaling Group Configuration + Parameters: + - ServerAMI + - ALBProtocol + - ServicePort + - ServerInstanceType + - ResourcesTagName + ParameterLabels: + AvailabilityZones: + default: Availability Zones + NumberOfAZs: + default: Number of AZs + SecurityVPCCIDR: + default: Security VPC CIDR + SecurityPublicSubnet1CIDR: + default: Security Auto Scaling Group Public Subnet 1 + SecurityPublicSubnet2CIDR: + default: Security Auto Scaling Group Public Subnet 2 + SecurityPublicSubnet3CIDR: + default: Security Auto Scaling Group Public Subnet 3 + SecurityPublicSubnet4CIDR: + default: Security Auto Scaling Group Public Subnet 4 + ServersVPCCIDR: + default: Servers VPC CIDR + ServersPublicSubnet1CIDR: + default: Servers Auto Scaling Group Public Subnet 1 + ServersPublicSubnet2CIDR: + default: Servers Auto Scaling Group Public Subnet 2 + ServersPublicSubnet3CIDR: + default: Servers Auto Scaling Group Public Subnet 3 + ServersPublicSubnet4CIDR: + default: Servers Auto Scaling Group Public Subnet 4 + SubnetTagsOutboundCIDR: + default: Outbound Subnet tagging for Inspection + SubnetTagsInboundCIDR: + default: Inbound Subnet tagging for Inspection + GWLBeSubnet1CIDR: + default: GWLBe subnet 1 CIDR + GWLBeSubnet2CIDR: + default: GWLBe subnet 2 CIDR + GWLBeSubnet3CIDR: + default: GWLBe subnet 3 CIDR + GWLBeSubnet4CIDR: + default: GWLBe subnet 4 CIDR + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + AcceptConnectionRequired: + default: Connection Acceptance Required + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + GatewaysBlades: + default: Default Blades + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses + ALBProtocol: + default: ALB Protocol + ServicePort: + default: Custom service port + ServerInstanceType: + default: Servers instance type + ServerAMI: + default: AMI ID + ResourcesTagName: + default: Resources tag name +Parameters: + AvailabilityZones: + Description: List of Availability Zones (AZs) to use for the subnets in the VPC. Select at least two. + Type: List + MinLength: 2 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + SecurityVPCCIDR: + Description: CIDR block for the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + SecurityPublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. If you choose to deploy a Security Management Server it will be deployed in this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + SecurityPublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + SecurityPublicSubnet3CIDR: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.30.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + SecurityPublicSubnet4CIDR: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.40.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + ServersVPCCIDR: + Description: CIDR block for the VPC. + Type: String + Default: 192.168.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + ServersPublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. + Type: String + Default: 192.168.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + ServersPublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 192.168.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + ServersPublicSubnet3CIDR: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 192.168.30.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + ServersPublicSubnet4CIDR: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone. + Type: String + Default: 192.168.40.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet1CIDR: + Description: CIDR block for the GWLBe subnet 1 located in Availability Zone 1. + Type: String + Default: 192.168.70.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet2CIDR: + Description: CIDR block for the GWLBe subnet 2 located in Availability Zone 2. + Type: String + Default: 192.168.80.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet3CIDR: + Description: CIDR block for the GWLBe subnet 3 located in Availability Zone 3. + Type: String + Default: 192.168.90.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet4CIDR: + Description: CIDR block for the GWLBe subnet 4 located in Availability Zone 4. + Type: String + Default: 192.168.100.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: gwlb1 + MaxLength: 32 + ConstraintDescription: Must be a valid GWLB Name. + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: tg1 + MaxLength: 32 + ConstraintDescription: Must be a valid target group name. + AcceptConnectionRequired: + Description: Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). + Default: "false" + AllowedValues: ["true", "false"] + Type: String + ConstraintDescription: Must be true or false. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes (use command " grub2-mkpasswd-pbkdf2" to get the PASSWORD's hash). For R81.10 and below the Admin user's password is used also as maintenance-mode password. (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes (use command " grub2-mkpasswd-pbkdf2" to get the PASSWORD's hash). For R81.10 and below the Admin user's password is used also as maintenance-mode password. (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + GatewaysBlades: + Description: Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later). + Type: String + Default: true + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + ALBProtocol: + Description: The protocol to use on the Application Load Balancer. + Type: String + Default: HTTP + AllowedValues: + - HTTP + - HTTPS + ServicePort: + Description: 'The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS.' + Type: String + AllowedPattern: '^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?$' + ConstraintDescription: Custom service port must be a number between 0 and 65535. + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + ServerInstanceType: + Description: The EC2 instance type for the web servers. + Type: String + Default: t3.micro + AllowedValues: + - t3.nano + - t3.micro + - t3.small + - t3.medium + - t3.large + - t3.xlarge + - t3.2xlarge + ConstraintDescription: Must be a valid EC2 instance type. + ServerAMI: + Description: The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63). + Type: String + AllowedPattern: '^(ami-(([0-9a-f]{8})|([0-9a-f]{17})))$' + ConstraintDescription: Amazon Machine Image ID must be in the form ami-xxxxxxxx or ami-xxxxxxxxxxxxxxxxx. + SubnetTagsInboundCIDR: + Description: Inbound Subnet tagging for Inspection (Comma-delimited list of CIDR blocks for inspection), For more information, visit the documentation at CloudGuard Network for AWS Gateway Load Balancer Auto Scaling Group Deployment Guide Admin guide. + Type: CommaDelimitedList + Default: "0.0.0.0/0" + SubnetTagsOutboundCIDR: + Description: Outbound Subnet tagging for Inspection (Comma-delimited list of CIDR blocks for inspection), For more information, visit the documentation at CloudGuard Network for AWS Gateway Load Balancer Auto Scaling Group Deployment Guide Admin guide. + Type: CommaDelimitedList + Default: "0.0.0.0/0" +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] + EncryptedProtocol: !Equals [ ALBProtocol, HTTPS ] + ProvidedPort: !Not [!Equals [!Ref ServicePort, '']] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] +Resources: + SecurityVPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',' , !Ref AvailabilityZones] + NumberOfAZs: !Ref NumberOfAZs + VPCCIDR: !Ref SecurityVPCCIDR + PublicSubnet1CIDR: !Ref SecurityPublicSubnet1CIDR + PublicSubnet2CIDR: !Ref SecurityPublicSubnet2CIDR + PublicSubnet3CIDR: !Ref SecurityPublicSubnet3CIDR + PublicSubnet4CIDR: !Ref SecurityPublicSubnet4CIDR + CreatePrivateSubnets: false + ServersVPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-vpc.yaml + Parameters: + AvailabilityZones: !Join [ ',' , !Ref AvailabilityZones ] + NumberOfAZs: !Ref NumberOfAZs + VPCCIDR: !Ref ServersVPCCIDR + ServersSubnet1CIDR: !Ref ServersPublicSubnet1CIDR + ServersSubnet2CIDR: !Ref ServersPublicSubnet2CIDR + ServersSubnet3CIDR: !Ref ServersPublicSubnet3CIDR + ServersSubnet4CIDR: !Ref ServersPublicSubnet4CIDR + GWLBeSubnet1CIDR: !Ref GWLBeSubnet1CIDR + GWLBeSubnet2CIDR: !Ref GWLBeSubnet2CIDR + GWLBeSubnet3CIDR: !Ref GWLBeSubnet3CIDR + GWLBeSubnet4CIDR: !Ref GWLBeSubnet4CIDR + SubnetTagsOutboundCIDR: !Join [ ',' , !Ref SubnetTagsOutboundCIDR ] + SubnetTagsInboundCIDR: !Join [ ',' , !Ref SubnetTagsInboundCIDR ] + MainStack: + Type: AWS::CloudFormation::Stack + DependsOn: [SecurityVPCStack, ServersVPCStack] + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb.yaml + Parameters: + SecurityVPC: !GetAtt SecurityVPCStack.Outputs.VPCID + NumberOfAZs: !Ref NumberOfAZs + GatewaysSubnets: !Join + - ',' + - - !GetAtt SecurityVPCStack.Outputs.PublicSubnet1ID + - !GetAtt SecurityVPCStack.Outputs.PublicSubnet2ID + - !If [ 3AZs, !GetAtt SecurityVPCStack.Outputs.PublicSubnet3ID, !Ref 'AWS::NoValue' ] + - !If [ 4AZs, !GetAtt SecurityVPCStack.Outputs.PublicSubnet4ID, !Ref 'AWS::NoValue' ] + ServersVPC: !GetAtt ServersVPCStack.Outputs.VPCID + ServersSubnets: !Join [',', [!GetAtt ServersVPCStack.Outputs.ServersSubnet1ID, !GetAtt ServersVPCStack.Outputs.ServersSubnet2ID, !If [ 3AZs, !GetAtt ServersVPCStack.Outputs.ServersSubnet3ID, !Ref 'AWS::NoValue' ], !If [ 4AZs, !GetAtt ServersVPCStack.Outputs.ServersSubnet4ID, !Ref 'AWS::NoValue' ]]] + GWLBeSubnets: !Join [',', [!GetAtt ServersVPCStack.Outputs.GWLBeSubnet1ID, !GetAtt ServersVPCStack.Outputs.GWLBeSubnet2ID, !If [ 3AZs, !GetAtt ServersVPCStack.Outputs.GWLBeSubnet3ID, !Ref 'AWS::NoValue' ], !If [ 4AZs, !GetAtt ServersVPCStack.Outputs.GWLBeSubnet4ID, !Ref 'AWS::NoValue' ]]] + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + AllowUploadDownload: !Ref AllowUploadDownload + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + AdminEmail: !Ref AdminEmail + Shell: !Ref Shell + GWLBName: !Ref GWLBName + TargetGroupName: !Ref TargetGroupName + AcceptConnectionRequired: !Ref AcceptConnectionRequired + CrossZoneLoadBalancing: !Ref CrossZoneLoadBalancing + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + ManagementDeploy: !Ref ManagementDeploy + ManagementInstanceType: !Ref ManagementInstanceType + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + GatewaysPolicy: !Ref GatewaysPolicy + GatewaysBlades: !Ref GatewaysBlades + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + ALBProtocol: !Ref ALBProtocol + ServicePort: !Ref ServicePort + ResourcesTagName: !Ref ResourcesTagName + ServerInstanceType: !Ref ServerInstanceType + ServerAMI: !Ref ServerAMI + ServerIGW: !GetAtt ServersVPCStack.Outputs.IGWID + ServersCIDRs: !Join + - ',' + - - !Ref ServersPublicSubnet1CIDR + - !Ref ServersPublicSubnet2CIDR + - !If [ 3AZs, !Ref ServersPublicSubnet3CIDR, !Ref 'AWS::NoValue' ] + - !If [ 4AZs, !Ref ServersPublicSubnet4CIDR, !Ref 'AWS::NoValue' ] + +Outputs: + SecurityVPCID: + Description: Security VPC ID. + Value: !GetAtt SecurityVPCStack.Outputs.VPCID + ServersVPCID: + Description: Servers VPC ID. + Value: !GetAtt ServersVPCStack.Outputs.VPCID + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt MainStack.Outputs.ManagementPublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !GetAtt MainStack.Outputs.ConfigurationTemplateName + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: !GetAtt MainStack.Outputs.ControllerName + GWLBName: + Description: Gateway Load Balancer Name. + Value: !GetAtt MainStack.Outputs.GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !GetAtt MainStack.Outputs.GWLBServiceName + VpcEndpointService: + Description: Endpoint Service Name. + Value: !GetAtt MainStack.Outputs.VpcEndpointService + ServerPorts: + Description: The internal Load Balancer should listen to this port. + Value: !GetAtt MainStack.Outputs.ServerPorts + Condition: DeployManagement + ServerLBURL: + Description: The URL of the Servers Application Load Balancer. + Value: !GetAtt MainStack.Outputs.ServerLBURL + Condition: DeployManagement + ServerSecurityGroupID: + Description: The Application Servers Security Group ID. + Value: !GetAtt MainStack.Outputs.ServerSecurityGroupID + Condition: DeployManagement + Server1EndpointRoute: + Description: Server 1 GWLB EndPoint route entry + Value: !Sub ['${ROUTE1} | ${AZ1}', {ROUTE1: !GetAtt MainStack.Outputs.Server1EndpointRoute, AZ1: !Select [0, !Ref AvailabilityZones]}] + Server2EndpointRoute: + Description: Server 2 GWLB EndPoint route entry + Value: !Sub ['${ROUTE2} | ${AZ2}', {ROUTE2: !GetAtt MainStack.Outputs.Server2EndpointRoute, AZ2: !Select [1, !Ref AvailabilityZones]}] + Server3EndpointRoute: + Description: Server 3 GWLB EndPoint route entry + Value: !Sub ['${ROUTE3} | ${AZ3}', {ROUTE3: !GetAtt MainStack.Outputs.Server3EndpointRoute, AZ3: !Select [2, !Ref AvailabilityZones]}] + Condition: 3AZs + Server4EndpointRoute: + Description: Server 4 GWLB EndPoint route entry + Value: !Sub ['${ROUTE4} | ${AZ4}', {ROUTE4: !GetAtt MainStack.Outputs.Server4EndpointRoute, AZ4: !Select [3, !Ref AvailabilityZones]}] + Condition: 4AZs + +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/qs-gwlb.yaml b/aws/templates/gwlb-asg/qs-gwlb.yaml new file mode 100644 index 00000000..1e560d67 --- /dev/null +++ b/aws/templates/gwlb-asg/qs-gwlb.yaml @@ -0,0 +1,915 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (05072024)" +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: General Network Configuration + Parameters: + - NumberOfAZs + - Label: + default: Security Network Configuration + Parameters: + - SecurityVPC + - GatewaysSubnets + - Label: + default: Servers Network Configuration + Parameters: + - ServersVPC + - ServersSubnets + - ServersCIDRs + - GWLBeSubnets + - ServerIGW + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - AcceptConnectionRequired + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - GatewaysBlades + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Web Servers Auto Scaling Group Configuration + Parameters: + - ServerInstanceType + - ServerAMI + - ALBProtocol + - ServicePort + - ResourcesTagName + ParameterLabels: + NumberOfAZs: + default: Number of AZs + SecurityVPC: + default: SecurityVPC + GatewaysSubnets: + default: Gateways subnets + ServersVPC: + default: ServersVPC + ServersSubnets: + default: Servers subnets + ServersCIDRs: + default: ServersCIDRs + GWLBeSubnets: + default: GWLBe subnets + ServerIGW: + default: Server VPC IGW + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + AcceptConnectionRequired: + default: Connection Acceptance Required + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + GatewaysBlades: + default: Default Blades + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses + ServerInstanceType: + default: Servers instance type + ServerAMI: + default: AMI ID + ALBProtocol: + default: ALB Protocol + ServicePort: + default: Custom service port + ResourcesTagName: + default: Resources tag name +Parameters: + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + SecurityVPC: + Description: Select an existing Security VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC. + GatewaysSubnets: + Description: Select at least 2 public subnets in the Security VPC. + Type: List + MinLength: 2 + ServersVPC: + Description: Select an existing VPC for Serevrs deployment. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC. + ServersSubnets: + Description: Select at least 2 private subnets in the VPC for Servers deployment. + Type: List + MinLength: 2 + GWLBeSubnets: + Description: Select at least 2 public subnets in the VPC for GWLBe deployment. + Type: List + MinLength: 2 + ServerIGW: + Description: Internet gateway It that attached to Servers VPC + Type: String + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: gwlb1 + ConstraintDescription: Must be a valid GWLB Name. + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: tg1 + ConstraintDescription: Must be a valid target group name. + AcceptConnectionRequired: + Description: Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). + Default: "false" + AllowedValues: ["true", "false"] + Type: String + ConstraintDescription: Must be true or false. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes (use command " grub2-mkpasswd-pbkdf2" to get the PASSWORD's hash). For R81.10 and below the Admin user's password is used also as maintenance-mode password. (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication acti.vation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes (use command " grub2-mkpasswd-pbkdf2" to get the PASSWORD's hash). For R81.10 and below the Admin user's password is used also as maintenance-mode password. (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + GatewaysBlades: + Description: Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later). + Type: String + Default: true + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + ALBProtocol: + Description: The protocol to use on the Application Load Balancer. + Type: String + Default: HTTP + AllowedValues: + - HTTP + - HTTPS + ServicePort: + Description: 'The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS.' + Type: String + AllowedPattern: '^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?$' + ConstraintDescription: Custom service port must be a number between 0 and 65535. + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + ServerInstanceType: + Description: The EC2 instance type for the web servers. + Type: String + Default: t3.micro + AllowedValues: + - t3.nano + - t3.micro + - t3.small + - t3.medium + - t3.large + - t3.xlarge + - t3.2xlarge + ConstraintDescription: Must be a valid EC2 instance type. + ServerAMI: + Description: The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63). + Type: String + AllowedPattern: '^(ami-(([0-9a-f]{8})|([0-9a-f]{17})))$' + ConstraintDescription: Amazon Machine Image ID must be in the form ami-xxxxxxxx or ami-xxxxxxxxxxxxxxxxx. + ServersCIDRs: + Description: CIDR's block of each Servers private subnet(divided by coma, without spaces) + Type: CommaDelimitedList + Default: "192.168.0.10/24, 192.168.0.20/24" +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + 2AZs: !Or [!Equals [!Ref NumberOfAZs, 2], !Condition 3AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] + VolumeEncryption: !Equals [!Ref EnableVolumeEncryption, true] + ProvidedPort: !Not [!Equals [!Ref ServicePort, '']] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + EncryptedProtocol: !Equals [ ALBProtocol, HTTPS ] +Resources: + GatewayLoadBalancer: + Type: AWS::ElasticLoadBalancingV2::LoadBalancer + Properties: + Type: gateway + Name: !Ref GWLBName + LoadBalancerAttributes: + - Key: load_balancing.cross_zone.enabled + Value: !Ref CrossZoneLoadBalancing + Subnets: !Ref GatewaysSubnets + Tags: + - Key: x-chkp-management + Value: !Ref ManagementServer + - Key: x-chkp-template + Value: !Ref ConfigurationTemplate + VpcEndpointService: + Type: AWS::EC2::VPCEndpointService + Properties: + AcceptanceRequired: !Ref AcceptConnectionRequired + GatewayLoadBalancerArns: + - !Ref GatewayLoadBalancer + TargetGroup: + Type: AWS::ElasticLoadBalancingV2::TargetGroup + Properties: + Name: !Ref TargetGroupName + Port: 6081 + Protocol: GENEVE + HealthCheckPort: 8117 + HealthCheckProtocol: TCP + TargetGroupAttributes: + - Key: deregistration_delay.timeout_seconds + Value: 20 + VpcId: !Ref SecurityVPC + TargetType: instance + Tags: + - Key: Name + Value: !Join + - "" + - - !Ref AWS::StackName + - "-tg1" + Listener: + Type: AWS::ElasticLoadBalancingV2::Listener + Properties: + DefaultActions: + - Type: forward + TargetGroupArn: !Ref TargetGroup + LoadBalancerArn: !Ref GatewayLoadBalancer + SecurityGatewaysStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml + Parameters: + VPC: !Ref SecurityVPC + GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + Shell: !Ref Shell + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + AdminEmail: !Ref AdminEmail + GatewaysTargetGroups: !Ref TargetGroup + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + AllowUploadDownload: !Ref AllowUploadDownload + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + GatewayBootstrapScript: !Join + - ';' + - - 'echo -e "\nStarting Bootstrap script\n"' + - 'echo "Adding quickstart identifier to cloud-version"' + - 'cv_template="gwlb_qs"' + - 'cv_path="/etc/cloud-version"' + - 'if test -f ${cv_path}; then sed -i ''/template_name/c\template_name: ''"${cv_template}"'''' /etc/cloud-version; fi' + - 'cv_json_path="/etc/cloud-version.json"' + - 'cv_json_path_tmp="/etc/cloud-version-tmp.json"' + - 'if test -f ${cv_json_path}; then cat ${cv_json_path} | jq ''.template_name = "''"${cv_template}"''"'' > ${cv_json_path_tmp}; mv ${cv_json_path_tmp} ${cv_json_path}; fi' + - 'echo -e "\nFinished Bootstrap script\n"' + ManagementStack: + Type: AWS::CloudFormation::Stack + Condition: DeployManagement + DependsOn: GWLBeEndpointStack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml + Parameters: + VPC: !Ref SecurityVPC + ManagementSubnet: !Select [0, !Ref GatewaysSubnets] + ManagementName: !Ref ManagementServer + ManagementInstanceType: !Ref ManagementInstanceType + KeyName: !Ref KeyName + Shell: !Ref Shell + VolumeEncryption: !If [VolumeEncryption, alias/aws/ebs, ''] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + ManagementPermissions: Create with read-write permissions + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + TerminationProtection: !Ref TerminationProtection + ManagementBootstrapScript: !Join + - ';' + - - 'echo -e "\nStarting Bootstrap script\n"' + - !Sub 'policy=${GatewaysPolicy} ; region=${AWS::Region} ; conf_template=${ConfigurationTemplate} ; mgmt=${ManagementServer} ; blades=${GatewaysBlades}' + - !Sub ['version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - !Join ['', ['sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ' | base64 -d)"']] + - 'controller="gwlb-controller"' + - 'echo "Adding quickstart identifier to cloud-version"' + - 'cv_template="management_gwlb_qs"' + - 'cv_path="/etc/cloud-version"' + - 'if test -f ${cv_path}; then sed -i ''/template_name/c\template_name: ''"${cv_template}"'''' /etc/cloud-version; fi' + - 'cv_json_path="/etc/cloud-version.json"' + - 'cv_json_path_tmp="/etc/cloud-version-tmp.json"' + - 'if test -f ${cv_json_path}; then cat ${cv_json_path} | jq ''.template_name = "''"${cv_template}"''"'' > ${cv_json_path_tmp}; mv ${cv_json_path_tmp} ${cv_json_path}; fi' + - 'echo "Creating CME configuration"' + - 'autoprov_cfg -f init AWS -mn "${mgmt}" -tn "${conf_template}" -cn "${controller}" -po "${policy}" -otp "${sic}" -r "${region}" -ver "${version}" -iam -ss' + - 'autoprov_cfg -f set controller AWS -cn "${controller}" -ct "${conf_template}"' + - '${blades} && autoprov_cfg -f set template -tn "${conf_template}" -ips -appi -av -ab' + - 'echo "Set Scan GWLB Load Balancer parameter"' + - 'autoprovision_file="${FWDIR}/conf/autoprovision.json"' + - 'autoprovision_file_tmp="${FWDIR}/conf/autoprovision.json.tmp"' + - 'if test -f ${autoprovision_file}; then jq ".controllers.\"${controller}\".sync |= . + {\"lb\": false}" "${autoprovision_file}" > "${autoprovision_file_tmp}"; mv "${autoprovision_file_tmp}" "${autoprovision_file}"; fi' + - 'echo -e "\nFinished Bootstrap script\n"' + GWLBeEndpointStack: + Type: AWS::CloudFormation::Stack + DependsOn: VpcEndpointService + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-endpoints.yaml + Parameters: + NumberOfAZs: !Ref NumberOfAZs + GWLBeVPC: !Ref ServersVPC + GWLBeSubnets: !Join [',', !Ref GWLBeSubnets] + GWLBServiceName: !Sub ["com.amazonaws.vpce.${AWS::Region}.${Service}", {Service: !Ref VpcEndpointService}] + ServersSubnets: !Join [',', !Ref ServersSubnets] + ServersCIDRs: !Join [',', !Ref ServersCIDRs] + ServerIGW: !Ref ServerIGW + ServersStacks: + Type: AWS::CloudFormation::Stack + DependsOn: GWLBeEndpointStack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-autoscale.yaml + Parameters: + VPC: !Ref ServersVPC + Subnets: !Join [',', !Ref ServersSubnets] + ResourcesTagName: !Ref ResourcesTagName + ALBProtocol: !Ref ALBProtocol + ServicePort: !If [ProvidedPort, !Ref ServicePort, !If [EncryptedProtocol, 443, 80]] + AdminEmail: !Ref AdminEmail + ServerInstanceType: !Ref ServerInstanceType + ServerAMI: !Ref ServerAMI + KeyName: !Ref KeyName + AllocateServerPublicAddress: true + ServersMinSize: !Ref GatewaysMinSize + ServersMaxSize: !Ref GatewaysMaxSize +Outputs: + SecurityVPCID: + Description: Security VPC ID. + Value: !Ref SecurityVPC + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt ManagementStack.Outputs.PublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: gwlb-controller + GWLBName: + Description: Gateway Load Balancer Name. + Value: !Ref GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !Sub ["com.amazonaws.vpce.${AWS::Region}.${Service}", {Service: !Ref VpcEndpointService}] + VpcEndpointService: + Description: Endpoint Service Name. + Value: !Ref VpcEndpointService + ServerPorts: + Description: The internal Load Balancer should listen to this port. + Value: !If [EncryptedProtocol, 443, 80] + Condition: DeployManagement + ServerLBURL: + Description: The URL of the Servers Application Load Balancer. + Value: !GetAtt ServersStacks.Outputs.ServerLBURL + Condition: DeployManagement + ServerSecurityGroupID: + Description: The Application Servers Security Group ID. + Value: !GetAtt ServersStacks.Outputs.ServerSecurityGroupID + Condition: DeployManagement + Server1EndpointRoute: + Description: Server 1 GWLB EndPoint route entry + Value: !GetAtt GWLBeEndpointStack.Outputs.Server1EndpointRoute + Server2EndpointRoute: + Description: Server 2 GWLB EndPoint route entry + Value: !GetAtt GWLBeEndpointStack.Outputs.Server2EndpointRoute + Server3EndpointRoute: + Description: Server 3 GWLB EndPoint route entry + Value: !GetAtt GWLBeEndpointStack.Outputs.Server3EndpointRoute + Condition: 3AZs + Server4EndpointRoute: + Description: Server 4 GWLB EndPoint route entry + Value: !GetAtt GWLBeEndpointStack.Outputs.Server4EndpointRoute + Condition: 4AZs +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml new file mode 100644 index 00000000..f0284de3 --- /dev/null +++ b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml @@ -0,0 +1,862 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - NumberOfAZs + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PublicSubnet3CIDR + - PublicSubnet4CIDR + - TgwSubnet1CIDR + - TgwSubnet2CIDR + - TgwSubnet3CIDR + - TgwSubnet4CIDR + - NatGwSubnet1CIDR + - NatGwSubnet2CIDR + - NatGwSubnet3CIDR + - NatGwSubnet4CIDR + - GWLBeSubnet1CIDR + - GWLBeSubnet2CIDR + - GWLBeSubnet3CIDR + - GWLBeSubnet4CIDR + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + ParameterLabels: + AvailabilityZones: + default: Availability Zones + NumberOfAZs: + default: Number of AZs + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public subnet 1 CIDR + PublicSubnet2CIDR: + default: Public subnet 2 CIDR + PublicSubnet3CIDR: + default: Public subnet 3 CIDR + PublicSubnet4CIDR: + default: Public subnet 4 CIDR + TgwSubnet1CIDR: + default: TGW subnet 1 CIDR + TgwSubnet2CIDR: + default: TGW subnet 2 CIDR + TgwSubnet3CIDR: + default: TGW subnet 3 CIDR + TgwSubnet4CIDR: + default: TGW subnet 4 CIDR + NatGwSubnet1CIDR: + default: NAT subnet 1 CIDR + NatGwSubnet2CIDR: + default: NAT subnet 2 CIDR + NatGwSubnet3CIDR: + default: NAT subnet 3 CIDR + NatGwSubnet4CIDR: + default: NAT subnet 4 CIDR + GWLBeSubnet1CIDR: + default: Gateway Load Balancer Endpoint subnet 1 CIDR + GWLBeSubnet2CIDR: + default: Gateway Load Balancer Endpoint subnet 2 CIDR + GWLBeSubnet3CIDR: + default: Gateway Load Balancer Endpoint subnet 3 CIDR + GWLBeSubnet4CIDR: + default: Gateway Load Balancer Endpoint subnet 4 CIDR + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses +Parameters: + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved). + Type: List + MinLength: 2 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + VPCCIDR: + Description: The CIDR block of the provided VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet3CIDR: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.30.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet4CIDR: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.40.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet1CIDR: + Description: CIDR block for TGW subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.12.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet2CIDR: + Description: CIDR block for TGW subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.22.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet3CIDR: + Description: CIDR block for TGW subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.32.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet4CIDR: + Description: CIDR block for TGW subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.42.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet1CIDR: + Description: CIDR block for NAT subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.13.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet2CIDR: + Description: CIDR block for NAT subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.23.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet3CIDR: + Description: CIDR block for NAT subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.33.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet4CIDR: + Description: CIDR block for NAT subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.43.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet1CIDR: + Description: CIDR block for GWLBe subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.14.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet2CIDR: + Description: CIDR block for GWLBe subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.24.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet3CIDR: + Description: CIDR block for GWLBe subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.34.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet4CIDR: + Description: CIDR block for GWLBe subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.44.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: gwlb1 + MaxLength: 32 + ConstraintDescription: Must be a valid GWLB Name + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + AllowedPattern: '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$' + Default: tg1 + MaxLength: 32 + ConstraintDescription: Must be a valid target group name. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] + VolumeEncryption: !Equals [!Ref EnableVolumeEncryption, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: !Ref NumberOfAZs + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PublicSubnet3CIDR: !Ref PublicSubnet3CIDR + PublicSubnet4CIDR: !Ref PublicSubnet4CIDR + CreatePrivateSubnets: false + CreateAttachmentSubnets: true + AttachmentSubnet1CIDR: !Ref TgwSubnet1CIDR + AttachmentSubnet2CIDR: !Ref TgwSubnet2CIDR + AttachmentSubnet3CIDR: !Ref TgwSubnet3CIDR + AttachmentSubnet4CIDR: !Ref TgwSubnet4CIDR + TgwGwlbStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/tgw-gwlb.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + IGWID: !GetAtt VPCStack.Outputs.IGWID + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: !Ref NumberOfAZs + GatewaysSubnets: !Join + - ',' + - - !GetAtt VPCStack.Outputs.PublicSubnet1ID + - !GetAtt VPCStack.Outputs.PublicSubnet2ID + - !If [3AZs, !GetAtt VPCStack.Outputs.PublicSubnet3ID, !Ref 'AWS::NoValue'] + - !If [4AZs, !GetAtt VPCStack.Outputs.PublicSubnet4ID, !Ref 'AWS::NoValue'] + TgwSubnet1Id: !GetAtt VPCStack.Outputs.AttachmentSubnet1ID + TgwSubnet2Id: !GetAtt VPCStack.Outputs.AttachmentSubnet2ID + TgwSubnet3Id: !If [3AZs, !GetAtt VPCStack.Outputs.AttachmentSubnet3ID, ""] + TgwSubnet4Id: !If [4AZs, !GetAtt VPCStack.Outputs.AttachmentSubnet4ID, ""] + NatGwSubnet1CIDR: !Ref NatGwSubnet1CIDR + NatGwSubnet2CIDR: !Ref NatGwSubnet2CIDR + NatGwSubnet3CIDR: !Ref NatGwSubnet3CIDR + NatGwSubnet4CIDR: !Ref NatGwSubnet4CIDR + GWLBeSubnet1CIDR: !Ref GWLBeSubnet1CIDR + GWLBeSubnet2CIDR: !Ref GWLBeSubnet2CIDR + GWLBeSubnet3CIDR: !Ref GWLBeSubnet3CIDR + GWLBeSubnet4CIDR: !Ref GWLBeSubnet4CIDR + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + AllowUploadDownload: !Ref AllowUploadDownload + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + AdminEmail: !Ref AdminEmail + Shell: !Ref Shell + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + GWLBName: !Ref GWLBName + TargetGroupName: !Ref TargetGroupName + CrossZoneLoadBalancing: !Ref CrossZoneLoadBalancing + ManagementDeploy: !Ref ManagementDeploy + ManagementInstanceType: !Ref ManagementInstanceType + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + GatewaysPolicy: !Ref GatewaysPolicy + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses +Outputs: + VPCID: + Description: VPC ID. + Value: !GetAtt VPCStack.Outputs.VPCID + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt TgwGwlbStack.Outputs.ManagementPublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !GetAtt TgwGwlbStack.Outputs.ConfigurationTemplateName + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: !GetAtt TgwGwlbStack.Outputs.ControllerName + GWLBName: + Description: Gateway Load Balancer Name. + Value: !Ref GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !GetAtt TgwGwlbStack.Outputs.GWLBServiceName + TgwSubnet1ID: + Description: TGW subnet 1 ID in Availability Zone 1. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet1ID + TgwSubnet2ID: + Description: TGW subnet 2 ID in Availability Zone 2. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet2ID + TgwSubnet3ID: + Description: TGW subnet 3 ID in Availability Zone 3. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet3ID + Condition: 3AZs + TgwSubnet4ID: + Description: TGW subnet 4 ID in Availability Zone 4. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet4ID + Condition: 4AZs + TgwSubnet1CIDR: + Description: TGW subnet 1 CIDR in Availability Zone 1. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet1CIDR + TgwSubnet2CIDR: + Description: TGW subnet 2 CIDR in Availability Zone 2. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet2CIDR + TgwSubnet3CIDR: + Description: TGW subnet 3 CIDR in Availability Zone 3. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet3CIDR + Condition: 3AZs + TgwSubnet4CIDR: + Description: TGW subnet 4 CIDR in Availability Zone 4. + Value: !GetAtt VPCStack.Outputs.AttachmentSubnet4CIDR + Condition: 4AZs +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/tgw-gwlb.yaml b/aws/templates/gwlb-asg/tgw-gwlb.yaml new file mode 100644 index 00000000..0801a10a --- /dev/null +++ b/aws/templates/gwlb-asg/tgw-gwlb.yaml @@ -0,0 +1,1206 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - IGWID + - AvailabilityZones + - NumberOfAZs + - GatewaysSubnets + - TgwSubnet1Id + - TgwSubnet2Id + - TgwSubnet3Id + - TgwSubnet4Id + - NatGwSubnet1CIDR + - NatGwSubnet2CIDR + - NatGwSubnet3CIDR + - NatGwSubnet4CIDR + - GWLBeSubnet1CIDR + - GWLBeSubnet2CIDR + - GWLBeSubnet3CIDR + - GWLBeSubnet4CIDR + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - ManagementServer + - ConfigurationTemplate + - AdminEmail + - Shell + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - ControlGatewayOverPrivateOrPublicAddress + - AllocatePublicAddress + - CloudWatch + - Label: + default: Gateway Load Balancer Configuration + Parameters: + - GWLBName + - TargetGroupName + - CrossZoneLoadBalancing + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - GatewaysPolicy + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + ParameterLabels: + VPC: + default: VPC + IGWID: + default: Internet Gateway ID + AvailabilityZones: + default: Availability Zones + NumberOfAZs: + default: Number of AZs + GatewaysSubnets: + default: Gateways subnets + TgwSubnet1Id: + default: Transit Gateway Attachment subnet 1 Id + TgwSubnet2Id: + default: Transit Gateway Attachment subnet 2 Id + TgwSubnet3Id: + default: Transit Gateway Attachment subnet 3 Id + TgwSubnet4Id: + default: Transit Gateway Attachment subnet 4 Id + NatGwSubnet1CIDR: + default: NAT subnet 1 CIDR + NatGwSubnet2CIDR: + default: NAT subnet 2 CIDR + NatGwSubnet3CIDR: + default: NAT subnet 3 CIDR + NatGwSubnet4CIDR: + default: NAT subnet 4 CIDR + GWLBeSubnet1CIDR: + default: Gateway Load Balancer Endpoint subnet 1 CIDR + GWLBeSubnet2CIDR: + default: Gateway Load Balancer Endpoint subnet 2 CIDR + GWLBeSubnet3CIDR: + default: Gateway Load Balancer Endpoint subnet 3 CIDR + GWLBeSubnet4CIDR: + default: Gateway Load Balancer Endpoint subnet 4 CIDR + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + AdminEmail: + default: Email address + Shell: + default: Admin shell + GatewayName: + default: Gateways instance name + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Gateways Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: Gateways SIC key + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + AllocatePublicAddress: + default: Allocate Public IPs + CloudWatch: + default: CloudWatch metrics + GWLBName: + default: Gateway Load Balancer Name + TargetGroupName: + default: Target Group Name + CrossZoneLoadBalancing: + default: Enable Cross Zone Load Balancing + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Management instance type + ManagementVersion: + default: Management version & license + ManagementPasswordHash: + default: Management password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + GatewaysPolicy: + default: Security Policy + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC. + IGWID: + Description: VPC's Internet Gateway Id (e.g. igw-123a4567). + Type: String + MinLength: 1 + ConstraintDescription: You must insert an Internet Gateway Id. + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved). + Type: List + MinLength: 2 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + GatewaysSubnets: + Description: Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet. + Type: List + MinLength: 2 + TgwSubnet1Id: + Description: The TGW attachment subnet ID located in the 1st Availability Zone. + Type: String + MinLength: 1 + ConstraintDescription: You must insert Tgw Subnet Id for Availability Zone 1. + TgwSubnet2Id: + Description: The TGW attachment subnet ID located in the 2nd Availability Zone. + Type: String + MinLength: 1 + ConstraintDescription: You must insert Tgw Subnet Id for Availability Zone 2. + TgwSubnet3Id: + Description: The TGW attachment subnet ID located in the 3rd Availability Zone. + Type: String + TgwSubnet4Id: + Description: The TGW attachment subnet ID located in the 4th Availability Zone. + Type: String + NatGwSubnet1CIDR: + Description: CIDR block for NAT subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.13.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet2CIDR: + Description: CIDR block for NAT subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.23.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet3CIDR: + Description: CIDR block for NAT subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.33.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + NatGwSubnet4CIDR: + Description: CIDR block for NAT subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.43.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet1CIDR: + Description: CIDR block for GWLBe subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.14.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet2CIDR: + Description: CIDR block for GWLBe subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.24.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet3CIDR: + Description: CIDR block for GWLBe subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.34.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GWLBeSubnet4CIDR: + Description: CIDR block for GWLBe subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.44.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: gwlb-management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: gwlb-ASG-configuration + MinLength: 1 + MaxLength: 30 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + Shell: + Description: Change the admin shell to enable advanced command line configuration. Applies for Security Gateways and Security Management Server if deployed. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type. + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + AllocatePublicAddress: + Description: Allocate a Public IP for gateway members. + Type: String + Default: false + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GWLBName: + Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: gwlb1 + ConstraintDescription: Must be a valid GWLB Name + TargetGroupName: + Description: Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. + Type: String + Default: tg1 + ConstraintDescription: Must be a valid target group name. + CrossZoneLoadBalancing: + Description: Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type. + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysPolicy: + Description: The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group. + Type: String + Default: Standard + MinLength: 1 + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] + VolumeEncryption: !Equals [!Ref EnableVolumeEncryption, true] +Resources: + GWLBeSubnet1: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref GWLBeSubnet1CIDR + AvailabilityZone: !Select [0, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: GWLBe subnet 1 + - Key: Network + Value: Private + GWLBeSubnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref GWLBeSubnet2CIDR + AvailabilityZone: !Select [1, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: GWLBe subnet 2 + - Key: Network + Value: Private + GWLBeSubnet3: + Type: AWS::EC2::Subnet + Condition: 3AZs + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref GWLBeSubnet3CIDR + AvailabilityZone: !Select [2, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: GWLBe subnet 3 + - Key: Network + Value: Private + GWLBeSubnet4: + Type: AWS::EC2::Subnet + Condition: 4AZs + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref GWLBeSubnet4CIDR + AvailabilityZone: !Select [3, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: GWLBe subnet 4 + - Key: Network + Value: Private + GWLBeSubnet1RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: GWLBe Subnet 1 Route Table + - Key: Network + Value: Private + GWLBeSubnet1NatGwDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NatGatewayId: !Ref NatGateway1 + RouteTableId: !Ref GWLBeSubnet1RouteTable + GWLBeSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref GWLBeSubnet1RouteTable + SubnetId: !Ref GWLBeSubnet1 + GWLBeSubnet2RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: GWLBe Subnet 2 Route Table + - Key: Network + Value: Private + GWLBeSubnet2NatGwDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NatGatewayId: !Ref NatGateway2 + RouteTableId: !Ref GWLBeSubnet2RouteTable + GWLBeSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref GWLBeSubnet2RouteTable + SubnetId: !Ref GWLBeSubnet2 + GWLBeSubnet3RouteTable: + Type: AWS::EC2::RouteTable + Condition: 3AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: GWLBe Subnet 3 Route Table + - Key: Network + Value: Private + GWLBeSubnet3NatGwDefaultRoute: + Type: AWS::EC2::Route + Condition: 3AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NatGatewayId: !Ref NatGateway3 + RouteTableId: !Ref GWLBeSubnet3RouteTable + GWLBeSubnet3RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 3AZs + Properties: + RouteTableId: !Ref GWLBeSubnet3RouteTable + SubnetId: !Ref GWLBeSubnet3 + GWLBeSubnet4RouteTable: + Type: AWS::EC2::RouteTable + Condition: 4AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: GWLBe Subnet 4 Route Table + - Key: Network + Value: Private + GWLBeSubnet4NatGwDefaultRoute: + Type: AWS::EC2::Route + Condition: 4AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NatGatewayId: !Ref NatGateway4 + RouteTableId: !Ref GWLBeSubnet4RouteTable + GWLBeSubnet4RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 4AZs + Properties: + RouteTableId: !Ref GWLBeSubnet4RouteTable + SubnetId: !Ref GWLBeSubnet4 + NatGwSubnet1: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref NatGwSubnet1CIDR + AvailabilityZone: !Select [0, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: NAT subnet 1 + - Key: Network + Value: Private + NatGwSubnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref NatGwSubnet2CIDR + AvailabilityZone: !Select [1, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: NAT subnet 2 + - Key: Network + Value: Private + NatGwSubnet3: + Type: AWS::EC2::Subnet + Condition: 3AZs + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref NatGwSubnet3CIDR + AvailabilityZone: !Select [2, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: NAT subnet 3 + - Key: Network + Value: Private + NatGwSubnet4: + Type: AWS::EC2::Subnet + Condition: 4AZs + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref NatGwSubnet4CIDR + AvailabilityZone: !Select [3, !Ref AvailabilityZones] + Tags: + - Key: Name + Value: NAT subnet 4 + - Key: Network + Value: Private + NatGwSubnet1RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: NAT Subnet 1 Route Table + - Key: Network + Value: Public + NatGwSubnet1NatGwDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref IGWID + RouteTableId: !Ref NatGwSubnet1RouteTable + NatGwSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref NatGwSubnet1RouteTable + SubnetId: !Ref NatGwSubnet1 + NatGwSubnet2RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: NAT Subnet 2 Route Table + - Key: Network + Value: Public + NatGwSubnet2NatGwDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref IGWID + RouteTableId: !Ref NatGwSubnet2RouteTable + NatGwSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref NatGwSubnet2RouteTable + SubnetId: !Ref NatGwSubnet2 + NatGwSubnet3RouteTable: + Type: AWS::EC2::RouteTable + Condition: 3AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: NAT Subnet 3 Route Table + - Key: Network + Value: Public + NatGwSubnet3NatGwDefaultRoute: + Type: AWS::EC2::Route + Condition: 3AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref IGWID + RouteTableId: !Ref NatGwSubnet3RouteTable + NatGwSubnet3RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 3AZs + Properties: + RouteTableId: !Ref NatGwSubnet3RouteTable + SubnetId: !Ref NatGwSubnet3 + NatGwSubnet4RouteTable: + Type: AWS::EC2::RouteTable + Condition: 4AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: NAT Subnet 4 Route Table + - Key: Network + Value: Public + NatGwSubnet4NatGwDefaultRoute: + Type: AWS::EC2::Route + Condition: 4AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref IGWID + RouteTableId: !Ref NatGwSubnet4RouteTable + NatGwSubnet4RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 4AZs + Properties: + RouteTableId: !Ref NatGwSubnet4RouteTable + SubnetId: !Ref NatGwSubnet4 + GWLBStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml + Parameters: + VPC: !Ref VPC + GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + AllowUploadDownload: !Ref AllowUploadDownload + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + AdminEmail: !Ref AdminEmail + Shell: !Ref Shell + GWLBName: !Ref GWLBName + TargetGroupName: !Ref TargetGroupName + AcceptConnectionRequired: false + CrossZoneLoadBalancing: !Ref CrossZoneLoadBalancing + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + AllocatePublicAddress: !Ref AllocatePublicAddress + CloudWatch: !Ref CloudWatch + ManagementDeploy: !Ref ManagementDeploy + ManagementInstanceType: !Ref ManagementInstanceType + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + GatewaysPolicy: !Ref GatewaysPolicy + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + GWLBe1: + DependsOn: [GWLBStack, GWLBeSubnet1] + Type: AWS::EC2::VPCEndpoint + Properties: + VpcId: !Ref VPC + VpcEndpointType: GatewayLoadBalancer + SubnetIds: + - !Ref GWLBeSubnet1 + ServiceName: !GetAtt GWLBStack.Outputs.GWLBServiceName + GWLBe2: + DependsOn: [GWLBStack, GWLBeSubnet2] + Type: AWS::EC2::VPCEndpoint + Properties: + VpcId: !Ref VPC + VpcEndpointType: GatewayLoadBalancer + SubnetIds: + - !Ref GWLBeSubnet2 + ServiceName: !GetAtt GWLBStack.Outputs.GWLBServiceName + GWLBe3: + DependsOn: [GWLBStack, GWLBeSubnet3] + Type: AWS::EC2::VPCEndpoint + Condition: 3AZs + Properties: + VpcId: !Ref VPC + VpcEndpointType: GatewayLoadBalancer + SubnetIds: + - !Ref GWLBeSubnet3 + ServiceName: !GetAtt GWLBStack.Outputs.GWLBServiceName + GWLBe4: + DependsOn: [GWLBStack, GWLBeSubnet4] + Type: AWS::EC2::VPCEndpoint + Condition: 4AZs + Properties: + VpcId: !Ref VPC + VpcEndpointType: GatewayLoadBalancer + SubnetIds: + - !Ref GWLBeSubnet4 + ServiceName: !GetAtt GWLBStack.Outputs.GWLBServiceName + TGWAttachmentSubnet1RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Attachment Subnet 1 Route Table + - Key: Network + Value: Private + TGWAttachmentSubnet1GWLBeDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + VpcEndpointId: !Ref GWLBe1 + RouteTableId: !Ref TGWAttachmentSubnet1RouteTable + TGWAttachmentSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref TGWAttachmentSubnet1RouteTable + SubnetId: !Ref TgwSubnet1Id + TGWAttachmentSubnet2RouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Attachment Subnet 2 Route Table + - Key: Network + Value: Private + TGWAttachmentSubnet2GWLBeDefaultRoute: + Type: AWS::EC2::Route + Properties: + DestinationCidrBlock: 0.0.0.0/0 + VpcEndpointId: !Ref GWLBe2 + RouteTableId: !Ref TGWAttachmentSubnet2RouteTable + TGWAttachmentSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref TGWAttachmentSubnet2RouteTable + SubnetId: !Ref TgwSubnet2Id + TGWAttachmentSubnet3RouteTable: + Type: AWS::EC2::RouteTable + Condition: 3AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Attachment Subnet 3 Route Table + - Key: Network + Value: Private + TGWAttachmentSubnet3GWLBeDefaultRoute: + Type: AWS::EC2::Route + Condition: 3AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + VpcEndpointId: !Ref GWLBe3 + RouteTableId: !Ref TGWAttachmentSubnet3RouteTable + TGWAttachmentSubnet3RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 3AZs + Properties: + RouteTableId: !Ref TGWAttachmentSubnet3RouteTable + SubnetId: !Ref TgwSubnet3Id + TGWAttachmentSubnet4RouteTable: + Type: AWS::EC2::RouteTable + Condition: 4AZs + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Attachment Subnet 4 Route Table + - Key: Network + Value: Private + TGWAttachmentSubnet4GWLBeDefaultRoute: + Type: AWS::EC2::Route + Condition: 4AZs + Properties: + DestinationCidrBlock: 0.0.0.0/0 + VpcEndpointId: !Ref GWLBe4 + RouteTableId: !Ref TGWAttachmentSubnet4RouteTable + TGWAttachmentSubnet4RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Condition: 4AZs + Properties: + RouteTableId: !Ref TGWAttachmentSubnet4RouteTable + SubnetId: !Ref TgwSubnet4Id + NatGwPublicAddress1: + Type: AWS::EC2::EIP + Properties: + Domain: vpc + NatGwPublicAddress2: + Type: AWS::EC2::EIP + Properties: + Domain: vpc + NatGwPublicAddress3: + Type: AWS::EC2::EIP + Condition: 3AZs + Properties: + Domain: vpc + NatGwPublicAddress4: + Type: AWS::EC2::EIP + Condition: 4AZs + Properties: + Domain: vpc + NatGateway1: + DependsOn: [GWLBStack, NatGwSubnet1] + Type: AWS::EC2::NatGateway + Properties: + AllocationId: !GetAtt NatGwPublicAddress1.AllocationId + SubnetId: !Ref NatGwSubnet1 + Tags: + - Key: Name + Value: NatGW1 + NatGateway2: + DependsOn: [GWLBStack, NatGwSubnet2] + Type: AWS::EC2::NatGateway + Properties: + AllocationId: !GetAtt NatGwPublicAddress2.AllocationId + SubnetId: !Ref NatGwSubnet2 + Tags: + - Key: Name + Value: NatGW2 + NatGateway3: + DependsOn: [GWLBStack, NatGwSubnet3] + Type: AWS::EC2::NatGateway + Condition: 3AZs + Properties: + AllocationId: !GetAtt NatGwPublicAddress3.AllocationId + SubnetId: !Ref NatGwSubnet3 + Tags: + - Key: Name + Value: NatGW3 + NatGateway4: + DependsOn: [GWLBStack, NatGwSubnet4] + Type: AWS::EC2::NatGateway + Condition: 4AZs + Properties: + AllocationId: !GetAtt NatGwPublicAddress4.AllocationId + SubnetId: !Ref NatGwSubnet4 + Tags: + - Key: Name + Value: NatGW4 +Outputs: + ManagementPublicAddress: + Description: The public address of the management server. + Value: !GetAtt GWLBStack.Outputs.ManagementPublicAddress + Condition: DeployManagement + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !GetAtt GWLBStack.Outputs.ConfigurationTemplateName + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: !GetAtt GWLBStack.Outputs.ControllerName + GWLBName: + Description: Gateway Load Balancer Name. + Value: !Ref GWLBName + GWLBServiceName: + Description: Gateway Load Balancer Service Name. + Value: !GetAtt GWLBStack.Outputs.GWLBServiceName +Rules: + GatewayAddressAllocationRule: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: + - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" + Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/management/README.md b/aws/templates/management/README.md new file mode 100644 index 00000000..f8565c48 --- /dev/null +++ b/aws/templates/management/README.md @@ -0,0 +1,22 @@ + +## Security Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Security Management Server.

For more details, refer to sk130372. +
Deploys a Security Management Server into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/management/management.yaml b/aws/templates/management/management.yaml new file mode 100755 index 00000000..4ec20f7a --- /dev/null +++ b/aws/templates/management/management.yaml @@ -0,0 +1,569 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point Management Server (20240417) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - ManagementSubnet + - Label: + default: EC2 Instance Configuration + Parameters: + - ManagementName + - ManagementInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: IAM Permissions (ignored when the installation is not Primary Management + Server) + Parameters: + - ManagementPermissions + - ManagementPredefinedRole + - ManagementSTSRoles + - Label: + default: Check Point Settings + Parameters: + - ManagementVersion + - Shell + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - Label: + default: Security Management Server Settings + Parameters: + - ManagementHostname + - ManagementInstallationType + - SICKey + - AllowUploadDownload + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + - ManagementBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + ManagementSubnet: + default: Management subnet + ManagementName: + default: Management name + ManagementInstanceType: + default: Instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate an Elastic IP + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + ManagementPermissions: + default: IAM role + ManagementPredefinedRole: + default: Existing IAM role name + ManagementSTSRoles: + default: STS roles + ManagementVersion: + default: Version & license + Shell: + default: Admin shell + ManagementPasswordHash: + default: Password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + ManagementHostname: + default: Management hostname + ManagementInstallationType: + default: Management installation type + SICKey: + default: SIC key + AllowUploadDownload: + default: Allow upload & download + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Gateways management + GatewaysAddresses: + default: Gateways addresses + ManagementBootstrapScript: + default: Management bootstrap script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ManagementSubnet: + Description: To access the instance from the internet, make sure the subnet has + a route to the internet. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ManagementName: + Description: The Management name tag. + Type: String + Default: Check-Point-Management + ManagementInstanceType: + Description: The instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: Allocate an elastic IP for the Management. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + ManagementPermissions: + Description: IAM role to attach to the instance profile. + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + ManagementPredefinedRole: + Description: A predefined IAM role to attach to the instance profile. Ignored. + if IAM role is not set to 'Use existing' + Type: String + Default: '' + ManagementSTSRoles: + Description: The IAM role will be able to assume these STS Roles (comma separated + list of ARNs, without spaces). Ignored if IAM role is set to 'None' or 'Use + existing'. + Type: CommaDelimitedList + Default: '' + ManagementVersion: + Description: The license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ManagementHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: mgmt-aws + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + ManagementInstallationType: + Description: Determines the Management Server installation type. + Type: String + Default: Primary management + AllowedValues: + - Primary management + - Secondary management + - Log Server + SICKey: + Description: >- + Mandatory only if deploying a secondary Management Server or Log Server, the Secure Internal + Communication key creates trusted connections between Check Point components. + Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + Default: '' + AllowedPattern: '(|[a-zA-Z0-9]{8,})' + ConstraintDescription: Can be empty if this is a primary Management Server. Otherwise, + at least 8 alpha numeric characters. + NoEcho: true + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate + with the Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Management + Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage + are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + ManagementBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '[\.a-zA-Z0-9\-]*' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '[\.a-zA-Z0-9\-]*' +Conditions: + EIP: !Equals [!Ref AllocatePublicAddress, true] + ManageOverInternet: !Equals [!Ref GatewayManagement, Over the internet] + ManageOverInternetAndEIP: !And [!Condition EIP, !Condition ManageOverInternet] + CreateRole: !Or + - !Equals [!Ref ManagementPermissions, Create with assume role permissions (specify an STS role ARN)] + - !Equals [!Ref ManagementPermissions, Create with read permissions] + - !Equals [!Ref ManagementPermissions, Create with read-write permissions] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + UseRole: !Not [!Equals [!Ref ManagementPermissions, None (configure later)]] + NoSIC: !Equals [!Ref SICKey, ''] + PreRole: !And [!Condition UseRole, !Not [!Condition CreateRole]] +Resources: + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref ManagementVersion, MGMT]] + ManagementReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: EIP + Properties: {} + ManagementReadyCondition: + Type: AWS::CloudFormation::WaitCondition + Condition: EIP + DependsOn: ManagementInstance + Properties: + Handle: !Ref ManagementReadyHandle + Timeout: 1800 + ManagementSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Management security group + VpcId: !Ref VPC + SecurityGroupIngress: + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 257 + ToPort: 257 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 8211 + ToPort: 8211 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18191 + ToPort: 18191 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18192 + ToPort: 18192 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18208 + ToPort: 18208 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18210 + ToPort: 18210 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18211 + ToPort: 18211 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18221 + ToPort: 18221 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18264 + ToPort: 18264 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 22 + ToPort: 22 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 443 + ToPort: 443 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 18190 + ToPort: 18190 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 19009 + ToPort: 19009 + ManagementRoleStack: + Type: AWS::CloudFormation::Stack + Condition: CreateRole + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml + Parameters: + Permissions: !Ref ManagementPermissions + STSRoles: !Join [',', !Ref ManagementSTSRoles] + InstanceProfile: + Type: AWS::IAM::InstanceProfile + Condition: PreRole + Properties: + Path: / + Roles: + - !Ref ManagementPredefinedRole + ManagementInstance: + Type: AWS::EC2::Instance + DependsOn: ManagementSecurityGroup + Properties: + Tags: + - Key: Name + Value: !Ref ManagementName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref ManagementInstanceType + IamInstanceProfile: !If [UseRole, !If [PreRole, !Ref InstanceProfile, !GetAtt ManagementRoleStack.Outputs.CMEIAMRole], !Ref 'AWS::NoValue'] + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + AssociatePublicIpAddress: false + Description: eth0 + GroupSet: + - !Ref ManagementSecurityGroup + DeleteOnTermination: true + SubnetId: !Ref ManagementSubnet + BlockDeviceMappings: + - DeviceName: /dev/xvda + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${ManagementHostname} ; eic=${EnableInstanceConnect} ; admin_subnet=${AdminCIDR} ; eip=${AllocatePublicAddress} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; mgmt_install_type=''${ManagementInstallationType}''' + - !If [EIP, !Sub ' wait_handle=''${ManagementReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [NoSIC, ' sic=""', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref SICKey, ')"']]] + - !If [ManageOverInternetAndEIP, ' pub_mgmt=true', ' pub_mgmt=false'] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref ManagementBootstrapScript, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementMaintenancePasswordHash, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref ManagementVersion]]}] + - ' python3 /etc/cloud_config.py waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" installationType=\"management\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"management\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" "management_installation_type=\"${mgmt_install_type}\"" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" overTheInternet=\"${pub_mgmt}\" bootstrapScript64=\"${bootstrap}\"' + PublicAddress: + Type: AWS::EC2::EIP + Condition: EIP + Properties: + Domain: vpc + AddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: EIP + DependsOn: ManagementInstance + Properties: + InstanceId: !Ref ManagementInstance + AllocationId: !GetAtt PublicAddress.AllocationId +Outputs: + PublicAddress: + Condition: EIP + Description: The public address of the Management Server. + Value: !Ref PublicAddress + SSH: + Condition: EIP + Description: SSH command. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref PublicAddress]] + URL: + Condition: EIP + Description: URL to the portal. + Value: !Join ['', ['https://', !Ref PublicAddress]] diff --git a/aws/templates/mds/README.md b/aws/templates/mds/README.md new file mode 100644 index 00000000..e920da1f --- /dev/null +++ b/aws/templates/mds/README.md @@ -0,0 +1,21 @@ +## Multi-Domain Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Multi-Domain Security Management Server.

For more details, refer to sk143213. +
Deploys a Multi-Domain Security Management Server into an existing VPC.
+
+
diff --git a/aws/templates/mds/mds.yaml b/aws/templates/mds/mds.yaml new file mode 100644 index 00000000..241bb981 --- /dev/null +++ b/aws/templates/mds/mds.yaml @@ -0,0 +1,510 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploys a Check Point Multi-Domain Server (20240417) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - MDSSubnet + - Label: + default: EC2 Instance Configuration + Parameters: + - MDSName + - MDSInstanceType + - KeyName + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: IAM Permissions (ignored when the installation type is not Primary + Multi-Domain Server) + Parameters: + - MDSPermissions + - MDSPredefinedRole + - MDSSTSRoles + - Label: + default: Check Point Settings + Parameters: + - MDSVersion + - Shell + - MDSPasswordHash + - MDSMaintenancePasswordHash + - Label: + default: Multi-Domain Server Settings + Parameters: + - MDSHostname + - MDSInstallationType + - MDSSICKey + - AllowUploadDownload + - AdminCIDR + - GatewaysAddresses + - MDSBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + MDSSubnet: + default: MDS subnet + MDSName: + default: MDS name + MDSInstanceType: + default: Instance type + KeyName: + default: Key name + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + MDSPermissions: + default: IAM role + MDSPredefinedRole: + default: Existing IAM role name + MDSSTSRoles: + default: STS roles + MDSVersion: + default: Version & license + Shell: + default: Admin shell + MDSPasswordHash: + default: Password hash + MDSMaintenancePasswordHash: + default: MDS Maintenance Password hash + MDSHostname: + default: MDS hostname + MDSInstallationType: + default: MDS installation type + MDSSICKey: + default: SIC key + AllowUploadDownload: + default: Allow upload & download + AdminCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses + MDSBootstrapScript: + default: MDS Bootstrap script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + MDSSubnet: + Description: To access the instance from the internet, make sure the subnet has. + a route to the internet + Type: AWS::EC2::Subnet::Id + MinLength: 1 + MDSName: + Description: The MDS name tag. + Type: String + Default: Check-Point-MDS + MDSInstanceType: + Description: The instance type of the Multi-Domain Server. + Type: String + Default: m5.2xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + MDSPermissions: + Description: IAM role to attach to the instance profile. + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + MDSPredefinedRole: + Description: A predefined IAM role to attach to the instance profile. Ignored + if IAM role is not set to 'Use existing'. + Type: String + Default: '' + MDSSTSRoles: + Description: The IAM role will be able to assume these STS Roles (comma separated + list of ARNs, without spaces). Ignored if IAM role is set to 'None' or 'Use + existing'. + Type: CommaDelimitedList + Default: '' + MDSVersion: + Description: The license to install on the Multi-Domain Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R81-BYOL + - R81.10-BYOL + - R81.20-BYOL + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + MDSPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + MDSMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + MDSHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: mds-aws + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + MDSInstallationType: + Description: Determines the Multi-Domain Server installation type. + Type: String + Default: Primary Multi-Domain Server + AllowedValues: + - Primary Multi-Domain Server + - Secondary Multi-Domain Server + - Multi-Domain Log Server + MDSSICKey: + Description: >- + Mandatory if deploying a Secondary Multi-Domain Server or Multi-Domain Log Server, + the Secure Internal Communication key creates trusted connections between Check + Point components. Choose a random string consisting of at least 8 alphanumeric + characters. + Type: String + Default: '' + AllowedPattern: '(|[a-zA-Z0-9]{8,})' + ConstraintDescription: Can be empty if this is a Primary Multi-Domain Server. + Otherwise, at least 8 alpha numeric characters. + NoEcho: true + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate + with the Multi-Domain Server. The address should be either 0.0.0.0/0 (any address) or /32 (specific address) + Type: String + AllowedPattern: '^((0.0.0.0\/0)|)$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/32)$' + ConstraintDescription: Administrator address must be either 0.0.0.0/0 or /32 + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Multi-Domain. + Server + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + MDSBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '[\.a-zA-Z0-9\-]*' + NTPSecondary: + Description: (optional) + Type: String + Default: '0.pool.ntp.org' + AllowedPattern: '[\.a-zA-Z0-9\-]*' +Conditions: + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + CreateRole: !And + - !Or + - !Condition PrimaryMDS + - !Condition SecondaryMDS + - !Or + - !Equals [!Ref MDSPermissions, Create with assume role permissions (specify an STS role ARN)] + - !Equals [!Ref MDSPermissions, Create with read permissions] + - !Equals [!Ref MDSPermissions, Create with read-write permissions] + UseRole: !And [!Or [!Condition PrimaryMDS, !Condition SecondaryMDS], !Not [!Equals [!Ref MDSPermissions, None (configure later)]]] + PrimaryMDS: !Equals [!Ref MDSInstallationType, Primary Multi-Domain Server] + SecondaryMDS: !Equals [!Ref MDSInstallationType, Secondary Multi-Domain Server] + PreRole: !And [!Condition UseRole, !Not [!Condition CreateRole]] +Resources: + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref MDSVersion, MGMT]] + MDSSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: MDS security group + VpcId: !Ref VPC + SecurityGroupIngress: + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 257 + ToPort: 257 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 8211 + ToPort: 8211 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18191 + ToPort: 18191 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18192 + ToPort: 18192 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18208 + ToPort: 18208 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18210 + ToPort: 18210 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18211 + ToPort: 18211 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18221 + ToPort: 18221 + - CidrIp: !Ref GatewaysAddresses + IpProtocol: tcp + FromPort: 18264 + ToPort: 18264 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 22 + ToPort: 22 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 443 + ToPort: 443 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 18190 + ToPort: 18190 + - CidrIp: !Ref AdminCIDR + IpProtocol: tcp + FromPort: 19009 + ToPort: 19009 + MDSRoleStack: + Type: AWS::CloudFormation::Stack + Condition: CreateRole + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml + Parameters: + Permissions: !Ref MDSPermissions + STSRoles: !Join [',', !Ref MDSSTSRoles] + InstanceProfile: + Type: AWS::IAM::InstanceProfile + Condition: PreRole + Properties: + Path: / + Roles: + - !Ref MDSPredefinedRole + MDSInstance: + Type: AWS::EC2::Instance + DependsOn: MDSSecurityGroup + Properties: + Tags: + - Key: Name + Value: !Ref MDSName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref MDSInstanceType + IamInstanceProfile: !If [UseRole, !If [PreRole, !Ref InstanceProfile, !GetAtt MDSRoleStack.Outputs.CMEIAMRole], !Ref 'AWS::NoValue'] + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + AssociatePublicIpAddress: false + Description: eth0 + GroupSet: + - !Ref MDSSecurityGroup + DeleteOnTermination: true + SubnetId: !Ref MDSSubnet + BlockDeviceMappings: + - DeviceName: /dev/xvda + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + DisableApiTermination: !Ref TerminationProtection + UserData: !Base64 + Fn::Join: + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${MDSHostname} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; admin_subnet=${AdminCIDR}' + - !If [PrimaryMDS, ' primary=true ; secondary=false', !If [SecondaryMDS, ' primary=false ; secondary=true', ' primary=false ; secondary=false']] + - !If [PrimaryMDS, ' sic=notused', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref MDSSICKey, ')"']]] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref MDSBootstrapScript, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSMaintenancePasswordHash, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref MDSVersion]]}] + - ' python3 /etc/cloud_config.py sicKey=\"${sic}\" installationType=\"mds\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"mds\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" primary=\"${primary}\" secondary=\"${secondary}\" adminSubnet=\"${admin_subnet}\" bootstrapScript64=\"${bootstrap}\"' \ No newline at end of file diff --git a/aws/templates/single-gw/README.md b/aws/templates/single-gw/README.md new file mode 100644 index 00000000..34e01aba --- /dev/null +++ b/aws/templates/single-gw/README.md @@ -0,0 +1,25 @@ +## Security Gateway + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Security Gateway.

To deploy the Security Gateway so that it will be automatically provisioned, refer to sk131434. +
Creates a new VPC and deploys a Security Gateway into it.
Deploys a Security Gateway into an existing VPC.
+
+
diff --git a/aws/templates/single-gw/gateway-master.yaml b/aws/templates/single-gw/gateway-master.yaml new file mode 100644 index 00000000..3c34df22 --- /dev/null +++ b/aws/templates/single-gw/gateway-master.yaml @@ -0,0 +1,489 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point Security Gateway into a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZone + - VPCCIDR + - PublicSubnetCIDR + - PrivateSubnetCIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewaySICKey + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - GatewayToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + - Label: + default: Automatic Provisioning with Security Management Server Settings (optional) + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + AvailabilityZone: + default: Availability zone + VPCCIDR: + default: VPC CIDR + PublicSubnetCIDR: + default: Public subnet CIDR + PrivateSubnetCIDR: + default: Private subnet CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Gateway Instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate an Elastic IP + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateway Version & license + Shell: + default: Admin shell + GatewaySICKey: + default: Gateway SIC key + GatewayToken: + default: Smart-1 Cloud Token + GatewayPasswordHash: + default: Gateway Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server + ControlGatewayOverPrivateOrPublicAddress: + default: Gateway address + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + AvailabilityZone: + Description: The availability zone in which to deploy the instance. + Type: AWS::EC2::AvailabilityZone::Name + MinLength: 1 + VPCCIDR: + Description: The CIDR block of the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnetCIDR: + Description: The public subnet of the Security Gateway. + Type: String + Default: 10.0.10.0/24 + PrivateSubnetCIDR: + Description: The private subnet of the Security Gateway. + Type: String + Default: 10.0.11.0/24 + GatewayName: + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The instance type of the Secutiry Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '[a-zA-Z0-9]{8,}' + NoEcho: true + GatewayToken: + Description: Follow the instructions in sk180501 to quickly connect this Gateway to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the Security Gateway is provisioned using its private. + or public address + Type: String + Default: private + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic. + provisioning configuration. + Type: String + ConfigurationTemplate: + Description: A name of a Security Gateway configuration template in the automatic. + provisioning configuration. + Type: String + MaxLength: 30 +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Ref AvailabilityZone + NumberOfAZs: 1 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnetCIDR + CreatePrivateSubnets: true + PrivateSubnet1CIDR: !Ref PrivateSubnetCIDR + CreateAttachmentSubnets: false + InternalRoutingTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - InternalRoutingTable + InternalNetworkRouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref InternalRoutingTable + SubnetId: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + GatewayStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/gateway.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PrivateSubnet: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + InternalRouteTable: !Ref InternalRoutingTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewaySICKey: !Ref GatewaySICKey + GatewayToken: !Ref GatewayToken + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate +Outputs: + CheckPointInstancePublicAddress: + Condition: AllocateAddress + Description: The public address of the Check Point instance. + Value: !GetAtt GatewayStack.Outputs.PublicAddress + CheckPointInstancePrivateExternalAddress: + Description: The private external address of the Check Point instance. + Value: !GetAtt GatewayStack.Outputs.PrivateExternalAddress + CheckPointInstancePrivateInternalAddress: + Description: The private internal address of the Check Point instance. + Value: !GetAtt GatewayStack.Outputs.PrivateInternalAddress + CheckPointInstanceSSH: + Condition: AllocateAddress + Description: SSH command to the Check Point instance. + Value: !GetAtt GatewayStack.Outputs.SSH + CheckPointInstanceURL: + Condition: AllocateAddress + Description: URL to the portal + Value: !GetAtt GatewayStack.Outputs.URL + ManagementName: + Description: The name that represents the Security Management Server. + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations + required to automatically provision the Gateways in the Auto Scaling Group, + such as what Security Policy to install and which Blades to enable, will be + placed under this template name. + Value: !Ref ConfigurationTemplate diff --git a/aws/templates/single-gw/gateway.yaml b/aws/templates/single-gw/gateway.yaml new file mode 100644 index 00000000..5c66f2fa --- /dev/null +++ b/aws/templates/single-gw/gateway.yaml @@ -0,0 +1,587 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point Security Gateway into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnet + - PrivateSubnet + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewaySICKey + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - GatewayToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + - Label: + default: Automatic Provisioning with Security Management Server Settings (optional) + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + VPC: + default: VPC + PublicSubnet: + default: Public subnet + PrivateSubnet: + default: Private subnet + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Gateway Instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate an Elastic IP + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateway Version & license + Shell: + default: Admin shell + GatewaySICKey: + default: Gateway SIC key + GatewayToken: + default: Smart-1 Cloud Token + GatewayPasswordHash: + default: Gateway Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server + ControlGatewayOverPrivateOrPublicAddress: + default: Gateway address + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + VPC: + Type: AWS::EC2::VPC::Id + MinLength: 1 + PublicSubnet: + Description: The public subnet of the security gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + PrivateSubnet: + Description: The private subnet of the security gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + InternalRouteTable: + Description: The route table id in which to set 0.0.0.0/0 route to the Gateway instance (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Gateway, this requires manual configuration in the route table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '[a-zA-Z0-9]{8,}' + NoEcho: true + GatewayToken: + Description: Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + Type: String + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + NoEcho: true + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the Security Gateway is provisioned using its private + or public address. + Type: String + Default: private + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic + provisioning configuration. + Type: String + ConfigurationTemplate: + Description: A name of a Security Gateway configuration template in the automatic + provisioning configuration. + Type: String + MaxLength: 30 +Conditions: + ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + ProvidedManagementParameters: !And [!Not [!Equals [!Ref ManagementServer, '']], !Not [!Equals [!Ref ConfigurationTemplate, '']]] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] +Resources: + ReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: AllocateAddress + Properties: {} + ReadyCondition: + Type: AWS::CloudFormation::WaitCondition + Condition: AllocateAddress + DependsOn: GatewayInstance + Properties: + Handle: !Ref ReadyHandle + Timeout: 1800 + GatewayIAMRole: + Condition: EnableCloudWatch + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: + Service: [ ec2.amazonaws.com ] + Action: sts:AssumeRole + Path: / + GatewayInstanceProfile: + Condition: EnableCloudWatch + Type: AWS::IAM::InstanceProfile + Properties: + Path: / + Roles: [!Ref GatewayIAMRole] + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] + PolicyRole: !Ref GatewayIAMRole + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !Join ['-', [!Ref GatewayVersion,GW]] + ExternalNetworkInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - ExternalNetworkInterface + Description: eth0 + SourceDestCheck: false + GroupSet: + - !Ref PermissiveSecurityGroup + SubnetId: !Ref PublicSubnet + InternalNetworkInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - InternalNetworkInterface + Description: eth1 + SourceDestCheck: false + GroupSet: + - !Ref PermissiveSecurityGroup + SubnetId: !Ref PrivateSubnet + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + Tags: + - Key: Name + Value: + !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - PermissiveSecurityGroup + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + InternalDefaultRoute: + Type: AWS::EC2::Route + Condition: ProvidedRouteTable + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !Ref InternalNetworkInterface + RouteTableId: !Ref InternalRouteTable + GatewayInstance: + Type: AWS::EC2::Instance + Properties: + Tags: + - Key: Name + Value: !Ref GatewayName + - !If + - ProvidedManagementParameters + - Key: x-chkp-tags + Value: + !Join + - ':' + - - !Join ['=', [management, !Ref ManagementServer]] + - !Join ['=', [template,!Ref ConfigurationTemplate]] + - !Join ['=',[ip-address, !Ref ControlGatewayOverPrivateOrPublicAddress]] + - !Ref 'AWS::NoValue' + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: !If [EnableCloudWatch, !Ref GatewayInstanceProfile, !Ref 'AWS::NoValue'] + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; hostname=${GatewayHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; token=''${GatewayToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue'] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${token}\"" installationType=\"gateway\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"gateway\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref ExternalNetworkInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref InternalNetworkInterface + PublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + AddressAssoc: + Type: AWS::EC2::EIPAssociation + Condition: AllocateAddress + DependsOn: GatewayInstance + Properties: + NetworkInterfaceId: !Ref ExternalNetworkInterface + AllocationId: !GetAtt PublicAddress.AllocationId + PrivateIpAddress: !GetAtt ExternalNetworkInterface.PrimaryPrivateIpAddress +Outputs: + PublicAddress: + Description: The public address of the Check Point instance. + Value: !Ref PublicAddress + Condition: AllocateAddress + PrivateExternalAddress: + Description: The private external address of the Check Point instance. + Value: !GetAtt ExternalNetworkInterface.PrimaryPrivateIpAddress + PrivateInternalAddress: + Description: The private internal address of the Check Point instance. + Value: !GetAtt InternalNetworkInterface.PrimaryPrivateIpAddress + SSH: + Description: SSH command to the Check Point instance. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref PublicAddress]] + Condition: AllocateAddress + URL: + Description: URL to the portal. + Value: !Join ['', ['https://', !Ref PublicAddress]] + Condition: AllocateAddress + ManagementName: + Description: The name that represents the Security Management Server. + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations + required to automatically provision the Gateways in the Auto Scaling Group, + such as what Security Policy to install and which Blades to enable, will be + placed under this template name. + Value: !Ref ConfigurationTemplate diff --git a/aws/templates/standalone/README.md b/aws/templates/standalone/README.md new file mode 100644 index 00000000..b7afb4c3 --- /dev/null +++ b/aws/templates/standalone/README.md @@ -0,0 +1,26 @@ + +## Security Management Server & Security Gateway (Standalone Deployment) + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures Standalone or a manually configurable instance. + Creates a new VPC and deploys a Standalone or a manually configurable instance into it.
Deploys a Standalone or a manually configurable instance into an existing VPC.
+
+
diff --git a/aws/templates/standalone/standalone-master.yaml b/aws/templates/standalone/standalone-master.yaml new file mode 100644 index 00000000..4f598a3f --- /dev/null +++ b/aws/templates/standalone/standalone-master.yaml @@ -0,0 +1,434 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS + Security Gateway & Management (Standalone) instance in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZone + - VPCCIDR + - PublicSubnetCIDR + - PrivateSubnetCIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - StandaloneName + - StandaloneInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - StandaloneVersion + - Shell + - StandalonePasswordHash + - StandaloneMaintenancePasswordHash + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - StandaloneHostname + - AllowUploadDownload + - CloudWatch + - StandaloneBootstrapScript + - NTPPrimary + - NTPSecondary + - AdminCIDR + - GatewaysAddresses + ParameterLabels: + AvailabilityZone: + default: Availability zone + VPCCIDR: + default: VPC CIDR + PublicSubnetCIDR: + default: Public subnet CIDR + PrivateSubnetCIDR: + default: Private subnet CIDR + StandaloneName: + default: Standalone Name + StandaloneInstanceType: + default: Instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate an Elastic IP + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + StandaloneVersion: + default: License + Shell: + default: Admin shell + StandalonePasswordHash: + default: Standalone Password hash + StandaloneMaintenancePasswordHash: + default: Gateway Maintenance Password hash + ResourcesTagName: + default: Resources prefix tag + StandaloneHostname: + default: Standalone Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + StandaloneBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server + AdminCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses +Parameters: + AvailabilityZone: + Description: The availability zone in which to deploy the instance. + Type: AWS::EC2::AvailabilityZone::Name + MinLength: 1 + VPCCIDR: + Description: The CIDR block of the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnetCIDR: + Description: The public subnet of the Security Gateway. + Type: String + Default: 10.0.10.0/24 + PrivateSubnetCIDR: + Description: The private subnet of the Security Gateway. + Type: String + Default: 10.0.11.0/24 + StandaloneName: + Type: String + Default: Check-Point-Instance + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40. + Default: false + Type: String + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + StandaloneVersion: + Description: Standalone Version & License. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-PAYG-NGTP + - R80.40-BYOL + - R81-PAYG-NGTP + - R81-BYOL + - R81.10-PAYG-NGTP + - R81.10-BYOL + - R81.20-PAYG-NGTP + - R81.20-BYOL + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + StandalonePasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + StandaloneMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + StandaloneInstanceType: + Description: The instance type of the Security Gateway & Management (Standalone) instance. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + StandaloneHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + StandaloneBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate. + with the Management Server + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Management. + Server. (optional) + Type: String + AllowedPattern: '^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))?$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Ref AvailabilityZone + NumberOfAZs: 1 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnetCIDR + CreatePrivateSubnets: true + PrivateSubnet1CIDR: !Ref PrivateSubnetCIDR + CreateAttachmentSubnets: false + InternalRoutingTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - InternalRoutingTable + InternalNetworkRouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + RouteTableId: !Ref InternalRoutingTable + SubnetId: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + StandaloneStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/standalone.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PrivateSubnet: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + InternalRouteTable: !Ref InternalRoutingTable + StandaloneName: !Ref StandaloneName + StandaloneInstanceType: !Ref StandaloneInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + StandaloneVersion: !Ref StandaloneVersion + Shell: !Ref Shell + StandalonePasswordHash: !Ref StandalonePasswordHash + StandaloneMaintenancePasswordHash: !Ref StandaloneMaintenancePasswordHash + ResourcesTagName: !Ref ResourcesTagName + StandaloneHostname: !Ref StandaloneHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + StandaloneBootstrapScript: !Ref StandaloneBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary + AdminCIDR: !Ref AdminCIDR + GatewaysAddresses: !Ref GatewaysAddresses +Outputs: + CheckPointInstancePublicAddress: + Condition: AllocateAddress + Description: The public address of the Check Point instance. + Value: !GetAtt StandaloneStack.Outputs.PublicAddress + CheckPointInstanceSSH: + Condition: AllocateAddress + Description: SSH command to the Check Point instance. + Value: !GetAtt StandaloneStack.Outputs.SSH + CheckPointInstanceURL: + Condition: AllocateAddress + Description: URL to the portal. + Value: !GetAtt StandaloneStack.Outputs.URL diff --git a/aws/templates/standalone/standalone.yaml b/aws/templates/standalone/standalone.yaml new file mode 100644 index 00000000..78f36aba --- /dev/null +++ b/aws/templates/standalone/standalone.yaml @@ -0,0 +1,521 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS + Security Gateway & Management (Standalone) instance into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnet + - PrivateSubnet + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - StandaloneName + - StandaloneInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - StandaloneVersion + - Shell + - StandalonePasswordHash + - StandaloneMaintenancePasswordHash + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - StandaloneHostname + - AllowUploadDownload + - CloudWatch + - StandaloneBootstrapScript + - NTPPrimary + - NTPSecondary + - AdminCIDR + - GatewaysAddresses + ParameterLabels: + VPC: + default: VPC + PublicSubnet: + default: Public subnet + PrivateSubnet: + default: Private subnet + InternalRouteTable: + default: Internal route table + StandaloneName: + default: Standalone Name + StandaloneInstanceType: + default: Standalone Instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate an Elastic IP + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + StandaloneVersion: + default: License + Shell: + default: Admin shell + StandalonePasswordHash: + default: Standalone Password hash + StandaloneMaintenancePasswordHash: + default: Standalone Maintenance Password hash + ResourcesTagName: + default: Resources prefix tag + StandaloneHostname: + default: Standalone Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + StandaloneBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server + AdminCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses +Parameters: + VPC: + Type: AWS::EC2::VPC::Id + MinLength: 1 + PublicSubnet: + Description: The public subnet of the Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + PrivateSubnet: + Description: The private subnet of the Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + InternalRouteTable: + Description: The route table id in which to set 0.0.0.0/0 route to the Security Gateway instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Gateway, this requires manual configuration in the route table. (optional) + Type: String + Default: '' + StandaloneName: + Type: String + Default: Check-Point-Instance + StandaloneInstanceType: + Description: The instance type of the Security Gateway & Management (Standalone) instance. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40. + Default: false + Type: String + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + StandaloneVersion: + Description: Standalone Version & License. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-PAYG-NGTP + - R80.40-BYOL + - R81-PAYG-NGTP + - R81-BYOL + - R81.10-PAYG-NGTP + - R81.10-BYOL + - R81.20-PAYG-NGTP + - R81.20-BYOL + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + StandalonePasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + StandaloneMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ResourcesTagName: + Description: The name tag of the resources. (optional) + Type: String + Default: '' + StandaloneHostname: + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + StandaloneBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate. + with the Management Server. + Type: String + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Management. + Server. (optional) + Type: String + AllowedPattern: '^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))?$' +Conditions: + ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] + EncryptedVolume: !Not [!Equals [!Ref VolumeEncryption, '']] + ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] + EnableCloudWatch: !Equals [!Ref CloudWatch, true] + IsBYOL: !Equals [!Select [1, !Split ['-', !Ref StandaloneVersion]], 'BYOL'] +Resources: + ReadyHandle: + Type: AWS::CloudFormation::WaitConditionHandle + Condition: AllocateAddress + Properties: {} + ReadyCondition: + Type: AWS::CloudFormation::WaitCondition + Condition: AllocateAddress + DependsOn: StandaloneInstance + Properties: + Handle: !Ref ReadyHandle + Timeout: 1800 + StandaloneIAMRole: + Condition: EnableCloudWatch + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: + Service: [ ec2.amazonaws.com ] + Action: sts:AssumeRole + Path: / + StandaloneInstanceProfile: + Condition: EnableCloudWatch + Type: AWS::IAM::InstanceProfile + Properties: + Path: / + Roles: [ !Ref StandaloneIAMRole ] + CloudwatchPolicy: + Condition: EnableCloudWatch + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + Parameters: + PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] + PolicyRole: !Ref StandaloneIAMRole + AMI: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + Parameters: + Version: !If [IsBYOL, !Join ['-', [!Ref StandaloneVersion,MGMT]], !Ref StandaloneVersion] + ExternalNetworkInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Tags: + - Key: Name + Value: !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - ExternalNetworkInterface + Description: eth0 + SourceDestCheck: false + GroupSet: + - !Ref PermissiveSecurityGroup + SubnetId: !Ref PublicSubnet + InternalNetworkInterface: + Type: AWS::EC2::NetworkInterface + Properties: + Tags: + - Key: Name + Value: !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - InternalNetworkInterface + Description: eth1 + SourceDestCheck: false + GroupSet: + - !Ref PermissiveSecurityGroup + SubnetId: !Ref PrivateSubnet + PermissiveSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + Tags: + - Key: Name + Value: !Join + - _ + - - !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] + - PermissiveSecurityGroup + GroupDescription: Permissive security group. + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: -1 + CidrIp: 0.0.0.0/0 + InternalDefaultRoute: + Type: AWS::EC2::Route + Condition: ProvidedRouteTable + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !Ref InternalNetworkInterface + RouteTableId: !Ref InternalRouteTable + StandaloneInstance: + Type: AWS::EC2::Instance + Properties: + Tags: + - Key: Name + Value: !Ref StandaloneName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref StandaloneInstanceType + BlockDeviceMappings: + - DeviceName: /dev/xvda + Ebs: + Encrypted: !If [EncryptedVolume, true, false] + KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: !If [EnableCloudWatch, !Ref StandaloneInstanceProfile, !Ref 'AWS::NoValue'] + DisableApiTermination: !Ref TerminationProtection + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; hostname=${StandaloneHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; admin_subnet=${AdminCIDR}' + - !If [AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue'] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref StandaloneBootstrapScript, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref StandalonePasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref StandaloneMaintenancePasswordHash, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref StandaloneVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" installationType=\"standalone\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"standalone\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + KeyName: !Ref KeyName + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref ExternalNetworkInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref InternalNetworkInterface + PublicAddress: + Type: AWS::EC2::EIP + Condition: AllocateAddress + Properties: + Domain: vpc + AddressAssoc: + Type: AWS::EC2::EIPAssociation + DependsOn: StandaloneInstance + Condition: AllocateAddress + Properties: + NetworkInterfaceId: !Ref ExternalNetworkInterface + AllocationId: !GetAtt PublicAddress.AllocationId + PrivateIpAddress: !GetAtt ExternalNetworkInterface.PrimaryPrivateIpAddress +Outputs: + PublicAddress: + Condition: AllocateAddress + Description: The public address of the Check Point instance. + Value: !Ref PublicAddress + SSH: + Condition: AllocateAddress + Description: SSH command to the Check Point instance. + Value: !Join ['', ['ssh -i ', !Ref KeyName, ' admin@', !Ref PublicAddress]] + URL: + Condition: AllocateAddress + Description: URL to the portal. + Value: !Join ['', ['https://', !Ref PublicAddress ]] diff --git a/aws/templates/tgw-asg/README.md b/aws/templates/tgw-asg/README.md new file mode 100644 index 00000000..1ea088d6 --- /dev/null +++ b/aws/templates/tgw-asg/README.md @@ -0,0 +1,26 @@ + +## Transit Gateway Auto Scaling Group + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configured the Security Gateways as an AWS Auto Scaling group configured for Transit Gateway.

For more details, refer to AWS Transit Gateway R80.10 and above Deployment Guide. +
Creates a new VPC and deploys an Auto Scaling group of Security Gateways configured for Transit Gateway into it, and an optional, preconfigured Security Management Server to manage them.
Deploys an Auto Scaling group of Security Gateways configured for Transit Gateway into an existing VPC, and an optional, preconfigured Security Management Server to manage them.
+
+
diff --git a/aws/templates/tgw-asg/tgw-asg-master.yaml b/aws/templates/tgw-asg/tgw-asg-master.yaml new file mode 100644 index 00000000..076e24a7 --- /dev/null +++ b/aws/templates/tgw-asg/tgw-asg-master.yaml @@ -0,0 +1,688 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - AvailabilityZones + - NumberOfAZs + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PublicSubnet3CIDR + - PublicSubnet4CIDR + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - CloudWatch + - ASN + - AdminEmail + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - ManagementPermissions + - ManagementPredefinedRole + - GatewaysBlades + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Automatic Provisioning with Security Management Server Settings + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + AvailabilityZones: + default: Availability Zones + NumberOfAZs: + default: Number of AZs + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public Subnet 1 + PublicSubnet2CIDR: + default: Public Subnet 2 + PublicSubnet3CIDR: + default: Public Subnet 3 + PublicSubnet4CIDR: + default: Public Subnet 4 + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + GatewayName: + default: GatewayName + GatewayInstanceType: + default: Gateways instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Gateways version & license + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + CloudWatch: + default: CloudWatch metrics + ASN: + default: BGP ASN + AdminEmail: + default: Email address + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Instance type + ManagementVersion: + default: Version & license + ManagementPasswordHash: + default: Password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + ManagementPermissions: + default: IAM role + ManagementPredefinedRole: + default: Existing IAM role name + GatewaysBlades: + default: Default Blades + AdminCIDR: + default: Administrator addresses + GatewayManagement: + default: Manage Gateways + GatewaysAddresses: + default: Gateways addresses + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + AvailabilityZones: + Description: List of Availability Zones (AZs) to use for the subnets in the VPC. Select at least two. + Type: List + MinLength: 2 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. + Type: Number + Default: 2 + MinValue: 2 + MaxValue: 4 + VPCCIDR: + Description: CIDR block for the VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. If you choose to deploy a Security Management Server it will be deployed in this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet3CIDR: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone. + Type: String + Default: 10.0.30.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet4CIDR: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone. + Type: String + Default: 10.0.40.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '[a-zA-Z0-9]{8,}' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways. + Type: String + AllowedPattern: '^[0-9]+$' + Default: 65000 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + ConstraintDescription: Must be a valid email address. + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The version and license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ManagementPermissions: + Description: IAM role to attach to the instance profile. + Type: String + Default: Create with read-write permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + ManagementPredefinedRole: + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'. + Type: String + Default: '' + GatewaysBlades: + Description: Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later). + Type: String + Default: true + AllowedValues: + - true + - false + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))?$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: TGW-ASG-configuration + MinLength: 1 + MaxLength: 30 +Conditions: + 4AZs: !Equals [!Ref NumberOfAZs, 4] + 3AZs: !Or [!Equals [!Ref NumberOfAZs, 3], !Condition 4AZs] + DeployManagement: !Equals [!Ref ManagementDeploy, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: !Ref NumberOfAZs + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PublicSubnet3CIDR: !Ref PublicSubnet3CIDR + PublicSubnet4CIDR: !Ref PublicSubnet4CIDR + CreatePrivateSubnets: false + MainStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/tgw-asg.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + GatewaysSubnets: !Join + - ',' + - - !GetAtt VPCStack.Outputs.PublicSubnet1ID + - !GetAtt VPCStack.Outputs.PublicSubnet2ID + - !If [3AZs, !GetAtt VPCStack.Outputs.PublicSubnet3ID, !Ref 'AWS::NoValue'] + - !If [4AZs, !GetAtt VPCStack.Outputs.PublicSubnet4ID, !Ref 'AWS::NoValue'] + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + AllowUploadDownload: !Ref AllowUploadDownload + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + CloudWatch: !Ref CloudWatch + ASN: !Ref ASN + AdminEmail: !Ref AdminEmail + ManagementDeploy: !Ref ManagementDeploy + ManagementInstanceType: !Ref ManagementInstanceType + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + ManagementPermissions: !Ref ManagementPermissions + ManagementPredefinedRole: !Ref ManagementPredefinedRole + GatewaysBlades: !Ref GatewaysBlades + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate +Outputs: + ManagementName: + Description: The name that represents the Security Management Server. + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: !GetAtt MainStack.Outputs.ControllerName + ManagementPublicAddress: + Description: The public address of the management servers. + Value: !GetAtt MainStack.Outputs.ManagementPublicAddress + Condition: DeployManagement +Rules: + GatewayAddressRule: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: + - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" + Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] \ No newline at end of file diff --git a/aws/templates/tgw-asg/tgw-asg.yaml b/aws/templates/tgw-asg/tgw-asg.yaml new file mode 100644 index 00000000..c63676e1 --- /dev/null +++ b/aws/templates/tgw-asg/tgw-asg.yaml @@ -0,0 +1,679 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VPC + - GatewaysSubnets + - Label: + default: General Settings + Parameters: + - KeyName + - EnableVolumeEncryption + - VolumeSize + - VolumeType + - EnableInstanceConnect + - TerminationProtection + - AllowUploadDownload + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewayVersion + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - CloudWatch + - ASN + - AdminEmail + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementVersion + - ManagementPasswordHash + - ManagementMaintenancePasswordHash + - ManagementPermissions + - ManagementPredefinedRole + - GatewaysBlades + - AdminCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Automatic Provisioning with Security Management Server Settings + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + VPC: + default: VPC + GatewaysSubnets: + default: Subnets + KeyName: + default: Key name + EnableVolumeEncryption: + default: Enable environment volume encryption + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + EnableInstanceConnect: + default: Enable AWS Instance Connect + TerminationProtection: + default: Termination Protection + AllowUploadDownload: + default: Allow upload & download + GatewayName: + default: Name + GatewayInstanceType: + default: Instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewayVersion: + default: Version & license + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + CloudWatch: + default: CloudWatch metrics + ASN: + default: BGP ASN + AdminEmail: + default: Email address + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Instance type + ManagementVersion: + default: Version & license + ManagementPasswordHash: + default: Password hash + ManagementMaintenancePasswordHash: + default: Management Maintenance Password hash + ManagementPermissions: + default: IAM role + ManagementPredefinedRole: + default: Existing IAM role name + GatewaysBlades: + default: Default Blades + AdminCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses + GatewayManagement: + default: Manage Gateways + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC. + GatewaysSubnets: + Description: Select at least 2 external subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet. + Type: List + MinLength: 2 + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair. + EnableVolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + MinValue: 100 + Default: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Gateway + GatewayInstanceType: + Description: The EC2 instance type for the Security Gateways. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways. + Type: Number + Default: 2 + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways. + Type: Number + Default: 10 + MinValue: 1 + GatewayVersion: + Description: The version and license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters. + Type: String + AllowedPattern: '[a-zA-Z0-9]{8,}' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long. + NoEcho: true + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways. + Type: String + Default: 65000 + AllowedPattern: '^[0-9]+$' + AdminEmail: + Description: Notifications about scaling events will be sent to this email address. (optional) + Type: String + Default: '' + AllowedPattern: '^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$' + ConstraintDescription: Must be a valid email address. + ManagementDeploy: + Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. + Type: String + Default: true + AllowedValues: + - true + - false + ManagementInstanceType: + Description: The EC2 instance type of the Security Management Server. + Type: String + Default: m5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementVersion: + Description: The version and license to install on the Security Management Server. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG + - R81-BYOL + - R81-PAYG + - R81.10-BYOL + - R81.10-PAYG + - R81.20-BYOL + - R81.20-PAYG + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ManagementMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + ManagementPermissions: + Description: IAM role to attach to the instance profile. + Type: String + Default: Create with read-write permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + ManagementPredefinedRole: + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'. + Type: String + Default: '' + GatewaysBlades: + Description: Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later). + Type: String + Default: true + AllowedValues: + - true + - false + AdminCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2])))?$' + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server. + Type: String + AllowedPattern: '^$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address. + Type: String + Default: private + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration. + Type: String + Default: management-server + MinLength: 1 + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration. + Type: String + Default: TGW-ASG-configuration + MinLength: 1 + MaxLength: 30 +Conditions: + VolumeEncryption: !Equals [!Ref EnableVolumeEncryption, true] + DeployManagement: !Equals [!Ref ManagementDeploy, true] +Resources: + ManagementStack: + Type: AWS::CloudFormation::Stack + Condition: DeployManagement + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/management/management.yaml + Parameters: + VPC: !Ref VPC + ManagementSubnet: !Select [0, !Ref GatewaysSubnets] + ManagementName: !Ref ManagementServer + ManagementInstanceType: !Ref ManagementInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: true + VolumeEncryption: !If [VolumeEncryption, alias/aws/ebs, ''] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + TerminationProtection: !Ref TerminationProtection + ManagementPermissions: !Ref ManagementPermissions + ManagementPredefinedRole: !Ref ManagementPredefinedRole + ManagementVersion: !Ref ManagementVersion + ManagementPasswordHash: !Ref ManagementPasswordHash + ManagementMaintenancePasswordHash: !Ref ManagementMaintenancePasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + AdminCIDR: !Ref AdminCIDR + GatewayManagement: !Ref GatewayManagement + GatewaysAddresses: !Ref GatewaysAddresses + ManagementBootstrapScript: !Join + - ';' + - - 'echo -e "\nStarting Bootstrap script\n"' + - 'echo "Setting up bootstrap parameters"' + - !Sub 'conf_template=${ConfigurationTemplate} ; mgmt=${ManagementServer} ; region=${AWS::Region} ; blades=${GatewaysBlades}' + - !Sub ['version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - !Join ['', ['sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ' | base64 -d)"']] + - 'community="tgw-community" ; controller="tgw-controller"' + - 'echo "Adding tgw identifier to cloud-version"' + - 'template="management_tgw_asg"' + - 'cv_path="/etc/cloud-version"' + - 'if test -f ${cv_path}; then sed -i ''/template_name/c\template_name: ''"${template}"'''' /etc/cloud-version; fi' + - 'cv_json_path="/etc/cloud-version.json"' + - 'cv_json_path_tmp="/etc/cloud-version-tmp.json"' + - 'if test -f ${cv_json_path}; then cat ${cv_json_path} | jq ''.template_name = "''"${template}"''"'' > ${cv_json_path_tmp}; mv ${cv_json_path_tmp} ${cv_json_path}; fi' + - 'echo "Configuring VPN community: ${community}"' + - '[[ -d /opt/CPcme/menu/additions ]] && /opt/CPcme/menu/additions/config-community.sh "${community}" || /etc/fw/scripts/autoprovision/config-community.sh "${community}"' + - 'echo "Setting VPN rules"' + - 'mgmt_cli -r true add access-layer name "Inline"' + - 'mgmt_cli -r true add access-rule layer Network position 1 name "${community} VPN Traffic Rule" vpn.directional.1.from "${community}" vpn.directional.1.to "${community}" vpn.directional.2.from "${community}" vpn.directional.2.to External_clear action "Apply Layer" source "Any" destination "Any" service "Any" inline-layer "Inline"' + - 'mgmt_cli -r true add dynamic-object name "LocalGateway"' + - 'mgmt_cli -r true add nat-rule package standard position bottom install-on "Policy Targets" original-source All_Internet translated-source "LocalGateway" method hide' + - 'echo "Setting CME configurations"' + - 'autoprov_cfg -f init AWS -mn "${mgmt}" -tn "${conf_template}" -cn "${controller}" -po Standard -otp "${sic}" -r "${region}" -ver "${version}" -iam -dt TGW' + - 'autoprov_cfg -f set controller AWS -cn "${controller}" -sv -com "${community}"' + - 'autoprov_cfg -f set template -tn "${conf_template}" -vpn -vd "" -con "${community}"' + - '${blades} && autoprov_cfg -f set template -tn "${conf_template}" -ia -ips -appi -av -ab' + - 'echo -e "\nFinished Bootstrap script\n"' + SecurityGatewaysStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/autoscale.yaml + Parameters: + VPC: !Ref VPC + GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + EnableVolumeEncryption: !Ref EnableVolumeEncryption + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + AdminEmail: !Ref AdminEmail + GatewayVersion: !Ref GatewayVersion + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Join + - ';' + - - 'echo -e "\nStarting Bootstrap script\n"' + - 'echo "Setting up bootstrap parameters"' + - !Sub 'asn=${ASN}' + - 'echo "Adding tgw identifier to cloud-version"' + - 'template="autoscale_tgw"' + - 'cv_path="/etc/cloud-version"' + - 'if test -f ${cv_path}; then sed -i ''/template_name/c\template_name: ''"${template}"'''' /etc/cloud-version; fi' + - 'cv_json_path="/etc/cloud-version.json"' + - 'cv_json_path_tmp="/etc/cloud-version-tmp.json"' + - 'if test -f ${cv_json_path}; then cat ${cv_json_path} | jq ''.template_name = "''"${template}"''"'' > ${cv_json_path_tmp}; mv ${cv_json_path_tmp} ${cv_json_path}; fi' + - 'echo "Setting ASN to: ${asn}"' + - 'clish -c "set as ${asn}" -s' + - 'echo -e "\nFinished Bootstrap script\n"' + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate +Outputs: + ManagementName: + Description: The name that represents the Security Management Server. + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name. + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name. + Value: tgw-controller + ManagementPublicAddress: + Description: The public address of the management servers. + Value: !GetAtt ManagementStack.Outputs.PublicAddress + Condition: DeployManagement +Rules: + GatewayAddressRule: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: + - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" + Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] \ No newline at end of file diff --git a/aws/templates/tgw-cross-az-cluster/README.md b/aws/templates/tgw-cross-az-cluster/README.md new file mode 100644 index 00000000..f1a6b492 --- /dev/null +++ b/aws/templates/tgw-cross-az-cluster/README.md @@ -0,0 +1,26 @@ + +## Transit Gateway Cross Availability Zone Cluster + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys two Security Gateways, each in a different Availability Zone, configured for Transit Gateway.

For more details, refer to Cross Availability Zone Cluster for AWS R81.20 Administration Guide. +
Creates a new VPC and deploys a Cross Availability Zone Cluster of Security Gateways configured for Transit Gateway into it.
Deploys a Cross Availability Zone Cluster of Security Gateways configured for Transit Gateway into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml new file mode 100644 index 00000000..076c1390 --- /dev/null +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml @@ -0,0 +1,523 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PrivateSubnet1CIDR + - PrivateSubnet2CIDR + - TgwSubnet1CIDR + - TgwSubnet2CIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + AvailabilityZones: + default: Availability zones + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public subnet 1 CIDR + PublicSubnet2CIDR: + default: Public subnet 2 CIDR + PrivateSubnet1CIDR: + default: Private subnet 1 CIDR + PrivateSubnet2CIDR: + default: Private subnet 2 CIDR + TgwSubnet1CIDR: + default: TGW HA subnet 1 CIDR + TgwSubnet2CIDR: + default: TGW HA subnet 2 CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved). + Type: List + MinLength: 2 + VPCCIDR: + Description: The CIDR block of the provided VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: The 1st external subnet of the cluster. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: The 2nd external subnet of the cluster. The cluster's public IPs will be generated from this subnet. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet1CIDR: + Description: The 1st internal subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet2CIDR: + Description: The 2nd internal subnet of the cluster. The cluster's private IPs will be generated from this subnet. + Type: String + Default: 10.0.21.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet1CIDR: + Description: The 1st TGW HA subnet of the TGW VPC attachment. + Type: String + Default: 10.0.12.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet2CIDR: + Description: The 2nd TGW HA subnet of the TGW VPC attachment. + Type: String + Default: 10.0.22.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Default: false + Type: String + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: 2 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PrivateSubnet1CIDR: !Ref PrivateSubnet1CIDR + PrivateSubnet2CIDR: !Ref PrivateSubnet2CIDR + CreateAttachmentSubnets: true + AttachmentSubnet1CIDR: !Ref TgwSubnet1CIDR + AttachmentSubnet2CIDR: !Ref TgwSubnet2CIDR + InternalRouteTable: + Type: AWS::EC2::RouteTable + DependsOn: VPCStack + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: Private Subnets Route Table + ClusterStack: + Type: AWS::CloudFormation::Stack + DependsOn: VPCStack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-cross-az-cluster.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + TgwHASubnetA: !GetAtt VPCStack.Outputs.AttachmentSubnet1ID + TgwHASubnetB: !GetAtt VPCStack.Outputs.AttachmentSubnet2ID + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml new file mode 100644 index 00000000..651a4554 --- /dev/null +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml @@ -0,0 +1,519 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - TgwHASubnetA + - TgwHASubnetB + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + TgwHASubnetA: + default: TGW HA subnet 1 + TgwHASubnetB: + default: TGW HA subnet 2 + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: you must select a VPC. + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway. + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway. + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway. + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway. + TgwHASubnetA: + Description: Select a TGW HA subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a TGW HA subnet for the first Security Gateway. + TgwHASubnetB: + Description: Select a TGW HA subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a TGW HAsubnet for the second Security Gateway. + InternalRouteTable: + Description: Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Cluster, this requires manual configuration in the Route Table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Description: The license to install on the Security Gateways. + Type: String + Default: R81.20-BYOL + AllowedValues: + - R81.20-BYOL + - R81.20-PAYG-NGTP + - R81.20-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + ClusterStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml + Parameters: + VPC: !Ref VPC + PublicSubnetA: !Ref PublicSubnetA + PublicSubnetB: !Ref PublicSubnetB + PrivateSubnetA: !Ref PrivateSubnetA + PrivateSubnetB: !Ref PrivateSubnetB + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary + TGWRouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Subnets + TGWDefaultRoute: + Type: AWS::EC2::Route + DependsOn: ClusterStack + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !GetAtt ClusterStack.Outputs.MemberAExternalInterface + RouteTableId: !Ref TGWRouteTable + TGWNSubnet1RouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + DependsOn: TGWRouteTable + Properties: + RouteTableId: !Ref TGWRouteTable + SubnetId: !Ref TgwHASubnetA + TGWSubnet2RouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + DependsOn: TGWRouteTable + Properties: + RouteTableId: !Ref TGWRouteTable + SubnetId: !Ref TgwHASubnetB +Outputs: + ClusterPublicAddress: + Description: The public address of the cluster. + Value: !GetAtt ClusterStack.Outputs.ClusterPublicAddress + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/tgw-ha/README.md b/aws/templates/tgw-ha/README.md new file mode 100644 index 00000000..f069cdd5 --- /dev/null +++ b/aws/templates/tgw-ha/README.md @@ -0,0 +1,26 @@ + +## Transit Gateway Cross Availability Zone Cluster + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys two Security Gateways, each in a different Availability Zone, configured for Transit Gateway.

For more details, refer to CloudGuard Transit Gateway High Availability for AWS R80.40 Administration Guide. +
Creates a new VPC and deploys a Cross Availability Zone Cluster of Security Gateways configured for Transit Gateway into it.
Deploys a Cross Availability Zone Cluster of Security Gateways configured for Transit Gateway into an existing VPC.
+
+
\ No newline at end of file diff --git a/aws/templates/tgw-ha/tgw-ha-master.yaml b/aws/templates/tgw-ha/tgw-ha-master.yaml new file mode 100644 index 00000000..7eb8db40 --- /dev/null +++ b/aws/templates/tgw-ha/tgw-ha-master.yaml @@ -0,0 +1,525 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - AvailabilityZones + - VPCCIDR + - PublicSubnet1CIDR + - PublicSubnet2CIDR + - PrivateSubnet1CIDR + - PrivateSubnet2CIDR + - TgwSubnet1CIDR + - TgwSubnet2CIDR + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + AvailabilityZones: + default: Availability Zones + VPCCIDR: + default: VPC CIDR + PublicSubnet1CIDR: + default: Public subnet 1 CIDR + PublicSubnet2CIDR: + default: Public subnet 2 CIDR + PrivateSubnet1CIDR: + default: Private subnet 1 CIDR + PrivateSubnet2CIDR: + default: Private subnet 2 CIDR + TgwSubnet1CIDR: + default: TGW HA subnet 1 CIDR + TgwSubnet2CIDR: + default: TGW HA subnet 2 CIDR + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved). + Type: List + MinLength: 2 + VPCCIDR: + Description: The CIDR block of the provided VPC. + Type: String + Default: 10.0.0.0/16 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet1CIDR: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PublicSubnet2CIDR: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.20.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet1CIDR: + Description: CIDR block for private subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + PrivateSubnet2CIDR: + Description: CIDR block for private subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.21.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet1CIDR: + Description: CIDR block for TGW HA subnet 1 located in the 1st Availability Zone. + Type: String + Default: 10.0.12.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + TgwSubnet2CIDR: + Description: CIDR block for TGW HA subnet 2 located in the 2nd Availability Zone. + Type: String + Default: 10.0.22.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Description: The instance type of the Secutiry Gateway. + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the instance. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + AllocatePublicAddress: + Description: Allocate an Elastic IP for each cluster member, in addition to the shared cluster Elastic IP. + Type: String + Default: true + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Default: false + Type: String + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Type: String + Default: R81.10-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" + to get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections + between Check Point components. Choose a random string consisting of at least + 8 alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + AvailabilityZones: !Join [',', !Ref AvailabilityZones] + NumberOfAZs: 2 + VPCCIDR: !Ref VPCCIDR + PublicSubnet1CIDR: !Ref PublicSubnet1CIDR + PublicSubnet2CIDR: !Ref PublicSubnet2CIDR + PrivateSubnet1CIDR: !Ref PrivateSubnet1CIDR + PrivateSubnet2CIDR: !Ref PrivateSubnet2CIDR + CreateAttachmentSubnets: true + AttachmentSubnet1CIDR: !Ref TgwSubnet1CIDR + AttachmentSubnet2CIDR: !Ref TgwSubnet2CIDR + InternalRouteTable: + Type: AWS::EC2::RouteTable + DependsOn: VPCStack + Properties: + VpcId: !GetAtt VPCStack.Outputs.VPCID + Tags: + - Key: Name + Value: Private Subnets Route Table + ClusterStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-ha.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + TgwHASubnetA: !GetAtt VPCStack.Outputs.AttachmentSubnet1ID + TgwHASubnetB: !GetAtt VPCStack.Outputs.AttachmentSubnet2ID + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary +Outputs: + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/aws/templates/tgw-ha/tgw-ha.yaml b/aws/templates/tgw-ha/tgw-ha.yaml new file mode 100644 index 00000000..e02d8e5e --- /dev/null +++ b/aws/templates/tgw-ha/tgw-ha.yaml @@ -0,0 +1,522 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Deploys a Check Point TGW HA Cluster into an existing VPC (20240204) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: VPC Network Configuration + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - TgwHASubnetA + - TgwHASubnetB + - InternalRouteTable + - Label: + default: EC2 Instance Configuration + Parameters: + - GatewayName + - GatewayInstanceType + - KeyName + - AllocatePublicAddress + - VolumeSize + - VolumeType + - VolumeEncryption + - EnableInstanceConnect + - GatewayPredefinedRole + - TerminationProtection + - Label: + default: Check Point Settings + Parameters: + - GatewayVersion + - Shell + - GatewayPasswordHash + - GatewayMaintenancePasswordHash + - GatewaySICKey + - Label: + default: Quick connect to Smart-1 Cloud (Recommended) + Parameters: + - MemberAToken + - MemberBToken + - Label: + default: Advanced Settings + Parameters: + - ResourcesTagName + - GatewayHostname + - AllowUploadDownload + - CloudWatch + - GatewayBootstrapScript + - NTPPrimary + - NTPSecondary + ParameterLabels: + VPC: + default: VPC + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + TgwHASubnetA: + default: TGW HA subnet 1 + TgwHASubnetB: + default: TGW HA subnet 2 + InternalRouteTable: + default: Internal route table + GatewayName: + default: Gateway Name + GatewayInstanceType: + default: Security Gateways instance type + KeyName: + default: Key name + AllocatePublicAddress: + default: Allocate Elastic IPs for cluster members + VolumeSize: + default: Root volume size (GB) + VolumeType: + default: Volume Type + VolumeEncryption: + default: Volume encryption KMS key identifier + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewayPredefinedRole: + default: Existing IAM role name + TerminationProtection: + default: Termination Protection + GatewayVersion: + default: Gateways version & license + Shell: + default: Admin shell + GatewayPasswordHash: + default: Password hash + GatewayMaintenancePasswordHash: + default: Gateway Maintenance Password hash + GatewaySICKey: + default: SIC key + MemberAToken: + default: Smart-1 Cloud Token for member A + MemberBToken: + default: Smart-1 Cloud Token for member B + ResourcesTagName: + default: Resources prefix tag + GatewayHostname: + default: Gateway Hostname + AllowUploadDownload: + default: Allow upload & download + CloudWatch: + default: CloudWatch metrics + GatewayBootstrapScript: + default: Bootstrap Script + NTPPrimary: + default: Primary NTP server + NTPSecondary: + default: Secondary NTP server +Parameters: + VPC: + Description: Select an existing VPC. + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: you must select a VPC. + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway. + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway. + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway. + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway. + TgwHASubnetA: + Description: Select a TGW HA subnet for the first Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a TGW HA subnet for the first Security Gateway. + TgwHASubnetB: + Description: Select a TGW HA subnet for the second Security Gateway. + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a TGW HAsubnet for the second Security Gateway. + InternalRouteTable: + Description: Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Cluster, this requires manual configuration in the Route Table. (optional) + Type: String + Default: '' + GatewayName: + Description: The name tag of the Security Gateway instances. (optional) + Type: String + Default: Check-Point-Cluster + GatewayInstanceType: + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + - c5d.large + - c5d.xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m6i.large + - m6i.xlarge + - m6i.2xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.32xlarge + - c6i.large + - c6i.xlarge + - c6i.2xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.32xlarge + - c6in.large + - c6in.xlarge + - c6in.2xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.32xlarge + - r5.large + - r5.xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5a.large + - r5a.xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5b.large + - r5b.xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5n.large + - r5n.xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r6i.large + - r6i.xlarge + - r6i.2xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.32xlarge + - m6a.large + - m6a.xlarge + - m6a.2xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.32xlarge + - m6a.48xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways. + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: must be the name of an existing EC2 KeyPair. + AllocatePublicAddress: + Description: When choosing "false", make sure the cluster members can connect to an ec2 endpoint. + Default: true + Type: String + AllowedValues: + - true + - false + VolumeSize: + Type: Number + Default: 100 + MinValue: 100 + VolumeType: + Description: General Purpose SSD Volume Type + Type: String + Default: gp3 + AllowedValues: + - gp3 + - gp2 + VolumeEncryption: + Description: KMS or CMK key Identifier - Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). + Type: String + Default: alias/aws/ebs + EnableInstanceConnect: + Description: Enable SSH connection over AWS web console. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayPredefinedRole: + Description: A predefined IAM role to attach to the cluster profile. (optional) + Type: String + Default: '' + TerminationProtection: + Description: Prevents an instance from accidental termination. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayVersion: + Description: The license to install on the Security Gateways. + Type: String + Default: R81.10-BYOL + AllowedValues: + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + - R81-BYOL + - R81-PAYG-NGTP + - R81-PAYG-NGTX + - R81.10-BYOL + - R81.10-PAYG-NGTP + - R81.10-PAYG-NGTX + Shell: + Description: Change the admin shell to enable advanced command line configuration. + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + GatewayPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to + get the PASSWORD's hash). (optional) + Type: String + Default: '' + AllowedPattern: '^[\$\./a-zA-Z0-9]*$' + NoEcho: true + GatewayMaintenancePasswordHash: + Description: Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaySICKey: + Description: The Secure Internal Communication key creates trusted connections between + Check Point components. Choose a random string consisting of at least 8 + alphanumeric characters. + Type: String + AllowedPattern: '^[a-zA-Z0-9]{8,}$' + ConstraintDescription: At least 8 alpha numeric characters. + NoEcho: true + MemberAToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + MemberBToken: + Description: Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. + AllowedPattern: '(^aHR0cHM6Ly9(.+)|(.*)\s[aHR0cHM6Ly9](.+)|^$)' + Type: String + NoEcho: true + ResourcesTagName: + Description: Name tag prefix of the resources. (optional) + Type: String + Default: '' + GatewayHostname: + Description: The host name will be appended with member-a/b accordingly (optional). The name must not contain reserved words. For details, refer to sk40179. + Type: String + Default: '' + AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z]))?$' + ConstraintDescription: A valid hostname label or an empty string. + AllowUploadDownload: + Description: >- + Automatically download updates and share statistical data for product improvement purpose. + Type: String + Default: true + AllowedValues: + - true + - false + CloudWatch: + Description: Report Check Point specific CloudWatch metrics. + Type: String + Default: false + AllowedValues: + - true + - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true + NTPPrimary: + Description: (optional) + Type: String + Default: 169.254.169.123 + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' + NTPSecondary: + Description: (optional) + Type: String + Default: 0.pool.ntp.org + AllowedPattern: '^[\.a-zA-Z0-9\-]*$' +Conditions: + AllocateAddress: !Equals [!Ref AllocatePublicAddress, true] +Resources: + ClusterStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml + Parameters: + VPC: !Ref VPC + PublicSubnetA: !Ref PublicSubnetA + PublicSubnetB: !Ref PublicSubnetB + PrivateSubnetA: !Ref PrivateSubnetA + PrivateSubnetB: !Ref PrivateSubnetB + InternalRouteTable: !Ref InternalRouteTable + GatewayName: !Ref GatewayName + GatewayInstanceType: !Ref GatewayInstanceType + KeyName: !Ref KeyName + AllocatePublicAddress: !Ref AllocatePublicAddress + VolumeSize: !Ref VolumeSize + VolumeType: !Ref VolumeType + VolumeEncryption: !Ref VolumeEncryption + EnableInstanceConnect: !Ref EnableInstanceConnect + GatewayPredefinedRole: !Ref GatewayPredefinedRole + TerminationProtection: !Ref TerminationProtection + GatewayVersion: !Ref GatewayVersion + Shell: !Ref Shell + GatewayPasswordHash: !Ref GatewayPasswordHash + GatewayMaintenancePasswordHash: !Ref GatewayMaintenancePasswordHash + GatewaySICKey: !Ref GatewaySICKey + MemberAToken: !Ref MemberAToken + MemberBToken: !Ref MemberBToken + ResourcesTagName: !Ref ResourcesTagName + GatewayHostname: !Ref GatewayHostname + AllowUploadDownload: !Ref AllowUploadDownload + CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript + NTPPrimary: !Ref NTPPrimary + NTPSecondary: !Ref NTPSecondary + TGWRouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: TGW Subnets + TGWDefaultRoute: + Type: AWS::EC2::Route + DependsOn: ClusterStack + Properties: + DestinationCidrBlock: 0.0.0.0/0 + NetworkInterfaceId: !GetAtt ClusterStack.Outputs.MemberAExternalInterface + RouteTableId: !Ref TGWRouteTable + TGWNSubnet1RouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + DependsOn: TGWRouteTable + Properties: + RouteTableId: !Ref TGWRouteTable + SubnetId: !Ref TgwHASubnetA + TGWSubnet2RouteAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + DependsOn: TGWRouteTable + Properties: + RouteTableId: !Ref TGWRouteTable + SubnetId: !Ref TgwHASubnetB +Outputs: + MemberAPublicAddress: + Condition: AllocateAddress + Description: The public address of member A. + Value: !GetAtt ClusterStack.Outputs.MemberAPublicAddress + MemberASSH: + Condition: AllocateAddress + Description: SSH command to member A. + Value: !GetAtt ClusterStack.Outputs.MemberASSH + MemberAURL: + Condition: AllocateAddress + Description: URL to the member A portal. + Value: !GetAtt ClusterStack.Outputs.MemberAURL + MemberBPublicAddress: + Condition: AllocateAddress + Description: The public address of member B. + Value: !GetAtt ClusterStack.Outputs.MemberBPublicAddress + MemberBSSH: + Condition: AllocateAddress + Description: SSH command to member B. + Value: !GetAtt ClusterStack.Outputs.MemberBSSH + MemberBURL: + Condition: AllocateAddress + Description: URL to the member B portal. + Value: !GetAtt ClusterStack.Outputs.MemberBURL +Rules: + MemberATokenNotProvided: + RuleCondition: !Equals [!Ref MemberAToken, ''] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + Assert: !Equals [!Ref MemberBToken, ''] + MemberBTokenNotProvided: + RuleCondition: !Equals [ !Ref MemberBToken, '' ] + Assertions: + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + Assert: !Equals [ !Ref MemberAToken, '' ] + MembersTokenValueEquals: + RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] + Assertions: + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberAToken, '' ] + - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + Assert: !Equals [ !Ref MemberBToken, '' ] \ No newline at end of file diff --git a/azure/misc/azure_ha_test.py b/azure/misc/azure_ha_test.py new file mode 100755 index 00000000..48fcac18 --- /dev/null +++ b/azure/misc/azure_ha_test.py @@ -0,0 +1,424 @@ +#!/usr/bin/env python3 +import contextlib +import json +import os +import re +import socket +import subprocess +import sys +import traceback +import collections +import urllib.parse as _urllib + + +try: + import rest +except ModuleNotFoundError: + import pytest + pytestmark = pytest.mark.skipif(True, reason="Needs refactoring - WIP") + import cloud_connectors.azure as rest + +ARM_VERSIONS = { + 'stack': collections.OrderedDict([ + ('resources', '?api-version=2017-10-01'), + ]), + 'ha': collections.OrderedDict([ + ('resources', '?api-version=2019-07-01'), + ])} + +os.environ['AZURE_NO_DOT'] = 'true' + +azure = None +templateName = None + +conf = {} + + +def set_arm_versions(): + """#TODO fixDocstring""" + global ARM_VERSIONS + log('Setting api versions for "%s" solution\n' % templateName) + if templateName == 'stack-ha': + ARM_VERSIONS = ARM_VERSIONS['stack'] + log('Stack ARM versions are: %s\n' % json.dumps(ARM_VERSIONS, + indent=2)) + return + ARM_VERSIONS = ARM_VERSIONS['ha'] + log('ARM versions are: %s\n' % json.dumps(ARM_VERSIONS, indent=2)) + + +def is_azure(): + """#TODO fixDocstring""" + return os.path.isfile('/etc/in-azure') + + +def log(msg): + """#TODO fixDocstring""" + sys.stderr.write(msg) + + +def test_rw(rid, allow_not_found=False, test_write=True): + """#TODO fixDocstring""" + components = rid.split('/') + log('Id : %s\n' % rid) + log('Subscription : %s\n' % components[2]) + log('Resource group: %s\n' % components[4]) + log('Type : %s/%s\n' % (components[6], components[7])) + log('Name : %s\n' % components[8]) + try: + obj = azure.arm('GET', rid + ARM_VERSIONS['resources'])[1] + except rest.RequestException as e: + if allow_not_found and e.code == 404: + return None + log('Attempting to read - [%s]\n' % e.reason) + raise + log('Attempting to read - [OK]\n') + if test_write: + log('Attempting to write ') + try: + azure.arm('PUT', rid + ARM_VERSIONS['resources'], json.dumps(obj)) + except rest.RequestException as e: + log('- [%s]\n' % e.reason) + raise + log('- [OK]\n') + return obj + + +def get_vm_primary_nic(vm): + """#TODO fixDocstring""" + nis = vm['properties']['networkProfile']['networkInterfaces'] + if len(nis) == 1: + ni = nis[0] + else: + for ni in nis: + if ni['properties'].get('primary'): + break + return azure.arm('GET', ni['id'])[1] + + +def test_cluster_ip(): + """#TODO fixDocstring""" + def test_vip(vip_resource): + if '/' in vip_resource: + cluster_ip_id = vip_resource + else: + cluster_ip_id = conf['baseId'] + \ + 'Microsoft.Network/publicIPAddresses/' + vip_resource + test_rw(cluster_ip_id, allow_not_found=True, test_write=False) + + for interface in conf['clusterNetworkInterfaces']: + if isinstance(conf['clusterNetworkInterfaces'][interface][0], dict): + for vip in conf['clusterNetworkInterfaces'][interface]: + test_vip(vip["pub"]) + else: + if len(conf['clusterNetworkInterfaces'][interface]) > 1: + test_vip(conf['clusterNetworkInterfaces'][interface][1]) + + +def test_load_balancer(): + """#TODO fixDocstring""" + load_balancer_nm = conf.get('lbName', '') + if not load_balancer_nm: + log('An external load balancer name is not configured.\n') + return None + + load_balancer_id = (conf['baseId'] + + 'Microsoft.Network/loadBalancers/' + + load_balancer_nm) + test_rw(load_balancer_id, allow_not_found=True) + + +def vnet_rg(): + """#TODO fixDocstring""" + local_vm = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + + conf['hostname'])[1] + my_nic = get_vm_primary_nic(local_vm) + subnet_id = my_nic['properties']['ipConfigurations'][0][ + 'properties']['subnet']['id'] + return '/'.join(subnet_id.split('/')[:5]) + + +def get_route_table_ids_for_vnet(vnet): + """#TODO fixDocstring""" + route_table_ids = set() + for subnet in vnet['properties'].get('subnets', []): + if subnet['properties'].get('routeTable'): + route_table_ids.add(subnet['properties']['routeTable']['id']) + return route_table_ids + + +def get_vnet_id(): + """#TODO fixDocstring""" + vnet_id = conf.get('vnetId') + if vnet_id: + return vnet_id + me = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + conf['hostname'])[1] + my_nic = get_vm_primary_nic(me) + subnet_id = my_nic['properties']['ipConfigurations'][0][ + 'properties']['subnet']['id'] + vnet_id = '/'.join(subnet_id.split('/')[:-2]) + conf['vnetId'] = vnet_id + return vnet_id + + +def get_route_table_ids_for_peering(vnet): + """#TODO fixDocstring""" + route_table_ids = set() + + for peering in vnet['properties'].get('virtualNetworkPeerings', []): + vnet_id = peering['properties']['remoteVirtualNetwork']['id'] + state = peering['properties']['peeringState'] + if state != 'Connected': + log('peered vnet %s in state %s ignored' % (vnet_id, state)) + continue + try: + vnet = azure.arm('GET', vnet_id)[1] + except Exception: + log('\nFailed to retrieve peered network %s' % vnet_id) + log('\n%s' % traceback.format_exc()) + continue + route_table_ids |= get_route_table_ids_for_vnet(vnet) + + return route_table_ids + + +def get_route_table_ids(): + """#TODO fixDocstring""" + route_table_ids = set() + + vnet_id = get_vnet_id() + vnet = azure.arm('GET', vnet_id)[1] + + route_table_ids |= get_route_table_ids_for_vnet(vnet) + route_table_ids |= get_route_table_ids_for_peering(vnet) + + return route_table_ids + + +def interfaces_test_rw(interface_id): + """#TODO fixDocstring""" + interface = test_rw(interface_id['id']) + if not interface['properties'].get('enableIPForwarding'): + raise Exception( + 'IP forwarding is not enabled on Interface %s' % + interface['name']) + + +def test_cluster_parameters(): + """#TODO fixDocstring""" + path = "/var/opt/fw.boot/modules/fwkern.conf" + text1 = "fwha_dead_timeout_multiplier=20" + text2 = "fwha_if_problem_tolerance=200" + flags = dict.fromkeys(["fwkern_timeout_multiplier", + "fwkern_problem_tolerance", + "output_timeout_multiplier", + "output_problem_tolerance"], + False) + error = 'ClusterXL kernel parameters are not optimized for ' \ + 'Azure. See sk122218 for more information.' + + with open(path) as f: + for line in f: + if text1 in line: + flags['fwkern_timeout_multiplier'] = True + if text2 in line: + flags['fwkern_problem_tolerance'] = True + + command = ['fw', 'ctl', 'get', 'int', 'fwha_dead_timeout_multiplier'] + proc = subprocess.Popen( + command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + if out.decode('utf-8').strip() == 'fwha_dead_timeout_multiplier = 20': + flags['output_timeout_multiplier'] = True + + command = ['fw', 'ctl', 'get', 'int', 'fwha_if_problem_tolerance'] + proc = subprocess.Popen( + command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + + if out.decode('utf-8').strip() == 'fwha_if_problem_tolerance = 200': + flags['output_problem_tolerance'] = True + + if not all(value is True for value in list(flags.values())): + raise Exception(error) + + +def test(): + """#TODO fixDocstring""" + global conf + + if not is_azure(): + raise Exception('This does not look like an Azure environment\n') + + command = [os.environ['FWDIR'] + '/bin/azure-ha-conf', '--dump'] + proc = subprocess.Popen( + command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + rc = proc.wait() + if rc: + log('\nfailed to run %s: %s\n%s' % (command, rc, err)) + raise Exception('Failed to load configuration file\n') + conf = json.loads(out) + + for k in ['clusterName', 'resourceGroup', 'subscriptionId']: + if not conf.get(k): + raise Exception( + 'The attribute %s is missing in the configuration' % k) + + proxy = conf.get('proxy', '') + os.environ['https_proxy'] = proxy + os.environ['http_proxy'] = proxy + + credentials = conf.get('credentials') + if credentials: + pass + elif conf.get('password') and conf.get('userName'): + credentials = { + 'username': conf['userName'], + 'password': conf['password']} + else: + raise Exception('Missing credentials') + + environment = conf.get('environment') + + global azure, templateName + azure = rest.Azure(credentials=credentials, + subscription=conf['subscriptionId'], + max_time=20, + environment=environment) + + templateName = conf.get('templateName', '').lower() + set_arm_versions() + + conf['hostname'] = conf.get('hostname', socket.gethostname()) + cluster_name = conf['clusterName'].lower() + if conf['hostname'] not in {cluster_name + '1', cluster_name + '2'}: + raise Exception('The hostname %s should be either \'%s\' or \'%s\'' % ( + conf['hostname'], cluster_name + '1', cluster_name + '2')) + + if 'peername' not in conf: + if conf['hostname'].endswith('1'): + conf['peername'] = conf['hostname'][:-1] + '2' + else: + conf['peername'] = conf['hostname'][:-1] + '1' + + conf['rg_id'] = ('/subscriptions/' + conf['subscriptionId'] + + '/resourcegroups/' + conf['resourceGroup']) + + conf['baseId'] = conf['rg_id'] + '/providers/' + + log('Testing if DNS is configured...\n') + try: + dns = subprocess.check_output( + ['/bin/clish', '-c', 'show dns primary']).decode('utf-8').strip() + except Exception: + traceback.print_exc() + raise + match = re.search(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', dns) + if not match: + raise Exception('Primary DNS server is not configured\n') + log(' - Primary DNS server is: %s\n' % match.group(1)) + + log('Testing if DNS is working...\n') + if proxy: + host = _urllib.urlparse(proxy).hostname + if host is None: + raise Exception('Failed to get hostname from proxy: %s\n' % proxy) + + port = _urllib.urlparse(proxy).port + if not port: + if _urllib.urlparse(proxy).scheme == 'https': + port = 443 + else: + port = 80 + else: + host = azure.environment.login + port = 443 + try: + socket.gethostbyname(host) + log(' - DNS resolving test was successful\n') + except Exception: + raise Exception('Failed to resolve %s\n' % host) + + log('Testing connectivity to %s:%d...\n' % (host, port)) + with contextlib.closing( + socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: + s.settimeout(3) + if s.connect_ex((host, port)): + raise Exception('Unable to connect to %s:%d\n' % (host, port)) + + log('Testing ClusterXL parameters...\n') + test_cluster_parameters() + + log('Testing cluster interface configuration...\n') + try: + cphaconf = json.loads( + subprocess.check_output(['cphaconf', 'aws_mode'])) + except Exception: + raise Exception('''You do not seem to have a valid cluster +configuration +''') + + log('Testing credentials...\n') + with azure.get_token() as token: + token # Do nothing and keep pyflakes happy + + if 'username' in credentials: + log('Testing whether the user credentials can expire...\n') + password_policies = azure.graph('GET', '/me')[1]['passwordPolicies'] + if 'DisablePasswordExpiration' not in password_policies: + raise Exception('The credentials might expire') + + log('Getting information about the environment...\n') + for vmname in [conf['hostname'], conf['peername']]: + log('Getting information about the VM %s...\n' % vmname) + vm = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + vmname)[1] + if templateName != 'stack-ha': + for interface_id in \ + vm['properties']['networkProfile']['networkInterfaces']: + if templateName == 'ha': + rid = interface_id['id'] + interface_name = rid.split('/')[8] + if interface_name.find('eth0') != -1: + interfaces_test_rw(interface_id) + else: + interfaces_test_rw(interface_id) + + if templateName not in ['ha', 'ha_terraform']: + log('Testing authorization on routing tables...\n') + for route_table in get_route_table_ids(): + test_rw(route_table) + if templateName != 'stack-ha': + log('Testing Azure load balancer...\n') + test_load_balancer() + + if templateName != 'stack-ha': + log('Testing cluster public IP address...\n') + test_cluster_ip() + + log('Verifying Azure interface configuration...\n') + for interface in cphaconf['ifs']: + log('- Interface %s: local IP address = %s, peer IP address = %s\n' % ( + interface['name'], interface['ipaddr'], + interface['other_member_if_ip'])) + + log('\nAll tests were successful!\n') + + +def main(): + """#TODO fixDocstring""" + try: + test() + except Exception: + log('Error:\n' + str(sys.exc_info()[1]) + '\n') + sys.exit(1) + + +if __name__ == '__main__': + main() diff --git a/azure/misc/nva_bgp_config.conf b/azure/misc/nva_bgp_config.conf new file mode 100644 index 00000000..8338a780 --- /dev/null +++ b/azure/misc/nva_bgp_config.conf @@ -0,0 +1,38 @@ +set as +set routemap ex_azure id 110 on +set routemap ex_azure id 110 restrict +set routemap ex_azure id 110 match neighbor on +set routemap ex_azure id 110 match protocol bgp +set routemap ex_azure id 120 on +set routemap ex_azure id 120 allow +set routemap ex_azure id 120 action nexthop ip +set routemap im_azure id 100 on +set routemap im_azure id 100 allow +set bgp external remote-as on +set bgp external remote-as export-routemap "ex_azure" preference 10 on +set bgp external remote-as import-routemap "im_azure" preference 10 on +set bgp external remote-as peer on +set bgp external remote-as peer multihop on +set bgp external remote-as peer graceful-restart on + +# For example +# set as 64512 +# set routemap ex_azure id 110 on +# set routemap ex_azure id 110 restrict +# set routemap ex_azure id 110 match neighbor 10.1.32.4 on +# set routemap ex_azure id 110 match neighbor 10.1.32.5 on +# set routemap ex_azure id 110 match protocol bgp +# set routemap ex_azure id 120 on +# set routemap ex_azure id 120 allow +# set routemap ex_azure id 120 action nexthop ip 10.1.112.7 +# set routemap im_azure id 100 on +# set routemap im_azure id 100 allow +# set bgp external remote-as 65515 on +# set bgp external remote-as 65515 export-routemap "ex_azure" preference 10 on +# set bgp external remote-as 65515 import-routemap "im_azure" preference 10 on +# set bgp external remote-as 65515 peer 10.1.32.4 on +# set bgp external remote-as 65515 peer 10.1.32.4 multihop on +# set bgp external remote-as 65515 peer 10.1.32.4 graceful-restart on +# set bgp external remote-as 65515 peer 10.1.32.5 on +# set bgp external remote-as 65515 peer 10.1.32.5 multihop on +# set bgp external remote-as 65515 peer 10.1.32.5 graceful-restart on \ No newline at end of file diff --git a/azure/templates/README.MD b/azure/templates/README.MD new file mode 100644 index 00000000..e5ef10fb --- /dev/null +++ b/azure/templates/README.MD @@ -0,0 +1,69 @@ +# Azure Resource Manager templates +This directory contains the CloudGuard IaaS solution templates published in the [Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/checkpoint.vsec?tab=Overview). + +# How to deploy templates manually +To deploy the ARM templates manually without using the Azure Marketplace, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file of the desired template and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/ + ``` +7. Click *Purchase* to deploy the solution + +# How to deploy a specific version of Azure image +
+Please note that we recommend using the latest image. + +To deploy a specific Azure image, adjust the image version during the manual deployment of ARM templates and follow these instructions: + +1. Determine the desired image version - + - Visit [sk132192 - CloudGuard Network Security for Azure - Latest Updates](https://support.checkpoint.com/results/sk/sk132192#:~:text=CloudGuard%20for%20Azure%20Gateway%20Images%20history) > + Images History sections. + - Find the version of the desired image and change it as follows: + + **Examples:** + + The version on the SK - **R81.10-335.1498** + Converted for the Azure template - **8110.900335.1498** + + The version on the SK - **R81-335.883** + Converted for the Azure template - **8100.900335.0883** + +2. In the "mainTemplate.json" file, change the value of the **“version”** parameter from “latest” to the version you want to deploy. This must be done under the version type of image you want to deploy (sg-byol, sg-ngtp, etc.) + + **Example** for SG-BYOL (Bring your own license): + **Change from:** + + "imageReferenceBYOL":{ + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "**latest**" }, + + **to:** + "imageReferenceBYOL":{ + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "**8110.900335.1498**" }, + + +3. To confirm the version, run the command on the deployed machine: + **'more /etc/cloud-version'** + + **Output for - R81.20-631.1475:** + release: R81.20 + take: 631 + build: 991001475 + platform: azure + license: byol + deployment_method: ftw + template_name: management + template_version: 20231002 + template_type: marketplace +
diff --git a/azure/templates/marketplace-gateway-load-balancer/README.md b/azure/templates/marketplace-gateway-load-balancer/README.md new file mode 100644 index 00000000..a970e1a3 --- /dev/null +++ b/azure/templates/marketplace-gateway-load-balancer/README.md @@ -0,0 +1,22 @@ +# Check Point CloudGuard Network Security Gateway Load Balancer for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-gateway-load-balancer%2FmainTemplate.json) + + + diff --git a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json new file mode 100644 index 00000000..54fd25cc --- /dev/null +++ b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json @@ -0,0 +1,1516 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the CloudGuard Network for Azure VMSS Gateway Load Balancer R81.10 and Higher Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_Azure_VMSS_GWLB/Default.htm" + } + } + }, + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "Check Point VMSS settings", + "subLabel": { + "preValidation": "Configure CloudGuard VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard VMSS settings", + "elements": [ + { + "name": "upgrading", + "type": "Microsoft.Common.OptionsGroup", + "label": "Are you upgrading your CloudGuard VMSS solution?", + "defaultValue": "No", + "toolTip": "Select 'Yes' if you are upgrading your CloudGuard VMSS solution.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "upgradeVmssInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Warning", + "text": "All the configurations below must be similar to the existing CloudGuard VMSS solution.\n\nNote that the target load balancers are the ones connected to your existing CloudGuard VMSS solution.\n\nSee the Deployment Guide for more information." + } + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maximum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "configurationTemplateInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Use a different configuration template name than in your existing CloudGuard VMSS solution." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Configuration template name", + "toolTip": "The configuration template name as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "Gateway Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the Gateway Load Balancer.", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the VMSS with instance level Public IP address", + "defaultValue": "No", + "toolTip": "If selected 'Yes', then each VMSS instance will have its own public IP address.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "lbsTargetRGName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target load balancers resource group name", + "defaultValue": "", + "toolTip": "The name of the Target Load Balancers Resource Group.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Group only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "lbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target gateway load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target Gateway Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "lbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target gateway load balancer." + } + }, + { + "name": "lbTargetBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Gateway load balancer's new backend pool name", + "toolTip": "The name of the new Target Gateway Load Balancer's Backend Pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "mgmtInterfaceOpt1", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Frontend NIC's public IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC and with public or private IP.", + "constraints": { + "allowedValues": [ + { + "label": "Frontend NIC's public IP address", + "value": "eth0-public" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtIPaddress", + "type": "Microsoft.Common.TextBox", + "label": "Management Server IP address", + "toolTip": "The IP address used to manage the VMSS instances.", + "visible": "[equals(steps('autoprovision').mgmtInterfaceOpt1, 'eth0-private')]", + "constraints": { + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "required": true, + "validationMessage": "Please enter a valid IP address" + } + }, + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "None", + "toolTip": "The number of avalability zones to use for the scale set. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "None", + "value": 0 + }, + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + } + ] + }, + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + }, + "visible": "[not(contains('R81.10 R81.20', steps('chkp').cloudGuardVersion))]" + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS Frontend subnet", + "defaultValue": { + "name": "VMSS-Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + }, + "visible": true + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayScaleSetNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Compute/virtualMachineScaleSets", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/loadBalancers" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "upgrading": "[steps('autoprovision').upgrading]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "managementServer": "[steps('autoprovision').managementServer]", + "configurationTemplate": "[steps('autoprovision').configurationTemplate]", + "adminEmail": "[steps('autoprovision').adminEmail]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "lbsTargetRGName": "[steps('autoprovision').lbsTargetRGName]", + "lbResourceId": "[steps('autoprovision').lbResourceId]", + "lbTargetBEAddressPoolName": "[steps('autoprovision').lbTargetBEAddressPoolName]", + "mgmtInterfaceOpt1": "[steps('autoprovision').mgmtInterfaceOpt1]", + "mgmtIPaddress": "[steps('autoprovision').mgmtIPaddress]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "customMetrics": "[steps('autoprovision').customMetrics]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json new file mode 100644 index 00000000..f9db5e37 --- /dev/null +++ b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json @@ -0,0 +1,1169 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user is upgrading the CloudGuard VMSS solution" + } + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Gateway Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "lbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Gateway Load Balancer." + }, + "defaultValue": "" + }, + "lbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Gateway Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.0.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the subnet" + }, + "defaultValue": "10.0.0.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private" + ], + "defaultValue": "eth0-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external NIC's public or private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB), not relevant for R81.20 and below" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Gateway Load Balancer distribution method" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "vxlanTunnelExternalIdentifier": { + "type": "int", + "minValue": 800, + "maxValue": 1000, + "defaultValue": 801, + "metadata": { + "description": "VXLAN tunnel external identifier. A value between 800-1000." + } + }, + "vxlanTunnelExternalPort": { + "type": "int", + "defaultValue": 2001, + "metadata": { + "description": "VXLAN tunnel external port number." + } + }, + "vxlanTunnelInternalIdentifier": { + "type": "int", + "minValue": 800, + "maxValue": 1000, + "defaultValue": 800, + "metadata": { + "description": "VXLAN tunnel internal identifier. A value between 800-1000." + } + }, + "vxlanTunnelInternalPort": { + "type": "int", + "defaultValue": 2000, + "metadata": { + "description": "VXLAN Tunnel Internal port number." + } + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "templateName": "gwlb", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "subnet1Name": "[parameters('subnet1Name')]", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "additionalDiskSizeGB": "[if(contains('R8110 R8120', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", + "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "gwlb", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/gateway-load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "lbsTargetRGName": "[parameters('lbsTargetRGName')]", + "lbRGName": "[if(variables('upgrading'), variables('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "vnetRGName": "[if(equals(parameters('vnetNewOrExisting'), 'new'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "vnetName": "[if(equals(parameters('vnetNewOrExisting'), 'new'), parameters('virtualNetworkName'), parameters('virtualNetworkName'))]", + "vnetID": "[if(equals(parameters('vnetNewOrExisting'), 'new'), resourceId(variables('vnetRGName'),'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(variables('vnetRGName'),'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), 'eth0-private')]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtIPaddress": "[parameters('mgmtIPaddress')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "eth0", + "x-chkp-topology": "eth0:external", + "x-chkp-anti-spoofing": "eth0:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "NewNsgReference": { + "id": "[resourceId(variables('vnetRGName'),'Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-5432b4df-d783-57a2-b65f-39f4bca4974a", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2019-12-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "deployRouteTable": { + "value": true + }, + "deployGWLB": { + "value": true + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet1StartAddress": { + "value": "[parameters('subnet1StartAddress')]" + }, + "subnet1Id": { + "value": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]" + }, + "lbResourceId": { + "value": "[parameters('lbResourceId')]" + }, + "lbTargetBEAddressPoolName": { + "value": "[parameters('lbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "vxlanTunnelExternalPort": { + "value": "[parameters('vxlanTunnelExternalPort')]" + }, + "vxlanTunnelExternalIdentifier": { + "value": "[parameters('vxlanTunnelExternalIdentifier')]" + }, + "vxlanTunnelInternalPort": { + "value": "[parameters('vxlanTunnelInternalPort')]" + }, + "vxlanTunnelInternalIdentifier": { + "value": "[parameters('vxlanTunnelInternalIdentifier')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[union(variables('vmssTags'),if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachineScaleSets'), parameters('tagsByResource')['Microsoft.Compute/virtualMachineScaleSets'], json('{}')))]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "storageProfile": { + "osDisk": { + "diskSizeGB": "[variables('diskSizeGB')]", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.lbId.value), json('null'), reference('loadBalancerSetup').outputs.lbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2019-06-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Insights/autoscaleSettings'), parameters('tagsByResource')['Microsoft.Insights/autoscaleSettings'], json('{}')) ]" + } + ], + "outputs": { + "GatewayLoadBalancerId": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.lbId.value]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-ha/README.md b/azure/templates/marketplace-ha/README.md new file mode 100644 index 00000000..e58bd802 --- /dev/null +++ b/azure/templates/marketplace-ha/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security High Availability for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-ha%2FmainTemplate.json) + + diff --git a/azure/templates/marketplace-ha/createUiDefinition.json b/azure/templates/marketplace-ha/createUiDefinition.json new file mode 100644 index 00000000..a547363d --- /dev/null +++ b/azure/templates/marketplace-ha/createUiDefinition.json @@ -0,0 +1,1650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point CloudGuard IaaS High Availability Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm" + } + } + }, + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster Object settings", + "subLabel": { + "preValidation": "Configure Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8120vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8120vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "true" + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "managedSystemAssigned", + "type": "Microsoft.Common.OptionsGroup", + "visible": true, + "label": "Create a System Assigned Identity", + "toolTip": "Automatically create a Service Principal for this deployment.", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "availabilityOptions", + "type": "Microsoft.Common.DropDown", + "label": "Availability options", + "defaultValue": "Availability Set", + "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "Availability Set", + "value": "Availability Set" + }, + { + "label": "Availability Zones", + "value": "Availability Zones" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Cluster members to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": true + }, + { + "name": "customMetricsInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('chkp').customMetrics, 'yes'), not(equals(steps('chkp').managedSystemAssigned, 'yes')))]", + "options": { + "icon": "Warning", + "text": "CloudGuard metrics can't be used when System Assigned Identity is disabled" + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use public IP prefix", + "defaultValue": "No", + "toolTip": "Use public IP prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create public IP prefix", + "defaultValue": "No", + "toolTip": "Create new public IP prefix to use.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('chkp').publicIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Public IP prefix resource id", + "defaultValue": "", + "toolTip": "Use an exisiting public IP prefix resource id.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed." + }, + "visible": "[equals(steps('chkp').createNewIPPrefix, 'no')]" + }, + { + "name": "allowSmart1CloudConnection", + "type": "Microsoft.Common.OptionsGroup", + "label": "Quick connect to Smart-1 Cloud", + "defaultValue": "Yes", + "toolTip": "Automatically connect this Cluster to Smart-1 Cloud - Check Point's Security Management as a Service", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": true + }, + { + "name": "smart1CloudTokenTxt", + "type": "Microsoft.Common.TextBlock", + "options": { + "text": "Follow these instructions to quickly connect this Cluster to Smart-1 Cloud", + "link": { + "label": "SK180501 - Connecting CloudGuard Network Security Public Cloud Gateways to Smart-1 Cloud", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501" + } + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudTokenA", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token Member A", + "toolTip": "Paste here the token copied from the Connect Gateway (Member A) screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudTokenB", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token Member B", + "toolTip": "Paste here the token copied from the Connect Gateway (Member B) screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "Vips_Number", + "type": "Microsoft.Common.DropDown", + "label": "Number of Virtual IPs (VIP)", + "defaultValue": "1", + "toolTip": "Choose number of Virtual IP addresses to deploy for the cluster's external NIC", + "constraints": { + "allowedValues": [ + { + "label": "1", + "value": "1" + }, + { + "label": "2", + "value": "2" + }, + { + "label": "3", + "value": "3" + }, + { + "label": "4", + "value": "4" + }, + { + "label": "5", + "value": "5" + }, + { + "label": "6", + "value": "6" + }, + { + "label": "7", + "value": "7" + }, + { + "label": "8", + "value": "8" + }, + { + "label": "9", + "value": "9" + }, + { + "label": "10", + "value": "10" + } + ], + "required": true + }, + "visible": true + }, + { + "name": "VIP_Names", + "type": "Microsoft.Common.Section", + "label": "VIPs Names", + "elements": [ + { + "name": "VIP2_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 2 name", + "toolTip": "Choose name for VIP number 2", + "visible": "[greater(int(steps('network').Vips_Number), 1)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP3_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 3 name", + "toolTip": "Choose name for VIP number 3", + "visible": "[greater(int(steps('network').Vips_Number), 2)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP4_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 4 name", + "toolTip": "Choose name for VIP number 4", + "visible": "[greater(int(steps('network').Vips_Number), 3)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP5_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 5 name", + "toolTip": "Choose name for VIP number 5", + "visible": "[greater(int(steps('network').Vips_Number), 4)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP6_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 6 name", + "toolTip": "Choose name for VIP number 6", + "visible": "[greater(int(steps('network').Vips_Number), 5)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP7_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 7 name", + "toolTip": "Choose name for VIP number 7", + "visible": "[greater(int(steps('network').Vips_Number), 6)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP8_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 8 name", + "toolTip": "Choose name for VIP number 8", + "visible": "[greater(int(steps('network').Vips_Number), 7)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP9_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 9 name", + "toolTip": "Choose name for VIP number 9", + "visible": "[greater(int(steps('network').Vips_Number), 8)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP10_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 10 name", + "toolTip": "Choose name for VIP number 10", + "visible": "[greater(int(steps('network').Vips_Number), 9)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + } + ], + "visible": "[greater(int(steps('network').Vips_Number), 1)]" + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('clusterObjectNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Compute/availabilitySets", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/loadBalancers", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "managedSystemAssigned": "[steps('chkp').managedSystemAssigned]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "availabilityOptions": "[steps('chkp').availabilityOptions]", + "customMetrics": "[steps('chkp').customMetrics]", + "floatingIP": "[steps('chkp').floatingIP]", + "publicIPPrefix": "[steps('chkp').publicIPPrefix]", + "createNewIPPrefix": "[steps('chkp').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('chkp').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]", + "smart1CloudTokenA": "[steps('chkp').Smart1CloudTokenA]", + "smart1CloudTokenB": "[steps('chkp').Smart1CloudTokenB]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "VipsNumber": "[int(steps('network').Vips_Number)]", + "VipNames": "[concat(steps('network').VIP_Names.VIP2_Name, ',', steps('network').VIP_Names.VIP3_Name, ',', steps('network').VIP_Names.VIP4_Name, ',', steps('network').VIP_Names.VIP5_Name, ',', steps('network').VIP_Names.VIP6_Name, ',', steps('network').VIP_Names.VIP7_Name, ',', steps('network').VIP_Names.VIP8_Name, ',', steps('network').VIP_Names.VIP9_Name, ',', steps('network').VIP_Names.VIP10_Name)]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-ha/mainTemplate.json b/azure/templates/marketplace-ha/mainTemplate.json new file mode 100644 index 00000000..77c7fbf3 --- /dev/null +++ b/azure/templates/marketplace-ha/mainTemplate.json @@ -0,0 +1,1453 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "floatingIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "publicIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Use public IP prefix" + } + }, + "createNewIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Create new public IP prefix" + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + }, + "smart1CloudTokenA": { + "type": "securestring", + "defaultValue": "" + }, + "smart1CloudTokenB": { + "type": "securestring", + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "VipsNumber": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 10 + }, + "VipNames": { + "type": "string", + "defaultValue": "" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "VIPs_Number": "[int(parameters('VipsNumber'))]", + "Vip_Names": "[split(parameters('VipNames'), ',')]", + "templateName": "ha", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "roleDefinitionIds": "[createArray(subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "ExsitingNsgRoleAssignmentURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/existing-nsg-RoleAssignment', '.json'))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "emptyString": "none", + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), variables('emptyString'))]", + "ipNewPrefixId": "[resourceId('Microsoft.Network/publicIPPrefixes',variables('ipPrefixNewName'))]", + "publicIPNewPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipNewPrefixId'), json('null'))]", + "usepublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPNewPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPrefixProperty": { + "Id": "[variables('usepublicIPPrefix')]" + }, + "tokens": [ + "[parameters('smart1CloudTokenA')]", + "[parameters('smart1CloudTokenB')]" + ], + "prefixDependsOn": "[if(equals(parameters('publicIPPrefix'), 'yes'), if(equals(parameters('createNewIPPrefix'), 'yes'), variables('publicIPNewPrefixId'), variables('ipNewPrefixId')), variables('ipNewPrefixId'))]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + }, + "DefaultIpAddresses": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + ], + "copy": [ + { + "name": "externalPrivateAddresses", + "count": "[add(variables('VIPs_Number'),2)]", + "input": "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),copyIndex('externalPrivateAddresses'))))]" + }, + { + "name": "Vips", + "count": "[sub(variables('VIPs_Number'), 1)]", + "input": { + "name": "[concat('cluster-vip-', copyIndex('Vips', 1))]", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[add(copyIndex('Vips'), 3)]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('Vip_Names')[copyIndex('Vips')])]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + }, + { + "name": "VipsInformation", + "count": "[sub(variables('VIPs_Number'), 1)]", + "input": { + "name": "[concat('cluster-vip-', copyIndex('VipsInformation', 1))]", + "privateIPAddress": "[variables('externalPrivateAddresses')[add(copyIndex('VipsInformation'), 3)]]", + "publicIPAddress": "[variables('Vip_Names')[copyIndex('VipsInformation')]]" + } + }, + { + "name": "customData", + "count": "[variables('count')]", + "input": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', '\n','smart1CloudToken=\"', variables('tokens')[copyIndex('customData')], '\"', '\n', 'Vips=\"', string(variables('VipsInformationForCloudConfig')), '\"', '\n','externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]" + } + ], + "DefaultVipInformation": [ + { + "name": "cluster-vip", + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "publicIPAddress": "[parameters('vmName')]" + } + ], + "VipsInformationForCloudConfig": "[union(variables('DefaultVipInformation'), variables('VipsInformation'))]" + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicIPPrefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[if(greater(variables('VIPs_Number'), 5), '28', if(greater(variables('VIPs_Number'), 1), '29', '30'))]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPPrefixes'), parameters('tagsByResource')['Microsoft.Network/publicIPPrefixes'], json('{}')) ]" + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/availabilitySets'), parameters('tagsByResource')['Microsoft.Compute/availabilitySets'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('Vip_Names')[copyIndex()]]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicVipCopy", + "count": "[sub(variables('VIPs_Number'), 1)]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), 'vip', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": "[union(variables('DefaultIpAddresses'),variables('Vips'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2022-11-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(parameters('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "UserData": "[base64(concat(variables('customData')[copyIndex()], 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n'))]", + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(concat(variables('customData')[copyIndex()], 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]", + "publicIPPrefix": { + "id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usepublicIPPrefix'), json('null'))]" + } + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[mul(length(variables('roleDefinitionIds')), variables('count'))]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), if(equals(mod(copyIndex(1), 2), 1), '1', '2')))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionIds')[if(greater(copyIndex(1), 2), 1, 0)]]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), if(equals(mod(copyIndex(1), 2), 1), '1', '2'))), '2022-11-01', 'Full').identity.principalId]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[and(equals(parameters('managedSystemAssigned'), 'yes'), not(parameters('deployNewNSG')))]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '1'))]" + ], + "name": "[concat('ExistingNsgRoleAssignment', copyIndex())]", + "copy": { + "name": "ExistingNsgRoleAssignmentCopy", + "count": "[length(variables('roleDefinitionIds'))]" + }, + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "resourceGroup": "[if(not(parameters('deployNewNSG')), split(parameters('ExistingNSG').id, '/')[4], '')]", + "subscriptionId": "[subscription().subscriptionId]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ExsitingNsgRoleAssignmentURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "ExistingNSG": { + "value": "[parameters('ExistingNSG')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "roleDefinitionId": { + "value": "[variables('roleDefinitionIds')[copyIndex()]]" + }, + "principalId1": { + "value": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '1')), '2022-11-01', 'Full').identity.principalId]" + }, + "principalId2": { + "value": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '2')), '2022-11-01', 'Full').identity.principalId]" + }, + "index": { + "value": "[copyIndex()]" + } + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": "[variables('enableFloatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-management/README.md b/azure/templates/marketplace-management/README.md new file mode 100644 index 00000000..ae636acd --- /dev/null +++ b/azure/templates/marketplace-management/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security Management for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-management%2FmainTemplate.json) + + diff --git a/azure/templates/marketplace-management/createUiDefinition.json b/azure/templates/marketplace-management/createUiDefinition.json new file mode 100644 index 00000000..83dcc85d --- /dev/null +++ b/azure/templates/marketplace-management/createUiDefinition.json @@ -0,0 +1,702 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "chkp refrence architecture", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Security Management Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Management", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Management", + "value": "management" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[equals(steps('chkp').installationType, 'management')]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "enableApi", + "type": "Microsoft.Common.DropDown", + "label": "Accept Management API calls", + "defaultValue": "Management server only", + "toolTip": "Select the type of the Management API calls", + "constraints": { + "allowedValues": [ + { + "label": "Management server only", + "value": "management_only" + }, + { + "label": "All IP Addresses that can be used for GUI clients", + "value": "gui_clients" + }, + { + "label": "All IP addresses", + "value": "all" + } + ] + }, + "visible": true + }, + { + "visible": "[equals(steps('chkp').installationType, 'management')]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/networkInterfaces", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiMGMT25, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "enableApi": "[steps('chkp').enableApi]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-management/mainTemplate.json b/azure/templates/marketplace-management/mainTemplate.json new file mode 100644 index 00000000..409cb73f --- /dev/null +++ b/azure/templates/marketplace-management/mainTemplate.json @@ -0,0 +1,920 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (MGMT25)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "management", + "allowedValues": [ + "management", + "custom" + ] + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "enableApi": { + "type": "string", + "metadata": { + "description": "Accept Management API calls (NOTE: Works only in version R81.10 and above)" + }, + "defaultValue": "management_only", + "allowedValues": [ + "management_only", + "gui_clients", + "all" + ] + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "templateName": "management", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (MGMT25)": "MGMT25", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (MGMT25)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (MGMT25)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": "[bool('false')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'enableApi=\"', parameters('enableApi'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), variables('imageReferenceMGMT25'))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planMGMT25'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "condition": "[parameters('deployNewNSG')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-mds/README.md b/azure/templates/marketplace-mds/README.md new file mode 100644 index 00000000..83bf14c5 --- /dev/null +++ b/azure/templates/marketplace-mds/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security MDS for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-mds%2FmainTemplate.json) + + diff --git a/azure/templates/marketplace-mds/createUiDefinition.json b/azure/templates/marketplace-mds/createUiDefinition.json new file mode 100644 index 00000000..52056087 --- /dev/null +++ b/azure/templates/marketplace-mds/createUiDefinition.json @@ -0,0 +1,637 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard MDS deployment guide", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point MDS Deployment for Azure.", + "link": { + "label": "MDS Deployment Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk154436&partition=Basic&product=CloudGuard" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Multi-Domain Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Multi-Domain Server settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_DS5_v2", + "Standard_DS15_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Primary Multi-Domain Server", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Primary Multi-Domain Server", + "value": "mds-primary" + }, + { + "label": "Secondary Multi-Domain Server", + "value": "mds-secondary" + }, + { + "label": "Multi-Domain Log Server", + "value": "mds-logserver" + } + ] + } + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "(^0\\.0\\.0\\.0\\/0$)|(^(?!0\\.0\\.0\\.0$)(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", + "validationMessage": "Enter a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)" + }, + "visible": true + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[not(equals(steps('chkp').installationType, 'mds-primary'))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use custom image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Multi-Domain Server subnet", + "defaultValue": { + "name": "Multi-Domain-Server", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8120vmSizeUiBYOL)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[if(contains(steps('chkp').managementGUIClientNetwork, '/'), steps('chkp').managementGUIClientNetwork, concat(steps('chkp').managementGUIClientNetwork, '/32'))]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-mds/mainTemplate.json b/azure/templates/marketplace-mds/mainTemplate.json new file mode 100644 index 00000000..91f313fc --- /dev/null +++ b/azure/templates/marketplace-mds/mainTemplate.json @@ -0,0 +1,903 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.20 - Bring Your Own License" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "The name of the Check Point Multi-Domain Server." + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_DS5_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet01" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the subnet" + }, + "defaultValue": "Multi-Domain-Server" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "mds-primary", + "allowedValues": [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "templateName": "mds", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.20 - Bring Your Own License": "BYOL" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.20 - Bring Your Own License": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "serialConsoleGeographies": { + "astasia": [ + "20.205.69.28" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "eastasia": [ + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": "[bool('false')]", + "primary": "[equals(parameters('installationType'), 'mds-primary')]", + "secondary": "[equals(parameters('installationType'), 'mds-secondary')]", + "logserver": "[equals(parameters('installationType'), 'mds-logserver')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'sicKey=\"', parameters('sicKey'), '\"', '\n', 'primary=\"', variables('primary'), '\"', '\n', 'secondary=\"', variables('secondary'), '\"', '\n', 'logserver=\"', variables('logserver'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables('imageReferenceBYOL')]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planBYOL'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "condition": "[parameters('deployNewNSG')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-single-waap/createUiDefinition.json b/azure/templates/marketplace-single-waap/createUiDefinition.json new file mode 100755 index 00000000..3ebd285b --- /dev/null +++ b/azure/templates/marketplace-single-waap/createUiDefinition.json @@ -0,0 +1,338 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "This will determine the hostname prefix of the VM", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "inboundSources", + "type": "Microsoft.Common.TextBox", + "label": "Allow access from", + "defaultValue": "0.0.0.0/0", + "toolTip": "Specify the client IP addresses that can reach your instance. Can be IP address range in CIDR notation (e.g. for any source use 0.0.0.0/0)", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2])){1,50}$", + "validationMessage": "Only CIDR notation is allowed i.e. X.X.X.X/X" + }, + "visible": true + }, + { + "name": "user", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "User is set to 'admin'" + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + }, + { + "name": "waapAgentToken", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Infinity Next Agent Token", + "confirmPassword": "Confirm Infinity Next Agent Token" + }, + "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", + "constraints": { + "required": true, + "regex": "^cp-[a-z0-9A-Z-]{72,72}$", + "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" + }, + "options": { + "hideConfirmation": false + }, + "visible": true + }, + { + "name": "waapAgentFog", + "type": "Microsoft.Common.TextBox", + "label": "Fog address (optional)", + "toolTip": "Fog address", + "constraints": { + "required": false, + "regex": "^https://", + "validationMessage": "Should begin with https://" + }, + "visible": true + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "VM settings", + "subLabel": { + "preValidation": "Configure VM settings", + "postValidation": "Done" + }, + "bladeTitle": "VM settings", + "elements": [ + { + "name": "vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": true, + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "infinity-gw", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "waapPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Assign public IP address to the gateway", + "toolTip": "Assign public IP address to the gateway", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "Bootstrap script", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": false + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('autoprovision').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('autoprovision').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Gateway external subnet", + "defaultValue": { + "name": "VM-External", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Gateway internal subnet", + "defaultValue": { + "name": "VM-Internal", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "vmName": "[basics('gatewayNameUi')]", + "inboundSources": "[basics('inboundSources')]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "waapAgentToken": "[basics('waapAgentToken')]", + "waapAgentFog": "[basics('waapAgentFog')]", + "vmSize": "[steps('autoprovision').vmSizeUiBYOL]", + "waapPublicIP": "[steps('autoprovision').waapPublicIP]", + "bootstrapScript": "[steps('autoprovision').bootstrapScript]", + "sourceImageVhdUri": "[coalesce(steps('autoprovision').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-single-waap/mainTemplate.json b/azure/templates/marketplace-single-waap/mainTemplate.json new file mode 100755 index 00000000..1d4f4b84 --- /dev/null +++ b/azure/templates/marketplace-single-waap/mainTemplate.json @@ -0,0 +1,567 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Infinity Next Gateway" + } + }, + "inboundSources": { + "type": "string", + "defaultValue": "0.0.0.0/0", + "metadata": { + "description": "Specify the client IP addresses that can reach your instance. Can be IP address range in CIDR notation (e.g. for any source use 0.0.0.0/0)" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "User is set to 'admin'" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "waapAgentToken": { + "type": "securestring", + "minLength": 75, + "maxLength": 75, + "metadata": { + "description": "Infinity Next Agent Token" + } + }, + "waapAgentFog": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Fog address" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_DS2_v2", + "metadata": { + "description": "The VM size of the Security Gateway" + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "waapPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "description": "Assign public IP address to the gateway" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the Gateway external subnet" + }, + "defaultValue": "VM-External" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the Gateway external subnet. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the Gateway internal subnet" + }, + "defaultValue": "VM-Internal" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the Gateway internal subnet. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "[deployment().properties.templateLink.uri]", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "DO NOT CHANGE" + }, + "defaultValue": "notused" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + } + }, + "variables": { + "templateName": "checkpoint_waap", + "templateVersion": "20210922", + "location": "[parameters('location')]", + "osVersion": "R8040", + "installationType": "waap", + "isBlink": "true", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[variables('diskSize100GB')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', '', '\"', '\n','waapAgentToken =\"', variables('waapAgentToken'), '\"', '\n', 'waapAgentFog =\"', variables('waapAgentFog'), '\"', '\n')]", + "imageOffer": "infinity-gw", + "imagePublisher": "checkpoint", + "imageSku": "infinity-img", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables('imageReferenceBYOL')]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables('planBYOL')]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "publicIPAddress": { + "id": "[variables('publicIPAddressId')]" + }, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "false", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "waapAgentToken": "[parameters('waapAgentToken')]", + "waapAgentFog": "[parameters('waapAgentFog')]", + "inboundSources": "[parameters('inboundSources')]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-858bb8ac-3986-4499-adc5-990c43de41c2-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "condition": "[equals(parameters('waapPublicIP'), 'yes')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "30443", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 110, + "direction": "Inbound" + } + }, + { + "name": "HTTPS", + "properties": { + "description": "Allow inbound HTTPS access", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 120, + "direction": "Inbound" + } + }, + { + "name": "HTTP", + "properties": { + "description": "Allow inbound HTTP access", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 130, + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": "[if(equals(parameters('waapPublicIP'),'yes'), variables('publicIPAddress'), json('null'))]", + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + } + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + } + ], + "outputs": {} +} \ No newline at end of file diff --git a/azure/templates/marketplace-single/README.md b/azure/templates/marketplace-single/README.md new file mode 100644 index 00000000..e092fdd8 --- /dev/null +++ b/azure/templates/marketplace-single/README.md @@ -0,0 +1,22 @@ +# Check Point CloudGuard Network Security Single Gateway for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-single%2FmainTemplate.json) + + + diff --git a/azure/templates/marketplace-single/createUiDefinition.json b/azure/templates/marketplace-single/createUiDefinition.json new file mode 100644 index 00000000..b02e4ffd --- /dev/null +++ b/azure/templates/marketplace-single/createUiDefinition.json @@ -0,0 +1,1353 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8120vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "visible": "[or(equals(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'))]", + "defaultValue": "Gateway only", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Gateway only", + "value": "gateway" + }, + { + "label": "Standalone", + "value": "standalone" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "standaloneValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')))))]", + "options": { + "icon": "Error", + "text": "Standalone deployment is ONLY supported for CloudGuard versions R81.10 and R81.20 Bring Your Own License." + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[and(or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')), equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[not(equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[or(not(equals(steps('chkp').cloudGuardVersion, 'R80.10')), not(equals(steps('chkp').installationType, 'custom')))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Gateway or Standalone to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ], + "required": true + }, + "visible": true + }, + { + "name": "allowSmart1CloudConnection", + "type": "Microsoft.Common.OptionsGroup", + "label": "Quick connect to Smart-1 Cloud", + "defaultValue": "Yes", + "toolTip": "Automatically connect this single gateway to Smart-1 Cloud - Check Point's Security Management as a Service", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": "[equals(steps('chkp').installationType, 'gateway')]" + }, + { + "name": "smart1CloudTokenTxt", + "type": "Microsoft.Common.TextBlock", + "options": { + "text": "Follow these instructions to quickly connect this single gateway to Smart-1 Cloud", + "link": { + "label": "SK180501 - Connecting CloudGuard Network Security Public Cloud Gateways to Smart-1 Cloud", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501" + } + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudToken", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token", + "toolTip": "Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX )]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "customMetrics": "[steps('chkp').customMetrics]", + "adminShell": "[steps('chkp').adminShell]", + "smart1CloudToken": "[steps('chkp').Smart1CloudToken]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-single/mainTemplate.json b/azure/templates/marketplace-single/mainTemplate.json new file mode 100644 index 00000000..57fea308 --- /dev/null +++ b/azure/templates/marketplace-single/mainTemplate.json @@ -0,0 +1,942 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "gateway", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for this VM monitoring" + } + }, + "smart1CloudToken": { + "type": "securestring", + "defaultValue": "" + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "templateName": "single", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "serialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ], + "usgovarizona": [ + "20.141.10.130", + "52.127.55.131" + ], + "usgovvirginia": [ + "20.141.10.130", + "52.127.55.131" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "installationType": "[parameters('installationType')]", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'smart1CloudToken=\"', parameters('smart1CloudToken'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageSku": "[if(and(equals(parameters('installationType'), 'standalone'), or(equals(variables('osVersion'),'R8110'), equals(variables('osVersion'),'R8120'))), 'mgmt-byol', 'sg-byol')]", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "vmID": "[resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", + "customMetrics": "[parameters('customMetrics')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments/', 'networkExistingSetup'))]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmID'), '2019-12-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-ha/createUiDefinition.json b/azure/templates/marketplace-stack-ha/createUiDefinition.json new file mode 100644 index 00000000..08494d6a --- /dev/null +++ b/azure/templates/marketplace-stack-ha/createUiDefinition.json @@ -0,0 +1,513 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the Check Point CloudGuard Cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Cluster Object settings", + "subLabel": { + "preValidation": "Configure CloudGuard Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.10", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-ha/mainTemplate.json b/azure/templates/marketplace-stack-ha/mainTemplate.json new file mode 100755 index 00000000..932a8714 --- /dev/null +++ b/azure/templates/marketplace-stack-ha/mainTemplate.json @@ -0,0 +1,689 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "cluster-stack", + "templateName": "stack-ha", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n', 'subnet1Prefix=\"', first(split(parameters('subnet1Prefix'), '/')), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n')]", + "imageOfferR8110": "check-point-cg-r8110", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack-ha', '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]" + ], + "Subnet2PrivateAddresses": [ + "[parameters('subnet2StartAddress')]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]" + ], + "publicIPAddressName1": "[concat(parameters('vmName'), 1)]", + "publicIPAddressId1": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName1'))]", + "publicIPAddressName2": "[concat(parameters('vmName'), 2)]", + "publicIPAddressId2": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName2'))]", + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "elbBEAddressPool": "[concat(variables('lbName'), '-pool')]", + "elbBEAddressPoolID": "[concat(variables('lbId'),'/backendAddressPools/',variables('elbBEAddressPool'))]", + "appProbeName": "health_prob_port", + "elbPublicIPName": "frontend-lb-address", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "lbId": "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "lbName": "frontend-lb" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet1StartAddress": { + "value": "[parameters('subnet1StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId1')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 1))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId2')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 2))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "interface2Copy", + "count": "[variables('count')]" + }, + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('Subnet2PrivateAddresses')[copyIndex(0)]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('lbName')]", + "location": "[variables('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8081, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId1')).IpAddress]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId2')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-management/createUiDefinition.json b/azure/templates/marketplace-stack-management/createUiDefinition.json new file mode 100644 index 00000000..3f5a84d7 --- /dev/null +++ b/azure/templates/marketplace-stack-management/createUiDefinition.json @@ -0,0 +1,306 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point CloudGuard Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Security Management Server settings", + "subLabel": { + "preValidation": "Configure CloudGuard Security Management Server settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.10", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-management/mainTemplate.json b/azure/templates/marketplace-stack-management/mainTemplate.json new file mode 100755 index 00000000..e8c36031 --- /dev/null +++ b/azure/templates/marketplace-stack-management/mainTemplate.json @@ -0,0 +1,465 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Management Server" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the management subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the management subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the management subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + } + }, + "variables": { + "installationType": "management-stack", + "templateName": "stack-management", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (MGMT25)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": false, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8110": "check-point-cg-r8110", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack-mgmt.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "notused", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-single/createUiDefinition.json b/azure/templates/marketplace-stack-single/createUiDefinition.json new file mode 100644 index 00000000..279644a1 --- /dev/null +++ b/azure/templates/marketplace-stack-single/createUiDefinition.json @@ -0,0 +1,513 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard Gateway.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Gateway settings", + "subLabel": { + "preValidation": "Configure CloudGuard Gateway settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Gateway settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.10", + "toolTip": "The version of Check Point CloudGuard Gateway.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX )]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-stack-single/mainTemplate.json b/azure/templates/marketplace-stack-single/mainTemplate.json new file mode 100755 index 00000000..c33ab3e1 --- /dev/null +++ b/azure/templates/marketplace-stack-single/mainTemplate.json @@ -0,0 +1,552 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the backend subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "gateway-stack", + "templateName": "stack-single", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8110": "check-point-cg-r8110", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "name": "[variables('publicIPAddressName')]", + "location": "[variables('location')]", + "sku": { + "name": "Basic" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-vmss-waap/createUiDefinition.json b/azure/templates/marketplace-vmss-waap/createUiDefinition.json new file mode 100755 index 00000000..2ca24a11 --- /dev/null +++ b/azure/templates/marketplace-vmss-waap/createUiDefinition.json @@ -0,0 +1,795 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Scale Set name", + "toolTip": "This will determine the hostname prefix of the VM", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "inboundSources", + "type": "Microsoft.Common.TextBox", + "label": "Allow access from", + "defaultValue": "0.0.0.0/0", + "toolTip": "Specify the client IP addresses that can reach your instance. Can be IP address range in CIDR notation (e.g. for any source use 0.0.0.0/0)", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2])){1,50}$", + "validationMessage": "Only CIDR notation is allowed i.e. X.X.X.X/X" + }, + "visible": true + }, + { + "name": "user", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "User is set to 'admin'" + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + }, + { + "name": "waapAgentToken", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Infinity Next Agent Token", + "confirmPassword": "Confirm Infinity Next Agent Token" + }, + "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", + "constraints": { + "required": true, + "regex": "^cp-[a-z0-9A-Z-]{72,72}$", + "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" + }, + "options": { + "hideConfirmation": false + }, + "visible": true + }, + { + "name": "waapAgentFog", + "type": "Microsoft.Common.TextBox", + "label": "Fog address (optional)", + "toolTip": "Fog address", + "constraints": { + "required": false, + "regex": "^https://", + "validationMessage": "Should begin with https://" + }, + "visible": true + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address (optional)", + "defaultValue": "", + "toolTip": "An email address to notify about scaling events", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?){1,100}$", + "validationMessage": "Leave empty or enter a valid email address." + } + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "VMSS settings", + "subLabel": { + "preValidation": "Configure VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "VMSS settings", + "elements": [ + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "Two zones", + "toolTip": "The number of availability zones to use for the scale set. The VMs will be spread equally between the zones", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralindia centralus eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia uksouth westeurope westus2 westus3 ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": true, + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "infinity-gw", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "toolTip": "Initial number of gateways", + "defaultValue": "2", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "toolTip": "Maximum number of gateways", + "defaultValue": "10", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Assign public IP address to each gateway", + "toolTip": "Each VMSS instance will have its own public IP address", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "deploymentMode", + "type": "Microsoft.Common.DropDown", + "label": "Network Load Balancer deployment", + "defaultValue": "External", + "visible": true, + "toolTip": "Define which network load balancer will be deployed", + "constraints": { + "allowedValues": [ + { + "label": "External", + "value": "ELBOnly" + }, + { + "label": "Internal", + "value": "ILBOnly" + } + ] + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.OptionsGroup", + "label": "Load Balancer session persistence", + "defaultValue": "Client IP", + "toolTip": "The load balancing distribution method", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Client IP", + "value": "SourceIP" + }, + { + "label": "None", + "value": "Default" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "Bootstrap script", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "toolTip": "Use custom image URI", + "defaultValue": "No", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": false + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('autoprovision').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd" + }, + "visible": "[equals(steps('autoprovision').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Gateway external subnet", + "defaultValue": { + "name": "VMSS-External", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + }, + "subnet2": { + "label": "Gateway internal subnet", + "defaultValue": { + "name": "VMSS-Internal", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + } + } + ] + }, + { + "name": "https", + "label": "HTTPS settings", + "subLabel": { + "preValidation": "Configure HTTPS settings", + "postValidation": "Done" + }, + "bladeTitle": "HTTPS settings", + "elements": [ + { + "name": "chooseVault", + "type": "Microsoft.Common.OptionsGroup", + "label": "Certificates", + "toolTip": "Certificates", + "defaultValue": "I don't use HTTPS certificates", + "constraints": { + "allowedValues": [ + { + "label": "I don't use HTTPS certificates", + "value": "none" + }, + { + "label": "Create new Azure Key Vault and upload certificates", + "value": "newVault" + }, + { + "label": "Choose an existing Azure Key Vault", + "value": "existingVault" + } + ], + "required": true + }, + "visible": true + }, + { + "name": "existingKeyVault", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Choose Key Vault", + "resourceType": "Microsoft.KeyVault/vaults", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "toolTip": "The chosen key vault should contain PFX certificates for all the relevant HTTPS based assets in the [Infinity Portal](https://portal.checkpoint.com/)", + "visible": "[equals(steps('https').chooseVault, 'existingVault')]" + }, + { + "name": "keyVaultName", + "type": "Microsoft.Common.TextBox", + "label": "Azure Key Vault name", + "toolTip": "Azure Key Vault name", + "constraints": { + "required": true, + "regex": "^[a-zA-Z0-9-]{3,24}$", + "validationMessage": "A vault's name must be between 3-24 alphanumeric characters. The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens." + }, + "visible": "[equals(steps('https').chooseVault, 'newVault')]" + }, + { + "name": "numberOfCerts", + "type": "Microsoft.Common.DropDown", + "label": "Number of certificates to upload", + "defaultValue": "1", + "toolTip": "Each certificate will have two entries in the Key Vault secrets - one for certificate and one for its password", + "constraints": { + "required": true, + "allowedValues": [ + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + } + ] + }, + "visible": "[equals(steps('https').chooseVault, 'newVault')]" + }, + { + "name": "firstCertificate", + "type": "Microsoft.Common.FileUpload", + "label": "PFX certificate file", + "toolTip": "A PKCS#12 archive containing the Certificate Authority (CA) certificate and private key", + "constraints": { + "required": true, + "accept": ".pfx,.p12" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "binary", + "encoding": "UTF-8" + }, + "visible": "[equals(steps('https').chooseVault, 'newVault')]" + }, + { + "name": "firstCertDescription", + "type": "Microsoft.Common.TextBox", + "label": "Description", + "defaultValue": "", + "toolTip": "Please add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets", + "constraints": { + "required": true, + "regex": "^.{1,100}$", + "validationMessage": "Description must be 1-100 characters long." + }, + "visible": "[equals(steps('https').chooseVault, 'newVault')]" + }, + { + "name": "firstCertPassword", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Certificate password", + "confirmPassword": "Confirm certificate password" + }, + "toolTip": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault", + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false + }, + "visible": "[equals(steps('https').chooseVault, 'newVault')]" + }, + { + "name": "secondCertificate", + "type": "Microsoft.Common.FileUpload", + "label": "PFX certificate file", + "toolTip": "A PKCS#12 archive containing the Certificate Authority (CA) certificate and private key", + "constraints": { + "required": "[lessOrEquals(2, steps('https').numberOfCerts)]", + "accept": ".pfx,.p12" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "binary", + "encoding": "UTF-8" + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(2, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "secondCertDescription", + "type": "Microsoft.Common.TextBox", + "label": "Description", + "defaultValue": "", + "toolTip": "Please add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets", + "constraints": { + "required": "[lessOrEquals(2, steps('https').numberOfCerts)]", + "regex": "^.{1,100}$", + "validationMessage": "Description must be 1-100 characters long." + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(2, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "secondCertPassword", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Certificate password", + "confirmPassword": "Confirm certificate password" + }, + "toolTip": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault", + "constraints": { + "required": "[lessOrEquals(2, steps('https').numberOfCerts)]" + }, + "options": { + "hideConfirmation": false + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(2, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "thirdCertificate", + "type": "Microsoft.Common.FileUpload", + "label": "PFX certificate file", + "toolTip": "A PKCS#12 archive containing the Certificate Authority (CA) certificate and private key", + "constraints": { + "required": "[lessOrEquals(3, steps('https').numberOfCerts)]", + "accept": ".pfx,.p12" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "binary", + "encoding": "UTF-8" + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(3, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "thirdCertDescription", + "type": "Microsoft.Common.TextBox", + "label": "Description", + "defaultValue": "", + "toolTip": "Please add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets", + "constraints": { + "required": "[lessOrEquals(3, steps('https').numberOfCerts)]", + "regex": "^.{1,100}$", + "validationMessage": "Description must be 1-100 characters long." + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(3, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "thirdCertPassword", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Certificate password", + "confirmPassword": "Confirm certificate password" + }, + "toolTip": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault", + "constraints": { + "required": "[lessOrEquals(3, steps('https').numberOfCerts)]" + }, + "options": { + "hideConfirmation": false + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(3, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fourthCertificate", + "type": "Microsoft.Common.FileUpload", + "label": "PFX certificate file", + "toolTip": "A PKCS#12 archive containing the Certificate Authority (CA) certificate and private key", + "constraints": { + "required": "[lessOrEquals(4, steps('https').numberOfCerts)]", + "accept": ".pfx,.p12" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "binary", + "encoding": "UTF-8" + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(4, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fourthCertDescription", + "type": "Microsoft.Common.TextBox", + "label": "Description", + "defaultValue": "", + "toolTip": "Please add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets", + "constraints": { + "required": "[lessOrEquals(4, steps('https').numberOfCerts)]", + "regex": "^.{1,100}$", + "validationMessage": "Description must be 1-100 characters long." + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(4, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fourthCertPassword", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Certificate password", + "confirmPassword": "Confirm certificate password" + }, + "toolTip": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault", + "constraints": { + "required": "[lessOrEquals(4, steps('https').numberOfCerts)]" + }, + "options": { + "hideConfirmation": false + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(4, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fifthCertificate", + "type": "Microsoft.Common.FileUpload", + "label": "PFX certificate file", + "toolTip": "A PKCS#12 archive containing the Certificate Authority (CA) certificate and private key", + "constraints": { + "required": "[lessOrEquals(5, steps('https').numberOfCerts)]", + "accept": ".pfx,.p12" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "binary", + "encoding": "UTF-8" + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(5, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fifthCertDescription", + "type": "Microsoft.Common.TextBox", + "label": "Description", + "defaultValue": "", + "toolTip": "Please add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets", + "constraints": { + "required": "[lessOrEquals(5, steps('https').numberOfCerts)]", + "regex": "^.{1,100}$", + "validationMessage": "Description must be 1-100 characters long." + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(5, coalesce(steps('https').numberOfCerts, int('0'))))]" + }, + { + "name": "fifthCertPassword", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Certificate password", + "confirmPassword": "Confirm certificate password" + }, + "toolTip": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault", + "constraints": { + "required": "[lessOrEquals(5, steps('https').numberOfCerts)]" + }, + "options": { + "hideConfirmation": false + }, + "visible": "[and(equals(steps('https').chooseVault, 'newVault'), lessOrEquals(5, coalesce(steps('https').numberOfCerts, int('0'))))]" + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "deploymentMode": "[steps('autoprovision').deploymentMode]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "vmSize": "[steps('autoprovision').R8040vmSizeUiBYOL]", + "bootstrapScript": "[steps('autoprovision').bootstrapScript]", + "sourceImageVhdUri": "[coalesce(steps('autoprovision').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "inboundSources": "[basics('inboundSources')]", + "waapAgentToken": "[basics('waapAgentToken')]", + "waapAgentFog": "[basics('waapAgentFog')]", + "adminEmail": "[basics('adminEmail')]", + "chooseVault": "[steps('https').chooseVault]", + "existingKeyVaultRGName": "[if(empty(steps('https').existingKeyVault), resourceGroup().name, first(skip(split(steps('https').existingKeyVault.id, '/'), 4)))]", + "keyVaultName": "[if(equals(steps('https').chooseVault, 'none'), 'vault', if(empty(steps('https').existingKeyVault), steps('https').keyVaultName, steps('https').existingKeyVault.name))]", + "numberOfCerts": "[coalesce(steps('https').numberOfCerts, int('0'))]", + "firstCertificate": "[steps('https').firstCertificate]", + "firstCertDescription": "[steps('https').firstCertDescription]", + "firstCertPassword": "[steps('https').firstCertPassword]", + "secondCertificate": "[steps('https').secondCertificate]", + "secondCertDescription": "[steps('https').secondCertDescription]", + "secondCertPassword": "[steps('https').secondCertPassword]", + "thirdCertificate": "[steps('https').thirdCertificate]", + "thirdCertDescription": "[steps('https').thirdCertDescription]", + "thirdCertPassword": "[steps('https').thirdCertPassword]", + "fourthCertificate": "[steps('https').fourthCertificate]", + "fourthCertDescription": "[steps('https').fourthCertDescription]", + "fourthCertPassword": "[steps('https').fourthCertPassword]", + "fifthCertificate": "[steps('https').fifthCertificate]", + "fifthCertDescription": "[steps('https').fifthCertDescription]", + "fifthCertPassword": "[steps('https').fifthCertPassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-vmss-waap/mainTemplate.json b/azure/templates/marketplace-vmss-waap/mainTemplate.json new file mode 100755 index 00000000..bd80fffb --- /dev/null +++ b/azure/templates/marketplace-vmss-waap/mainTemplate.json @@ -0,0 +1,1039 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Deployment location" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the VM Scale Set" + } + }, + "inboundSources": { + "type": "string", + "defaultValue": "0.0.0.0/0", + "metadata": { + "description": "Specify the client IP addresses that can reach your instance. Can be IP address range in CIDR notation (e.g. for any source use 0.0.0.0/0)" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "User is set to 'admin'" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "waapAgentToken": { + "type": "securestring", + "minLength": 75, + "maxLength": 75, + "metadata": { + "description": "Infinity Next Agent Token" + } + }, + "waapAgentFog": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Fog address" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify about scaling events" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 1, + 2, + 3 + ], + "defaultValue": 2, + "metadata": { + "description": "The number of availability zones to use for the scale set. The VMs will be spread equally between the zones" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_DS2_v2", + "metadata": { + "description": "The VM size of the Security Gateway" + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "instanceCount": { + "type": "string", + "defaultValue": "2", + "metadata": { + "description": "Initial number of gateways" + } + }, + "maxInstanceCount": { + "type": "string", + "defaultValue": "10", + "metadata": { + "description": "Maximum number of gateways" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Assign public IP address to each gateway" + } + }, + "elbResourceId": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The Resource ID of the Load Balancer." + } + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The name of the new External Load Balancer's Backend Pool." + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "ELBOnly", + "ILBOnly" + ], + "defaultValue": "ELBOnly", + "metadata": { + "description": "Load Balancer deployment" + } + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP" + ], + "defaultValue": "SourceIP", + "metadata": { + "description": "The load balancing distribution method" + } + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "defaultValue": "[deployment().properties.templateLink.uri]", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + } + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Resource Group of the existing virtual network" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vnet')]", + "metadata": { + "description": "The name of the virtual network" + } + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "defaultValue": "VMSS-External", + "metadata": { + "description": "The name of the Gateway external subnet" + } + }, + "subnet1Prefix": { + "type": "string", + "defaultValue": "10.0.1.0/24", + "metadata": { + "description": "The address prefix of the Gateway external subnet. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + } + }, + "subnet2Name": { + "type": "string", + "defaultValue": "VMSS-Internal", + "metadata": { + "description": "The name of the Gateway internal subnet" + } + }, + "subnet2Prefix": { + "type": "string", + "defaultValue": "10.0.2.0/24", + "metadata": { + "description": "The address prefix of the Gateway internal subnet. Please note that the following CIDR range 172.16.0.0/12 is used by the Infinity Next Gateway for internal container communication" + } + }, + "chooseVault": { + "type": "string", + "allowedValues": [ + "none", + "newVault", + "existingVault" + ], + "defaultValue": "none", + "metadata": { + "description": "Choose an existing Azure Key Vault or create new Azure Key Vault and upload certificates. 'none' means you don't use HTTPS certificates." + } + }, + "existingKeyVaultRGName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Resource group name of the existing key vault - could be on a different resource group" + } + }, + "keyVaultName": { + "type": "string", + "minLength": 3, + "maxLength": 24, + "defaultValue": "vault", + "metadata": { + "description": "A vault's name must be between 3-24 alphanumeric characters. The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens" + } + }, + "numberOfCerts": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "defaultValue": 0, + "metadata": { + "description": "Number of certificates to upload" + } + }, + "firstCertificate": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "PFX certificate file encoded to base64 format" + } + }, + "firstCertDescription": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "It is recommended to add a description because the uploaded certificate is stored as 'cert[1-5]' in vault's secrets" + } + }, + "firstCertPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Password used when exporting the PFX certificate. The password will be encoded to base64 format and stored in the vault" + } + }, + "secondCertificate": { + "type": "securestring", + "defaultValue": "" + }, + "secondCertDescription": { + "type": "string", + "defaultValue": "" + }, + "secondCertPassword": { + "type": "securestring", + "defaultValue": "" + }, + "thirdCertificate": { + "type": "securestring", + "defaultValue": "" + }, + "thirdCertDescription": { + "type": "string", + "defaultValue": "" + }, + "thirdCertPassword": { + "type": "securestring", + "defaultValue": "" + }, + "fourthCertificate": { + "type": "securestring", + "defaultValue": "" + }, + "fourthCertDescription": { + "type": "string", + "defaultValue": "" + }, + "fourthCertPassword": { + "type": "securestring", + "defaultValue": "" + }, + "fifthCertificate": { + "type": "securestring", + "defaultValue": "" + }, + "fifthCertDescription": { + "type": "string", + "defaultValue": "" + }, + "fifthCertPassword": { + "type": "securestring", + "defaultValue": "" + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "DO NOT CHANGE" + }, + "defaultValue": "notused" + } + }, + "variables": { + "templateName": "waap_vmss", + "templateVersion": "20210922", + "location": "[parameters('location')]", + "osVersion": "R8040", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', '', '\"', '\n', 'waapAgentToken =\"', variables('waapAgentToken'), '\"', '\n', 'waapAgentFog =\"', variables('waapAgentFog'), '\"', '\n')]", + "imageOffer": "infinity-gw", + "imagePublisher": "checkpoint", + "imageSku": "infinity-img", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables('imageReferenceBYOL')]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables('planBYOL')]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "false", + "waapAgentToken": "[parameters('waapAgentToken')]", + "waapAgentFog": "[parameters('waapAgentFog')]", + "inboundSources": "[parameters('inboundSources')]", + "installationType": "waap_vmss", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "upgrading": false, + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/load-balancers-waap.json', parameters('_artifactsLocationSasToken')))]", + "lbRGName": "[resourceGroup().name]", + "lbName": "[if(equals(parameters('deploymentMode'),'ELBOnly'), 'External-lb', 'Internal-lb')]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "vnetID": "[if(equals(parameters('vnetNewOrExisting'), 'new'), resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "australiaeast", + "brazilsouth", + "canadacentral", + "centralindia", + "centralus", + "eastus", + "eastus2", + "francecentral", + "germanywestcentral", + "japaneast", + "koreacentral", + "northeurope", + "norwayeast", + "southafricanorth", + "southcentralus", + "southeastasia", + "uksouth", + "westeurope", + "westus2", + "westus3" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "vaultTags": { + "vault": "[parameters('keyVaultName')]" + }, + "isHttps": "[not(equals(parameters('chooseVault'), 'none'))]", + "vmssTags": "[if(variables('isHttps'), variables('vaultTags'), json('null'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "secretsValueArray": [ + "[parameters('firstCertificate')]", + "[parameters('firstCertPassword')]", + "[parameters('secondCertificate')]", + "[parameters('secondCertPassword')]", + "[parameters('thirdCertificate')]", + "[parameters('thirdCertPassword')]", + "[parameters('fourthCertificate')]", + "[parameters('fourthCertPassword')]", + "[parameters('fifthCertificate')]", + "[parameters('fifthCertPassword')]" + ], + "secretsNameArray": [ + "cert1", + "cert1-pw", + "cert2", + "cert2-pw", + "cert3", + "cert3-pw", + "cert4", + "cert4-pw", + "cert5", + "cert5-pw" + ], + "secretsPasswordDescription": "password", + "secretsDescriptionArray": [ + "[parameters('firstCertDescription')]", + "[variables('secretsPasswordDescription')]", + "[parameters('secondCertDescription')]", + "[variables('secretsPasswordDescription')]", + "[parameters('thirdCertDescription')]", + "[variables('secretsPasswordDescription')]", + "[parameters('fourthCertDescription')]", + "[variables('secretsPasswordDescription')]", + "[parameters('fifthCertDescription')]", + "[variables('secretsPasswordDescription')]" + ], + "numberOfSecrets": "[mul(parameters('numberOfCerts'), 2)]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-858bb8ac-3986-4499-adc5-990c43de41c2-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": false + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": false + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet1Id": { + "value": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "30443", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 110, + "direction": "Inbound" + } + }, + { + "name": "HTTPS", + "properties": { + "description": "Allow inbound HTTPS access", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 120, + "direction": "Inbound" + } + }, + { + "name": "HTTP", + "properties": { + "description": "Allow inbound HTTP access", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "80", + "sourceAddressPrefix": "[variables('inboundSources')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 130, + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2020-06-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(variables('isHttps'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]", + "[variables('nsgId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "healthProbe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), reference('loadBalancerSetup').outputs.probeName.value)]" + }, + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value, reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + } + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[reference(variables('storageAccountId'), '2021-04-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + } + }, + { + "condition": "[and(variables('isHttps'), equals(parameters('chooseVault'), 'existingVault'))]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "name": "[parameters('keyVaultName')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "resourceGroup": "[parameters('existingKeyVaultRGName')]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [ + { + "type": "Microsoft.KeyVault/vaults/accessPolicies", + "name": "[concat(parameters('keyVaultName'), '/add')]", + "apiVersion": "2021-06-01-preview", + "properties": { + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(variables('vmssID'), '2020-06-01', 'full').identity.principalId]", + "permissions": { + "secrets": [ + "get", + "list" + ], + "certificates": [ + "get", + "list" + ] + } + } + ] + } + } + ], + "outputs": {} + } + } + }, + { + "condition": "[and(variables('isHttps'), equals(parameters('chooseVault'), 'newVault'))]", + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "2021-06-01-preview", + "name": "[parameters('keyVaultName')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "location": "[variables('location')]", + "properties": { + "tenantId": "[subscription().tenantid]", + "sku": { + "family": "A", + "name": "standard" + }, + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(variables('vmssID'), '2020-06-01', 'full').identity.principalId]", + "permissions": { + "secrets": [ + "get", + "list" + ], + "certificates": [ + "get", + "list" + ] + } + } + ], + "enabledForDeployment": true, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": false, + "enableSoftDelete": true, + "enableRbacAuthorization": false, + "createMode": "default" + } + }, + { + "condition": "[and(variables('isHttps'), equals(parameters('chooseVault'), 'newVault'))]", + "type": "Microsoft.KeyVault/vaults/secrets", + "apiVersion": "2021-06-01-preview", + "name": "[concat(parameters('keyVaultName'), '/', variables('secretsNameArray')[copyIndex()])]", + "location": "[variables('location')]", + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', parameters('keyVaultName'))]" + ], + "properties": { + "value": "[if(endsWith(variables('secretsNameArray')[copyIndex()], '-pw'), base64(variables('secretsValueArray')[copyIndex()]), variables('secretsValueArray')[copyIndex()])]", + "contentType": "[variables('secretsDescriptionArray')[copyIndex()]]" + }, + "copy": { + "name": "secretscopy", + "count": "[variables('numberOfSecrets')]" + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-vmss/README.md b/azure/templates/marketplace-vmss/README.md new file mode 100644 index 00000000..3c632bf9 --- /dev/null +++ b/azure/templates/marketplace-vmss/README.md @@ -0,0 +1,23 @@ +# Check Point CloudGuard Network Security VMSS for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-vmss%2FmainTemplate.json) + + + diff --git a/azure/templates/marketplace-vmss/createUiDefinition.json b/azure/templates/marketplace-vmss/createUiDefinition.json new file mode 100644 index 00000000..6b3ebbce --- /dev/null +++ b/azure/templates/marketplace-vmss/createUiDefinition.json @@ -0,0 +1,1752 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard VMSS settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the CloudGuard Network for Azure VMSS R80.10 and Higher Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm" + } + } + }, + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "Check Point VMSS settings", + "subLabel": { + "preValidation": "Configure CloudGuard VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard VMSS settings", + "elements": [ + { + "name": "upgrading", + "type": "Microsoft.Common.OptionsGroup", + "label": "Are you upgrading your CloudGuard VMSS solution?", + "defaultValue": "No", + "toolTip": "Select 'Yes' if you are upgrading your CloudGuard VMSS solution.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "upgradeVmssInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Warning", + "text": "All the configurations below must be similar to the existing CloudGuard VMSS solution.\n\nNote that the target load balancers are the ones connected to your existing CloudGuard VMSS solution.\n\nSee the Deployment Guide for more information." + } + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maximum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "configurationTemplateInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Use a different configuration template name than in your existing CloudGuard VMSS solution." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Configuration template name", + "toolTip": "The configuration template name as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + }, + { + "name": "deploymentMode", + "type": "Microsoft.Common.DropDown", + "label": "Load balancers deployment", + "defaultValue": "Standard (External & Internal)", + "toolTip": "Defines which load balancers will be deployed. Note: For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses.", + "constraints": { + "allowedValues": [ + { + "label": "Standard (External & Internal)", + "value": "Standard" + }, + { + "label": "External only (Inbound inspection only)", + "value": "ELBOnly" + }, + { + "label": "Internal only (Outbound & E-W inspection only - see tooltip)", + "value": "ILBOnly" + } + ] + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "External Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the External Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "ilbLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "Internal Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the Internal Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ELBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the VMSS with instance level Public IP address", + "defaultValue": "No", + "toolTip": "If selected 'Yes', then each VMSS instance will have its own public IP address.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Public IP prefix", + "defaultValue": "No", + "toolTip": "Define if deploy existsing Public IP Prefix or a new Public IP Prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]" + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create new IP prefiex", + "toolTip": "Create new or existsing Public IP Prefix", + "defaultValue": "No", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').publicIPPrefix, 'yes')]" + }, + { + "name": "IPv4Length", + "type": "Microsoft.Common.DropDown", + "label": "IPv4 IP prefix length", + "defaultValue": "/31 (2 addresses)", + "toolTip": "Choose the length of the IP prefix for IP v4.", + "multiselect": false, + "selectAll": false, + "filter": false, + "multiLine": false, + "constraints": { + "allowedValues": [ + { + "label": "/28 (16 addresses)", + "value": "/28 (16 addresses)" + }, + { + "label": "/29 (8 addresses)", + "value": "/29 (8 addresses)" + }, + { + "label": "/30 (4 addresses)", + "value": "/30 (4 addresses)" + }, + { + "label": "/31 (2 addresses)", + "value": "/31 (2 addresses)" + } + ], + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixLengthWarning", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]", + "options": { + "icon": "Warning", + "text": "[concat('NOTE: The VMSS will not be allowed to contain more than ', if(equals(steps('autoprovision').IPv4Length, '/31 (2 addresses)'), '2', if(equals(steps('autoprovision').IPv4Length, '/30 (4 addresses)'), '4', if(equals(steps('autoprovision').IPv4Length, '/29 (8 addresses)'), '8', if(equals(steps('autoprovision').IPv4Length, '/28 (16 addresses)'), '16', '0')))), ' instances')]" + } + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Enter an existing IP prefix resource id", + "toolTip": "The resource id of an existing public IP prefix.", + "multiLine": false, + "constraints": { + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed.", + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'no')]" + }, + { + "name": "externalCommunicationInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').instanceLevelPublicIP, 'no'), equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "options": { + "icon": "Warning", + "text": "For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses." + } + }, + { + "name": "lbsTargetRGName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target load balancers resource group name", + "defaultValue": "", + "toolTip": "The name of the Target Load Balancers Resource Group.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Group only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "Target external load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target External Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "Target external load balancer's backend pool name", + "toolTip": "The name of the target external load Balancer's Backend Pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "ilbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Target internal load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target Internal Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "ilbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Target internal load balancer's backend pool name", + "toolTip": "The name of the target internal load balancer's backend pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "mgmtInterfaceOpt1", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC and with public or private IP.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's public IP address", + "value": "eth0-public" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtInterfaceOpt2", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'no')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtIPaddress", + "type": "Microsoft.Common.TextBox", + "label": "Management Server IP address", + "toolTip": "The IP address used to manage the VMSS instances.", + "visible": "[or(equals(steps('autoprovision').mgmtInterfaceOpt1, 'eth0-private'), equals(steps('autoprovision').mgmtInterfaceOpt2, 'eth0-private'))]", + "constraints": { + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "required": true, + "validationMessage": "Please enter a valid IP address" + } + }, + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "None", + "toolTip": "The number of avalability zones to use for the scale set. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "None", + "value": 0 + }, + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + } + ] + }, + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R81.10", + "value": "R81.10" + }, + { + "label": "R81.20", + "value": "R81.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8110vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8110vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8110vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8110", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8120vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8120", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "MaintenanceModeInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(bool(basics('auth').password), not(contains('R81.10', steps('chkp').cloudGuardVersion)))]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting a maintenance-mode password for recovery purposes." + } + }, + { + "visible": "[not(contains('R81.10', steps('chkp').cloudGuardVersion))]", + "name": "EnableMaintenanceMode", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Maintenance Mode", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM maintenance mode.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "visible": "[and(not(contains('R81.10', steps('chkp').cloudGuardVersion)), steps('chkp').EnableMaintenanceMode)]", + "name": "MaintenanceModePassword", + "type": "Microsoft.Common.PasswordBox", + "defaultValue": "", + "toolTip": "To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here.", + "label": { + "password": "Maintenance Mode password hash", + "confirmPassword": "Confirm Password" + }, + "constraints": { + "required": true, + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R81.10' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R81.10' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + }, + "visible": "[not(contains('R81.10 R81.20', steps('chkp').cloudGuardVersion))]" + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS Frontend subnet", + "defaultValue": { + "name": "VMSS-Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + }, + "subnet2": { + "label": "VMSS Backend subnet", + "defaultValue": { + "name": "VMSS-Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayScaleSetNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Function App", + "Microsoft.Storage/storageAccounts", + "Microsoft.Compute/virtualMachineScaleSets", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/loadBalancers" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "upgrading": "[steps('autoprovision').upgrading]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "managementServer": "[steps('autoprovision').managementServer]", + "configurationTemplate": "[steps('autoprovision').configurationTemplate]", + "adminEmail": "[steps('autoprovision').adminEmail]", + "deploymentMode": "[steps('autoprovision').deploymentMode]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "lbsTargetRGName": "[steps('autoprovision').lbsTargetRGName]", + "elbResourceId": "[steps('autoprovision').elbResourceId]", + "elbTargetBEAddressPoolName": "[steps('autoprovision').elbBEAddressPoolName]", + "ilbResourceId": "[steps('autoprovision').ilbResourceId]", + "ilbTargetBEAddressPoolName": "[steps('autoprovision').ilbBEAddressPoolName]", + "mgmtInterfaceOpt1": "[steps('autoprovision').mgmtInterfaceOpt1]", + "mgmtInterfaceOpt2": "[steps('autoprovision').mgmtInterfaceOpt2]", + "mgmtIPaddress": "[steps('autoprovision').mgmtIPaddress]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "ilbLoadDistribution": "[steps('autoprovision').ilbLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "customMetrics": "[steps('autoprovision').customMetrics]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "floatingIP": "[steps('autoprovision').floatingIP]", + "IPv4Length": "[steps('autoprovision').IPv4Length]", + "publicIPPrefix": "[steps('autoprovision').publicIPPrefix]", + "createNewIPPrefix": "[steps('autoprovision').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('autoprovision').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" + } + } +} \ No newline at end of file diff --git a/azure/templates/marketplace-vmss/mainTemplate.json b/azure/templates/marketplace-vmss/mainTemplate.json new file mode 100644 index 00000000..0dd69d8d --- /dev/null +++ b/azure/templates/marketplace-vmss/mainTemplate.json @@ -0,0 +1,1323 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "MaintenanceModePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Maintenance mode password hash, relevant only for R81.20 and higher versions" + } + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user in upgrading the CloudGuard VMSS solution" + } + }, + "floatingIP": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "publicIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Use public IP prefix." + } + }, + "createNewIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Create new IP prefix or use an existing one." + } + }, + "IPv4Length": { + "type": "string", + "defaultValue": "/31 (2 addresses)", + "allowedValues": [ + "/28 (16 addresses)", + "/29 (8 addresses)", + "/30 (4 addresses)", + "/31 (2 addresses)" + ], + "metadata": { + "description": "Choose the IP prefix length for IP v4." + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix." + }, + "defaultValue": "" + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB), not relevant for R81.20 and below" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "resourceGroupName": "[resourceGroup().name]", + "templateName": "vmss-v2", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "subnet2Name": "[parameters('subnet2Name')]", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "additionalDiskSizeGB": "[if(contains('R8110 R8120', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", + "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "vmss", + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "lbsTargetRGName": "[parameters('lbsTargetRGName')]", + "lbRGName": "[if(variables('upgrading'), variables('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), variables('resourceGroupName'), parameters('virtualNetworkExistingRGName'))]", + "vnetID": "[if(variables('deployNewVnet'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "IPv4Lengths": { + "/28 (16 addresses)": "28", + "/29 (8 addresses)": "29", + "/30 (4 addresses)": "30", + "/31 (2 addresses)": "31" + }, + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), json('null'))]", + "ipPrefixId": "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixNewName'))]", + "publicIPPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipPrefixId'), json('null'))]", + "usePublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPropertiesWithPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15, + "PublicIpPrefix": { + "Id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usePublicIPPrefix'), json('null'))]" + } + } + }, + "publicIPPropertiesWithoutPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "publicIPPrefixLength": "[variables('IPv4Lengths')[parameters('IPv4Length')]]", + "useIpPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPropertiesWithPrefix'), variables('publicIPPropertiesWithoutPrefix'))]", + "NewNsgReference": { + "id": "[resourceId(variables('vnetRGName'),'Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicipprefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[variables('publicIPPrefixLength')]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicipprefixes'), parameters('tagsByResource')['Microsoft.Network/publicipprefixes'], json('{}')) ]" + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2021-07-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Id": { + "value": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), variables('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "floatingIp": { + "value": "[variables('enableFloatingIP')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[union(variables('vmssTags'),if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachineScaleSets'), parameters('tagsByResource')['Microsoft.Compute/virtualMachineScaleSets'], json('{}')))]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('useIpPrefix'), json('null'))]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2021-04-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Insights/autoscaleSettings'), parameters('tagsByResource')['Microsoft.Insights/autoscaleSettings'], json('{}')) ]" + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/CreateUIDefinition.MultiVm.json b/azure/templates/nestedtemplates/CreateUIDefinition.MultiVm.json new file mode 100644 index 00000000..80610b97 --- /dev/null +++ b/azure/templates/nestedtemplates/CreateUIDefinition.MultiVm.json @@ -0,0 +1 @@ +{"$schema":"http://json-schema.org/schema#","id":"https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#","type":"object","properties":{"handler":{"type":"string","enum":["Microsoft.Compute.MultiVm"]},"version":{"type":"string","enum":["0.1.2-preview"]},"parameters":{"type":"object","properties":{"basics":{"type":"array","items":{"$ref":"CreateUIDefinition.CommonControl.json#"}},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"subLabel":{"type":"object","properties":{"preValidation":{"type":"string"},"postValidation":{"type":"string"}},"additionalProperties":false,"required":["preValidation","postValidation"]},"bladeTitle":{"type":"string"},"bladeSubtitle":{"type":"string"},"elements":{"type":"array","items":{"$ref":"CreateUIDefinition.ProviderControl.json#"}}},"additionalProperties":false,"required":["name","label","subLabel","bladeTitle","elements"]}},"outputs":{"type":"object","additionalProperties":true}},"additionalProperties":false,"required":["basics","steps","outputs"]}},"required":["handler","version","parameters"]} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/azure-func-sami.json b/azure/templates/nestedtemplates/azure-func-sami.json new file mode 100755 index 00000000..04ed9cae --- /dev/null +++ b/azure/templates/nestedtemplates/azure-func-sami.json @@ -0,0 +1,240 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "The name of the azure function." + } + }, + "appName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The name of the azure function." + } + }, + "location": { + "type": "string" + }, + "vmssResourceGroupName": { + "type": "string", + "metadata": { + "description": "VMSS resource group name" + } + }, + "vmssName": { + "type": "string", + "metadata": { + "description": "VMSS name" + } + }, + "dnsZoneRecordSetName": { + "type": "string", + "metadata": { + "description": "DNS Zone Record Set name" + } + }, + "numberOfRecordSetEntries": { + "type": "string", + "metadata": { + "description": "Number of records in the DNS Zone Record Set" + } + }, + "dnsZoneResourceId": { + "type": "string", + "metadata": { + "description": "Number of records in the DNS Zone Record Set" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "containerName": { + "type": "string", + "defaultValue": "azure-function" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "dnsZoneName": "[last(split(parameters('dnsZoneResourceId'), '/'))]", + "functionAppName": "[parameters('appName')]", + "hostingPlanName": "[concat('ASP-',parameters('appName'),'-', substring(uniqueString(variables('resourceGroup').id),0,4))]", + "storageAccountName": "[substring(concat('azurefunction',uniqueString(variables('resourceGroup').id)),0,21)]", + "applicationInsightsName": "[parameters('appName')]", + "Reader": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", + "functionAppId": "[resourceId('Microsoft.Web/sites', parameters('appName'))]", + "workspaceName": "[concat('workspace-',parameters('appName'))]", + "workspaceId" : "[resourceId('Microsoft.OperationalInsights/workspaces', concat('workspace-',parameters('appName')))]" + }, + "resources": [ + { + "type": "Microsoft.OperationalInsights/workspaces", + "name": "[variables('workspaceName')]", + "apiVersion": "2021-06-01", + "location": "[parameters('location')]", + "properties": { + "sku": { + "name": "pergb2018" + }, + "features": { + "searchVersion": 1, + "legacy": 0, + "enableLogAccessUsingOnlyResourcePermissions": "true" + } + } + }, + { + "apiVersion": "2021-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('Reader')]", + "principalId": "[reference(variables('functionAppId'), '2021-03-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]", + "PrincipalType": "ServicePrincipal" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/sites/', variables('functionAppName'))]" + ] + }, + { + "apiVersion": "2021-02-01", + "name": "[variables('functionAppName')]", + "type": "Microsoft.Web/sites", + "kind": "functionapp,linux", + "location": "[parameters('location')]", + "identity": { + "type": "SystemAssigned" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "properties": { + "siteConfig": { + "appSettings": [ + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~3" + }, + { + "name": "FUNCTIONS_WORKER_RUNTIME", + "value": "python" + }, + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('storageAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2021-06-01').keys[0].value,';EndpointSuffix=', environment().suffixes.storage)]" + }, + { + "name": "WEBSITE_RUN_FROM_PACKAGE", + "value": "" + }, + { + "name": "APPINSIGHTS_INSTRUMENTATIONKEY", + "value": "[reference(resourceId('microsoft.insights/components/', variables('applicationInsightsName')), '2020-02-02').InstrumentationKey]" + }, + { + "name": "APPLICATIONINSIGHTS_CONNECTION_STRING", + "value": "[reference(resourceId('microsoft.insights/components/', variables('applicationInsightsName')), '2020-02-02').ConnectionString]" + }, + { + "name": "SUBSCRIPTION_ID", + "value": "[parameters('subscriptionId')]" + }, + { + "name": "VMSS_RESOURCE_GROUP_NAME", + "value": "[parameters('vmssResourceGroupName')]" + }, + { + "name": "VMSS_NAME", + "value": "[parameters('vmssName')]" + }, + { + "name": "DNS_ZONE_SUBSCRIPTION_ID", + "value": "[reference(parameters('dnsZoneResourceId'),'2018-05-01','Full').subscriptionId]" + }, + { + "name": "DNS_ZONE_RESOURCE_GROUP_NAME", + "value": "[reference(parameters('dnsZoneResourceId'),'2018-05-01','Full').resourceGroupName]" + }, + { + "name": "DNS_ZONE_NAME", + "value": "[variables('dnsZoneName')]" + }, + { + "name": "DNS_ZONE_RECORD_SET_NAME", + "value": "[parameters('dnsZoneRecordSetName')]" + }, + { + "name": "NUMBER_OF_RECORD_SET_ENTRIES", + "value": "[parameters('numberOfRecordSetEntries')]" + } + ], + "linuxFxVersion": "Python|3.7" + }, + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", + "reserved": true + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Function App'), parameters('tagsByResource')['Function App'], json('{}')) ]" + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2021-02-01", + "name": "[variables('hostingPlanName')]", + "location": "[parameters('location')]", + "sku": { + "name": "S1", + "tier": "Standard", + "size": "S1", + "family": "S", + "capacity": 1 + }, + "kind": "linux", + "properties": { + "reserved": true + } + }, + { + "apiVersion": "2021-06-01", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "properties": { + "allowBlobPublicAccess": false + }, + "resources": [ + { + "type": "blobServices/containers", + "apiVersion": "2021-06-01", + "name": "[concat('default/', parameters('containerName'))]", + "dependsOn": [ + "[variables('storageAccountName')]" + ] + } + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Function App'), parameters('tagsByResource')['Function App'], json('{}')) ]" + }, + { + "apiVersion": "2020-02-02", + "name": "[variables('functionAppName')]", + "type": "microsoft.insights/components", + "location": "[parameters('location')]", + "properties": { + "Application_Type": "web", + "Request_Source": "IbizaWebAppExtensionCreate", + "WorkspaceResourceId": "[variables('workspaceId')]" + } + } + ] +} diff --git a/azure/templates/nestedtemplates/existing-nsg-RoleAssignment.json b/azure/templates/nestedtemplates/existing-nsg-RoleAssignment.json new file mode 100755 index 00000000..f87d2fac --- /dev/null +++ b/azure/templates/nestedtemplates/existing-nsg-RoleAssignment.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "vmName": { + "type": "string" + }, + "roleDefinitionId": { + "type": "string", + "defaultValue": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]" + }, + "principalId1": { + "type": "string" + }, + "principalId2": { + "type": "string" + }, + "index": { + "type": "int" + } + }, + "resources": [ + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2022-04-01", + "scope": "[concat('Microsoft.Network/networkSecurityGroups/', parameters('ExistingNSG').name)]", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), parameters('principalId1'), '1', '-nsg', parameters('index')))]", + "properties": { + "roleDefinitionId": "[parameters('roleDefinitionId')]", + "principalId": "[parameters('principalId1')]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2022-04-01", + "scope": "[concat('Microsoft.Network/networkSecurityGroups/', parameters('ExistingNSG').name)]", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), parameters('principalId1'), '2', '-nsg', parameters('index')))]", + "properties": { + "roleDefinitionId": "[parameters('roleDefinitionId')]", + "principalId": "[parameters('principalId2')]" + } + } + ] +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/gateway-load-balancers.json b/azure/templates/nestedtemplates/gateway-load-balancers.json new file mode 100755 index 00000000..88b7348a --- /dev/null +++ b/azure/templates/nestedtemplates/gateway-load-balancers.json @@ -0,0 +1,153 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "Subnet1StartAddress": { + "type": "string" + }, + "subnet1Id": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "lbResourceId": { + "type": "string" + }, + "lbTargetBEAddressPoolName": { + "type": "string" + }, + "vxlanTunnelExternalPort": { + "type": "int" + }, + "vxlanTunnelExternalIdentifier": { + "type": "int" + }, + "vxlanTunnelInternalPort": { + "type": "int" + }, + "vxlanTunnelInternalIdentifier": { + "type": "int" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appFEName": "[variables('appName')]", + "lbName": "gateway-lb", + "lbID": "[if(parameters('upgrading'), parameters('lBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('lbName')))]", + "lbBEAddressPool": "[concat(variables('lbName'), '-pool')]", + "lbBEAddressPoolName": "[if(parameters('upgrading'), parameters('lbTargetBEAddressPoolName'), variables('lbBEAddressPool'))]", + "appProbeName": "[variables('appName')]", + "appHealthProtocol": "tcp", + "lbHealthPort": 8117, + "GatewayLBPrivateIPAddress": "[parameters('Subnet1StartAddress')]", + "lbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBEAddressPoolName'))]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[not(parameters('upgrading'))]", + "apiVersion": "2020-08-01", + "name": "[variables('lbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Gateway" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('GatewayLBPrivateIPAddress')]", + "subnet": { + "id": "[parameters('subnet1Id')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('lbBEAddressPool')]", + "properties": { + "tunnelInterfaces": [ + { + "port": "[parameters('vxlanTunnelExternalPort')]", + "Identifier": "[parameters('vxlanTunnelExternalIdentifier')]", + "Protocol": "VxLan", + "Type": "External" + }, + { + "port": "[parameters('vxlanTunnelInternalPort')]", + "Identifier": "[parameters('vxlanTunnelInternalIdentifier')]", + "Protocol": "VxLan", + "Type": "Internal" + } + ] + } + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('lbName'), variables('appFEName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('lbName'), variables('lbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('lbName'), variables('appProbeName'))]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + } + ], + "outputs": { + "lbId": { + "value": "[variables('lbId')]", + "type": "string" + }, + "lbBEAddressPoolProperties": { + "value": "[variables('lbBEAddressPoolProperties')]", + "type": "array" + } + } +} diff --git a/azure/templates/nestedtemplates/load-balancers-waap.json b/azure/templates/nestedtemplates/load-balancers-waap.json new file mode 100755 index 00000000..6d6e3a42 --- /dev/null +++ b/azure/templates/nestedtemplates/load-balancers-waap.json @@ -0,0 +1,285 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentMode": { + "type": "string" + }, + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "subnet1Id": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "elbResourceId": { + "type": "string" + }, + "elbTargetBEAddressPoolName": { + "type": "string" + }, + "ilbResourceId": { + "type": "string" + }, + "ilbTargetBEAddressPoolName": { + "type": "string" + } + }, + "variables": { + "deployELB": "[equals(parameters('deploymentMode'),'ELBOnly')]", + "deployILB": "[equals(parameters('deploymentMode'),'ILBOnly')]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "appAddressId": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]", + "appFEName": "[variables('appName')]", + "elbName": "External-lb", + "ilbName": "Internal-lb", + "elbID": "[if(parameters('upgrading'), parameters('elBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('elbName')))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolName": "[if(parameters('upgrading'), parameters('elbTargetBEAddressPoolName'), variables('elbBEAddressPool'))]", + "appFrontEndProtocol": "tcp", + "appHealthProtocol": "tcp", + "lbHealthPort": 8117, + "ilbID": "[if(parameters('upgrading'), parameters('ilbResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('ilbName')))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolName": "[if(parameters('upgrading'), parameters('ilbTargetBEAddressPoolName'), variables('ilbBEAddressPool'))]", + "ilbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + } + ], + "elbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('appAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('elbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[variables('appAddressId')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[concat(parameters('vmName'), '80')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('elbName'), variables('appFEName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('elbName'), variables('elbName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": 80, + "backendPort": 80, + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + }, + { + "name": "[concat(parameters('vmName'), '443')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('elbName'), variables('appFEName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('elbName'), variables('elbName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": 443, + "backendPort": 443, + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('elbName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployILB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('ilbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[parameters('subnet1ID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[concat(parameters('vmName'), '80')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('ilbName'), variables('ilbName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('ilbName'), variables('ilbName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": 80, + "backendPort": 80, + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + }, + { + "name": "[concat(parameters('vmName'), '443')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('ilbName'), variables('ilbName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('ilbName'), variables('ilbName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": 443, + "backendPort": 443, + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "appAddressId": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName')), '')]", + "type": "string" + }, + "elbId": { + "value": "[if(variables('deployELB'), variables('elbId'), '')]", + "type": "string" + }, + "probeName": { + "value": "[if(variables('deployELB'), variables('elbName'), variables('ilbName'))]", + "type": "string" + }, + "appHealthProtocol": { + "value": "[variables('appHealthProtocol')]", + "type": "string" + }, + "lbHealthPort": { + "value": "[variables('lbHealthPort')]", + "type": "int" + }, + "ilbId": { + "value": "[if(variables('deployILB'), variables('ilbId'), '')]", + "type": "string" + }, + "ilbBEAddressPoolProperties": { + "value": "[variables('ilbBEAddressPoolProperties')]", + "type": "array" + }, + "elbBEAddressPoolProperties": { + "value": "[variables('elbBEAddressPoolProperties')]", + "type": "array" + }, + "ApplicationAddress": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').IpAddress, 'no public ip')]", + "type": "string" + }, + "ApplicationFQDN": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').dnsSettings.fqdn, 'no public ip')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/load-balancers.json b/azure/templates/nestedtemplates/load-balancers.json new file mode 100644 index 00000000..dcdf0ae0 --- /dev/null +++ b/azure/templates/nestedtemplates/load-balancers.json @@ -0,0 +1,259 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentMode": { + "type": "string" + }, + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "Subnet2StartAddress": { + "type": "string" + }, + "subnet2Id": { + "type": "string" + }, + "floatingIP": { + "type": "bool" + }, + "ilbLoadDistribution": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "elbResourceId": { + "type": "string" + }, + "elbTargetBEAddressPoolName": { + "type": "string" + }, + "ilbResourceId": { + "type": "string" + }, + "ilbTargetBEAddressPoolName": { + "type": "string" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "deployELB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ELBOnly'))]", + "deployILB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ILBOnly'))]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "appAddressId": "[resourceId(variables('resourceGroup').name, 'Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]", + "appFEName": "[variables('appName')]", + "elbName": "frontend-lb", + "elbID": "[if(parameters('upgrading'), parameters('elBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('elbName')))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolName": "[if(parameters('upgrading'), parameters('elbTargetBEAddressPoolName'), variables('elbBEAddressPool'))]", + "appProbeName": "[variables('appName')]", + "appFrontEndProtocol": "tcp", + "appFrontEndPort": 80, + "appBackEndPort": 8081, + "appHealthProtocol": "tcp", + "ilbHealthProtocol": "tcp", + "lbHealthPort": 8117, + "ilbName": "['backend-lb']", + "ilbID": "[if(parameters('upgrading'), parameters('ilbResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('ilbName')))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "ilbBEAddressPoolName": "[if(parameters('upgrading'), parameters('ilbTargetBEAddressPoolName'), variables('ilbBEAddressPool'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + } + ], + "elbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('appAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('elbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[variables('appAddressId')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[resourceId(variables('resourceGroup').name, 'Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('elbName'), variables('appFEName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('elbName'), variables('appProbeName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": "[variables('appFrontEndPort')]", + "backendPort": "[variables('appBackEndPort')]", + "enableFloatingIP": "[parameters('floatingIP')]", + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployILB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('ilbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[parameters('subnet2ID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('ilbName'), variables('ilbName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('ilbName'), variables('ilbProbeName'))]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "[parameters('ilbLoadDistribution')]", + "enableFloatingIP": "[parameters('floatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "[variables('ilbHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + } + ], + "outputs": { + "appAddressId": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName')), '')]", + "type": "string" + }, + "elbId": { + "value": "[if(variables('deployELB'), variables('elbId'), '')]", + "type": "string" + }, + "ilbId": { + "value": "[if(variables('deployILB'), variables('ilbId'), '')]", + "type": "string" + }, + "ilbBEAddressPoolProperties": { + "value": "[variables('ilbBEAddressPoolProperties')]", + "type": "array" + }, + "elbBEAddressPoolProperties": { + "value": "[variables('elbBEAddressPoolProperties')]", + "type": "array" + }, + "ApplicationAddress": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').IpAddress, 'no public ip')]", + "type": "string" + }, + "ApplicationFQDN": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').dnsSettings.fqdn, 'no public ip')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/storageAccount-existing.json b/azure/templates/nestedtemplates/storageAccount-existing.json new file mode 100644 index 00000000..21ff090b --- /dev/null +++ b/azure/templates/nestedtemplates/storageAccount-existing.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string", + "metadata": { + "Description": "The name of the new storage account created to store the VMs disks" + } + }, + "storageAccountType": { + "type": "string", + "metadata": { + "Description": "The type of the Storage Account created" + }, + "defaultValue": "Premium_LRS" + }, + "apiVersion": { + "type": "string" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "resources": [] +} diff --git a/azure/templates/nestedtemplates/storageAccount-new.json b/azure/templates/nestedtemplates/storageAccount-new.json new file mode 100644 index 00000000..51820aac --- /dev/null +++ b/azure/templates/nestedtemplates/storageAccount-new.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string", + "metadata": { + "Description": "The name of the new storage account created to store the VMs disks" + } + }, + "storageAccountType": { + "type": "string", + "metadata": { + "Description": "The type of the Storage Account created" + }, + "defaultValue": "Premium_LRS" + }, + "apiVersion": { + "type": "string" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('storageAccountName')]", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + } + ] +} diff --git a/azure/templates/nestedtemplates/vnet-1-subnet-existing.json b/azure/templates/nestedtemplates/vnet-1-subnet-existing.json new file mode 100644 index 00000000..81fc0d5a --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-1-subnet-existing.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'), '-nsg')]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes[0]]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-1-subnet-new.json b/azure/templates/nestedtemplates/vnet-1-subnet-new.json new file mode 100644 index 00000000..974068a9 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-1-subnet-new.json @@ -0,0 +1,167 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'), '-nsg')]" + }, + "deployRouteTable": { + "type": "bool", + "defaultValue": false + }, + "deployGWLB": { + "type": "bool", + "defaultValue": false + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-VNet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "None" + } + } + ], + "routesArray": "[variables('localSubnetRoute')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + }, + "routeTableID": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "routeTableProperties": { + "id": "[variables('routeTableID')]" + }, + "deployGWLB": "[parameters('deployGWLB')]", + "vnetProperties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": "[if(and(parameters('deployRouteTable'), variables('deployGWLB')), variables('routeTableProperties'), json('null'))]" + } + } + ] + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "condition": "[and(parameters('deployRouteTable'), variables('deployGWLB'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[variables('routeTableID')]" + ], + "properties": "[variables('vnetProperties')]", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha-existing.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha-existing.json new file mode 100644 index 00000000..7e466c8b --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha-existing.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha-new.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha-new.json new file mode 100644 index 00000000..ba4eb32c --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha-new.json @@ -0,0 +1,200 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray":"[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json new file mode 100644 index 00000000..17781d8c --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNSG')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes]", + "type": "array" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json new file mode 100644 index 00000000..be5ae374 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json @@ -0,0 +1,192 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg", + "metadata": { + "description": "Name of the network security group" + } + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('Subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray":"[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNSG')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('Subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('Subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('Subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('Subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]" + } + } + }, + { + "name": "[parameters('Subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('Subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]", + "type": "array" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-4-subnet-existing.json b/azure/templates/nestedtemplates/vnet-4-subnet-existing.json new file mode 100644 index 00000000..78169894 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-4-subnet-existing.json @@ -0,0 +1,137 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "Subnet3Name": { + "type": "string", + "metadata": { + "description": "The name of the 3rd subnet" + }, + "defaultValue": "Internal2" + }, + "Subnet3Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 3rd subnet" + }, + "defaultValue": "10.0.3.0/24" + }, + "Subnet3StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 3rd subnet" + } + }, + "Subnet4Name": { + "type": "string", + "metadata": { + "description": "The name of the 3rd subnet" + }, + "defaultValue": "Internal3" + }, + "Subnet4Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 4th subnet" + }, + "defaultValue": "10.0.4.0/24" + }, + "Subnet4StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 4th subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-4-subnet-new.json b/azure/templates/nestedtemplates/vnet-4-subnet-new.json new file mode 100644 index 00000000..14f8bad5 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-4-subnet-new.json @@ -0,0 +1,322 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "Subnet3Name": { + "type": "string", + "metadata": { + "description": "The name of the 3rd subnet" + }, + "defaultValue": "Internal2" + }, + "Subnet3Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 3rd subnet" + }, + "defaultValue": "10.0.3.0/24" + }, + "Subnet3StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 3rd subnet" + } + }, + "Subnet4Name": { + "type": "string", + "metadata": { + "description": "The name of the 3rd subnet" + }, + "defaultValue": "Internal3" + }, + "Subnet4Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 4th subnet" + }, + "defaultValue": "10.0.4.0/24" + }, + "Subnet4StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 4th subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "Inside-Vnet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + }, + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet3Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet3Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "Inside-Vnet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet3StartAddress')]" + } + }, + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet3StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet4Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet4Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "Inside-Vnet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet4StartAddress')]" + } + }, + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet4StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet3Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet4Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + }, + { + "name": "[parameters('subnet3Name')]", + "properties": { + "addressPrefix": "[parameters('subnet3Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet3Name'))]" + } + } + }, + { + "name": "[parameters('subnet4Name')]", + "properties": { + "addressPrefix": "[parameters('subnet4Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet4Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-existing-no-rt.json b/azure/templates/nestedtemplates/vnet-existing-no-rt.json new file mode 100644 index 00000000..a71283fc --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-existing-no-rt.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Web" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-existing-stack-ha.json b/azure/templates/nestedtemplates/vnet-existing-stack-ha.json new file mode 100644 index 00000000..6d7eaf7f --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-existing-stack-ha.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-existing-stack-mgmt.json b/azure/templates/nestedtemplates/vnet-existing-stack-mgmt.json new file mode 100644 index 00000000..fd9b75d1 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-existing-stack-mgmt.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-existing-stack.json b/azure/templates/nestedtemplates/vnet-existing-stack.json new file mode 100644 index 00000000..967e485d --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-existing-stack.json @@ -0,0 +1,95 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-existing.json b/azure/templates/nestedtemplates/vnet-existing.json new file mode 100644 index 00000000..415f5361 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-existing.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes[0]]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-new-no-rt.json b/azure/templates/nestedtemplates/vnet-new-no-rt.json new file mode 100644 index 00000000..837d88ba --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-new-no-rt.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-new-stack-ha.json b/azure/templates/nestedtemplates/vnet-new-stack-ha.json new file mode 100644 index 00000000..f941bb4c --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-new-stack-ha.json @@ -0,0 +1,141 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-new-stack-mgmt.json b/azure/templates/nestedtemplates/vnet-new-stack-mgmt.json new file mode 100644 index 00000000..e443a759 --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-new-stack-mgmt.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-new-stack.json b/azure/templates/nestedtemplates/vnet-new-stack.json new file mode 100644 index 00000000..731bd0be --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-new-stack.json @@ -0,0 +1,165 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/azure/templates/nestedtemplates/vnet-new.json b/azure/templates/nestedtemplates/vnet-new.json new file mode 100644 index 00000000..4c57eacd --- /dev/null +++ b/azure/templates/nestedtemplates/vnet-new.json @@ -0,0 +1,196 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]", + "type": "string" + } + } +} diff --git a/azure/templates/single-ipv6/README.md b/azure/templates/single-ipv6/README.md new file mode 100755 index 00000000..57e098d6 --- /dev/null +++ b/azure/templates/single-ipv6/README.md @@ -0,0 +1,10 @@ +# IPv6 support for CloudGuard IaaS in Azure +Azure's IPv6 connectivity makes it easy to provide dual stack (IPv4/IPv6) Internet connectivity for applications hosted in Azure. +It allows for simple deployment of VMs with load balanced IPv6 connectivity for both inbound and outbound initiated connections. + +Follow [sk170760](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk170760) instruction to deploy dual stack (IPv4/IPv6) CloudGuard IaaS Security Gateway in Azure. + + + Deploy to Azure + + diff --git a/azure/templates/single-ipv6/mainTemplate.json b/azure/templates/single-ipv6/mainTemplate.json new file mode 100755 index 00000000..3ef03349 --- /dev/null +++ b/azure/templates/single-ipv6/mainTemplate.json @@ -0,0 +1,1038 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "virtualNetworkIpv6AddressPrefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the virtual network" + }, + "defaultValue": "ace:cab:deca::/48" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.0.0/24" + }, + "Subnet1Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 1st subnet" + }, + "defaultValue": "ace:cab:deca:deed::/64" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.0.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 2nd subnet" + }, + "defaultValue": "ace:cab:deca:deee::/64" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "ipv6Gateway", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "vnetv4AddressRange": "[parameters('virtualNetworkAddressPrefix')]", + "vnetv6AddressRange": "[parameters('virtualNetworkIPv6AddressPrefix')]", + "subnetv4AddressRange": "[parameters('Subnet1Prefix')]", + "subnet2v4AddressRange": "[parameters('Subnet2Prefix')]", + "subnetv6AddressRange": "[parameters('Subnet1IPv6Prefix')]", + "subnet2v6AddressRange": "[parameters('Subnet2IPv6Prefix')]", + "virtualNetworkName": "[parameters('virtualNetworkName')]", + "subnetName": "[parameters('Subnet1Name')]", + "subnet2Name": "[parameters('Subnet2Name')]", + "templateName": "singleIpv6", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "installationType": "[parameters('installationType')]", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageSku": "sg-byol", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-14dc7680-7a2f-483c-b3ec-2c0cfae477aa", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v4", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v6", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "publicIPAddressVersion": "IPv6" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "name": "loadBalancer", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v4')]", + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', 'lbpublicip-v4')]" + } + } + }, + { + "name": "LB-v6", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LBBAP-v4" + }, + { + "name": "LBBAP-v6" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'loadBalancer', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'loadBalancer', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "lb-rule-v4" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'loadBalancer', 'LB-v6')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v6')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'loadBalancer', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443 + }, + "name": "lb-rule-v6" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[and(parameters('deployNewNSG'),equals(parameters('vnetNewOrExisting'), 'new'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "apiVersion": "2021-05-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "dhcpOptions": { + "dnsServers": [ + "cafe:43::", + "cafe:45::" + ] + }, + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetv4AddressRange')]", + "[variables('vnetv6AddressRange')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefixes": [ + "[variables('subnetv4AddressRange')]", + "[variables('subnetv6AddressRange')]" + ] + } + }, + { + "name": "[variables('subnet2Name')]", + "properties": { + "addressPrefixes": [ + "[variables('subnet2v4AddressRange')]", + "[variables('subnet2v6AddressRange')]" + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-05-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','loadBalancer')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig-v4", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "privateIPAddressVersion": "IPv4", + "primary": true, + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v4')]" + } + ] + } + }, + { + "name": "ipconfig-v6", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "privateIPAddressVersion": "IPv6", + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v6')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','loadBalancer')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig-v4", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + }, + { + "name": "ipconfig-v6", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "privateIPAddressVersion": "IPv6", + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "UserData": "[base64(variables('customData'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ] +} \ No newline at end of file diff --git a/azure/templates/vmss-ipv6/README.md b/azure/templates/vmss-ipv6/README.md new file mode 100755 index 00000000..6fbc5c3c --- /dev/null +++ b/azure/templates/vmss-ipv6/README.md @@ -0,0 +1,9 @@ +# IPv6 support for CloudGuard IaaS in Azure +Azure's IPv6 connectivity makes it easy to provide dual stack (IPv4/IPv6) Internet connectivity for applications hosted in Azure. +It allows for simple deployment of VMs with load balanced IPv6 connectivity for both inbound and outbound initiated connections. + +Follow [sk170760](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk170760) instruction to deploy CloudGuard IaaS virtual machine scale sets with IPv6 in Azure. + + + Deploy to Azure + diff --git a/azure/templates/vmss-ipv6/mainTemplate.json b/azure/templates/vmss-ipv6/mainTemplate.json new file mode 100755 index 00000000..4c0f3b0a --- /dev/null +++ b/azure/templates/vmss-ipv6/mainTemplate.json @@ -0,0 +1,1367 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)", + "R81.20 - Bring Your Own License", + "R81.20 - Pay As You Go (NGTP)", + "R81.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "virtualNetworkIpv6AddressPrefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the virtual network" + }, + "defaultValue": "ace:cab:deca::/48" + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 1st subnet" + }, + "defaultValue": "ace:cab:deca:deed::/64" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 2nd subnet" + }, + "defaultValue": "ace:cab:deca:deee::/64" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIpAddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB), not relevant for R81.20 and below" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue": false + }, + "storageAccountAdditionalIps": { + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue": [] + } + }, + "variables": { + "vnetv4AddressRange": "[parameters('virtualNetworkAddressPrefix')]", + "vnetv6AddressRange": "[parameters('virtualNetworkIPv6AddressPrefix')]", + "subnetv4AddressRange": "[parameters('Subnet1Prefix')]", + "subnet2v4AddressRange": "[parameters('Subnet2Prefix')]", + "subnetv6AddressRange": "[parameters('Subnet1IPv6Prefix')]", + "subnet2v6AddressRange": "[parameters('Subnet2IPv6Prefix')]", + "virtualNetworkName": "[parameters('virtualNetworkName')]", + "subnetName": "[parameters('Subnet1Name')]", + "subnet2Name": "[parameters('Subnet2Name')]", + "resourceGroup": "[resourceGroup()]", + "templateName": "vmss-v2", + "templateVersion": "20240716", + "location": "[parameters('location')]", + "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", + "VMSSFrontend": "VMSS-Frontend", + "VMSSBackend": "VMSS-Backend", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX", + "R81.20 - Bring Your Own License": "BYOL", + "R81.20 - Pay As You Go (NGTP)": "NGTP", + "R81.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110", + "R81.20 - Bring Your Own License": "R8120", + "R81.20 - Pay As You Go (NGTP)": "R8120", + "R81.20 - Pay As You Go (NGTX)": "R8120" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "southeastasia": [ + "20.205.69.28", + "20.195.85.180" + ], + "australiacentral": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiacentral2": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiaeast": [ + "20.53.53.224", + "20.70.222.112" + ], + "australiasoutheast": [ + "20.53.53.224", + "20.70.222.112" + ], + "brazilsouth": [ + "91.234.136.63", + "20.206.0.194" + ], + "brazilsoutheast": [ + "91.234.136.63", + "20.206.0.194" + ], + "canadacentral": [ + "52.228.86.177", + "52.242.40.90" + ], + "canadaeast": [ + "52.228.86.177", + "52.242.40.90" + ], + "northeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "westeurope": [ + "52.146.139.220", + "20.105.209.72" + ], + "francecentral": [ + "20.111.0.244", + "52.136.191.10" + ], + "francesouth": [ + "20.111.0.244", + "52.136.191.10" + ], + "germanynorth": [ + "51.116.75.88", + "20.52.95.48" + ], + "germanywestcentral": [ + "51.116.75.88", + "20.52.95.48" + ], + "centralindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "southindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "westindia": [ + "20.192.168.150", + "20.192.153.104" + ], + "japaneast": [ + "20.43.70.205", + "20.189.228.222" + ], + "japanwest": [ + "20.43.70.205", + "20.189.228.222" + ], + "koreacentral": [ + "20.200.196.96", + "52.147.119.29" + ], + "koreasouth": [ + "20.200.196.96", + "52.147.119.29" + ], + "norwaywest": [ + "20.100.1.184", + "51.13.138.76" + ], + "norwayeast": [ + "20.100.1.184", + "51.13.138.76" + ], + "switzerlandnorth": [ + "20.208.4.98", + "51.107.251.190" + ], + "switzerlandwest": [ + "20.208.4.98", + "51.107.251.190" + ], + "uaecentral": [ + "20.45.95.66", + "20.38.141.5" + ], + "uaenorth": [ + "20.45.95.66", + "20.38.141.5" + ], + "uksouth": [ + "20.90.132.144", + "20.58.68.62" + ], + "ukwest": [ + "20.90.132.144", + "20.58.68.62" + ], + "swedencentral": [ + "51.12.72.223", + "51.12.22.174" + ], + "swedensouth": [ + "51.12.72.223", + "51.12.22.174" + ], + "centralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "northcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "southcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus2": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus3": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westcentralus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "westus": [ + "20.98.146.84", + "20.98.194.64", + "20.69.5.162", + "20.83.222.102" + ], + "eastus2euap": [ + "20.45.242.18", + "20.51.21.252" + ], + "centraluseuap": [ + "20.45.242.18", + "20.51.21.252" + ] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps": "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "additionalDiskSizeGB": "[if(contains('R8110 R8120', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", + "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "vmss", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "azureFunctionSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/azure-func-sami.json', parameters('_artifactsLocationSasToken')))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIpAddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "dnsZoneResourceId": "[parameters('dnsZoneResourceId')]", + "dnsZoneRecordSetName": "[parameters('dnsZoneRecordSetName')]", + "numberOfRecordSetEntries": "20", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "NewNsgReference": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]" + } + }, + "resources": [ + { + "apiVersion": "2021-01-01", + "name": "pid-23952014-097a-4aed-ade6-0d4b5c278517", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v4", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v6", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "publicIPAddressVersion": "IPv6" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "name": "frontend-lb", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v4')]", + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', 'lbpublicip-v4')]" + } + } + }, + { + "name": "LB-v6", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "frontend-LBBAP-v4" + }, + { + "name": "frontend-LBBAP-v6" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'frontend-lb', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'frontend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "frontend-lb-rule-v4" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'frontend-lb', 'LB-v6')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v6')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'frontend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443 + }, + "name": "frontend-lb-rule-v6" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "apiVersion": "2021-01-01", + "name": "backend-lb", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "backend-LBBAP-v4" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'backend-lb', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'backend-lb', 'backend-LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'backend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "backend-lb-rule-v4" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('VMSSBackend')]", + "apiVersion": "2021-03-01", + "location": "[parameters('location')]", + "properties": { + "disableBgpRoutePropagation": false, + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('VMSSFrontend')]", + "apiVersion": "2021-03-01", + "location": "[parameters('location')]", + "properties": { + "disableBgpRoutePropagation": false, + "routes": [ + { + "name": "Local-Subnet-v6", + "properties": { + "addressPrefix": "[parameters('Subnet1IPv6Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "Local-Subnet-v4", + "properties": { + "addressPrefix": "[variables('subnetv4AddressRange')]", + "nextHopType": "VnetLocal" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "apiVersion": "2021-03-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', variables('VMSSFrontend'))]", + "[resourceId('Microsoft.Network/routeTables', variables('VMSSBackend'))]" + ], + "properties": { + "dhcpOptions": { + "dnsServers": [ + "cafe:43::", + "cafe:45::" + ] + }, + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetv4AddressRange')]", + "[variables('vnetv6AddressRange')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefixes": [ + "[variables('subnetv4AddressRange')]", + "[variables('subnetv6AddressRange')]" + ], + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', variables('VMSSFrontend'))]" + } + } + }, + { + "name": "[variables('subnet2Name')]", + "properties": { + "addressPrefixes": [ + "[variables('subnet2v4AddressRange')]", + "[variables('subnet2v6AddressRange')]" + ], + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', variables('VMSSBackend'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2021-03-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-01-01", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": { + "value": "[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2021-07-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[and(parameters('deployNewNSG'),equals(parameters('vnetNewOrExisting'), 'new'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[union(variables('vmssTags'),if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachineScaleSets'), parameters('tagsByResource')['Microsoft.Compute/virtualMachineScaleSets'], json('{}')))]", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','frontend-lb')]", + "[resourceId('Microsoft.Network/loadBalancers','backend-lb')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), split(parameters('virtualNetworkAddressPrefix'), '.')[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "storageProfile": { + "osDisk": { + "diskSizeGB": "[variables('diskSizeGB')]", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), split(parameters('virtualNetworkAddressPrefix'), '.')[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1IPV6", + "properties": { + "primary": true, + "subnet": { + "id": "[variables('subnet-id')]" + }, + "privateIPAddressVersion": "IPv6", + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v6')]" + } + ] + } + }, + { + "name": "ipconfig1", + "properties": { + "primary": false, + "privateIPAddressVersion": "IPv4", + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v4')]" + } + ] + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2IPV6", + "properties": { + "primary": true, + "subnet": { + "id": "[variables('subnet2-id')]" + }, + "privateIPAddressVersion": "IPv6" + } + }, + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2021-06-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Insights/autoscaleSettings'), parameters('tagsByResource')['Microsoft.Insights/autoscaleSettings'], json('{}')) ]" + } + ] +} \ No newline at end of file diff --git a/azure/templates/vwan-managed-app/README.md b/azure/templates/vwan-managed-app/README.md new file mode 100644 index 00000000..293238e2 --- /dev/null +++ b/azure/templates/vwan-managed-app/README.md @@ -0,0 +1,85 @@ +# Check Point CloudGuard Network Security for Azure Virtual WAN + + +Microsoft Azure Virtual WAN is a networking service that enables customers to easily establish optimized large-scale branch connectivity with Azure and the Microsoft global network, providing automated branch-to-branch connectivity. + + +## Image version +To retrieve the image version, perform an API GET call using the following URLs: + +For Security Enforcement (NGTP) license: +``` +https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSkus/checkpoint?api-version=2023-05-01 +``` + +For Full Package (NGTX + S1C) license: +``` +https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSkus/checkpoint-ngtx?api-version=2023-05-01 +``` + +For Full Package Premium (NGTX + S1C++) license: +``` +https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSkus/checkpoint-premium?api-version=2023-05-01 +``` + + +## Output example: +``` +{ + "etag": "00000000-0000-0000-0000-000000000000", + "name": "checkpoint", + "properties": { + "availableScaleUnits": [ + { + "instanceCount": "2", + "scaleUnit": "10" + }, + { + "instanceCount": "2", + "scaleUnit": "20" + }, + { + "instanceCount": "2", + "scaleUnit": "2" + }, + { + "instanceCount": "3", + "scaleUnit": "30" + }, + { + "instanceCount": "3", + "scaleUnit": "40" + }, + { + "instanceCount": "2", + "scaleUnit": "4" + }, + { + "instanceCount": "4", + "scaleUnit": "60" + }, + { + "instanceCount": "5", + "scaleUnit": "80" + } + ], + "availableVersions": [ + "8110.900335.1522", + "8120.900631.1522", + "latest" + ], + "marketPlaceLink": "https://aka.ms/Checkpointmarketplace", + "provisioningState": "Succeeded", + "vendor": "checkpoint" + } +} +``` + +From the output, extract the desired image from the "availableVersions" section (e.g., "8120.900631.1433") + +Note: Do not use "latest" + + + + Deploy to Azure + diff --git a/azure/templates/vwan-managed-app/mainTemplate.json b/azure/templates/vwan-managed-app/mainTemplate.json new file mode 100644 index 00000000..5b733a83 --- /dev/null +++ b/azure/templates/vwan-managed-app/mainTemplate.json @@ -0,0 +1,284 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "hubId": { + "type": "String", + "metadata": { + "description": "The Virtual Wan Hub ID. To get the Hub ID, go to your hub, click on JSON view on the right side, and copy the ID field" + } + }, + "tags": { + "defaultValue": {}, + "type": "Object" + }, + "LicenseType": { + "defaultValue": "Security Enforcement (NGTP)", + "allowedValues": [ + "Security Enforcement (NGTP)", + "Full Package (NGTX + S1C)", + "Full Package Premium (NGTX + S1C++)" + ], + "type": "String", + "metadata": { + "description": "License type of Check Point CloudGuard" + } + }, + "imageVersion": { + "defaultValue": "8120.900631.1594", + "type": "String", + "metadata": { + "description": "The image version that will be used to deploy the solution. To get the image version, make API call to https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSkus/checkpoint?api-version=2023-05-01" + } + }, + "osVersion": { + "defaultValue": "R8120", + "allowedValues": [ + "R8110", + "R8120" + ], + "type": "String", + "metadata": { + "description": "GAIA OS version" + } + }, + "scaleUnit": { + "defaultValue": "2", + "allowedValues": [ + "2", + "4", + "10", + "20", + "30", + "40", + "60", + "80" + ], + "type": "String", + "metadata": { + "description": "The scale unit size to deploy" + } + }, + "bootstrapScript": { + "defaultValue": "", + "type": "String", + "metadata": { + "description": "Bootstrap script" + } + }, + "adminShell": { + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "type": "String", + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "SecureString", + "metadata": { + "description": "One-time key for Secure Internal Communication" + } + }, + "sshPublicKey": { + "type": "SecureString", + "metadata": { + "description": "Paste an OpenSSH public key. You can generate a key pair using SSH-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + } + }, + "BGP": { + "defaultValue": "64512", + "type": "String", + "metadata": { + "description": "BGP ASN to peer with Azure Route Service" + } + }, + "NVAName": { + "type": "String", + "metadata": { + "description": "NVA name to deploy in the hub" + } + }, + "customMetrics": { + "defaultValue": "yes", + "allowedValues": [ + "no", + "yes" + ], + "type": "String", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "hubASN": { + "type": "Int", + "metadata": { + "description": "ASN from the Hub. To get the Hub ASN, go to your hub, click the JSON view on the right and copy the virtualRouterAsn field" + } + }, + "hubPeers": { + "type": "Array", + "metadata": { + "description": "An array of IP addresses obtained from the Hub object. To get the Hub Peers, go to your hub, click the JSON view on the right and copy the virtualRouterIps field. for example:[\"10.10.32.5\",\"10.10.32.4\"]" + } + }, + "smart1CloudTokenA": { + "defaultValue": "", + "type": "SecureString" + }, + "smart1CloudTokenB": { + "defaultValue": "", + "type": "SecureString" + }, + "smart1CloudTokenC": { + "defaultValue": "", + "type": "SecureString" + }, + "smart1CloudTokenD": { + "defaultValue": "", + "type": "SecureString" + }, + "smart1CloudTokenE": { + "defaultValue": "", + "type": "SecureString" + }, + "applicationResourceName": { + "type": "String" + }, + "managedResourceGroupName": { + "type": "String", + "metadata": { + "description": "Managed app resource group Name" + } + }, + "publicIPIngress": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Use public IP for ingress traffic" + } + }, + "createNewIPIngress": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Create new public IP" + } + }, + "ipIngressExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the public IP" + }, + "defaultValue": "" + } + }, + "variables": { + "managedResourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('managedResourceGroupName'))]" + }, + "resources": [ + { + "type": "Microsoft.Solutions/applications", + "apiVersion": "2021-07-01", + "name": "[parameters('applicationResourceName')]", + "location": "[resourceGroup().location]", + "kind": "MarketPlace", + "plan": { + "name": "vwan-app", + "product": "cp-vwan-managed-app", + "publisher": "checkpoint", + "version": "1.0.14" + }, + "properties": { + "managedResourceGroupId": "[variables('managedResourceGroupId')]", + "parameters": { + "hubId": { + "value": "[parameters('hubId')]" + }, + "tags": { + "value": "[parameters('tags')]" + }, + "imageVersion": { + "value": "[parameters('imageVersion')]" + }, + "osVersion": { + "value": "[parameters('osVersion')]" + }, + "LicenseType": { + "value": "[parameters('LicenseType')]" + }, + "scaleUnit": { + "value": "[parameters('scaleUnit')]" + }, + "bootstrapScript": { + "value": "[parameters('bootstrapScript')]" + }, + "adminShell": { + "value": "[parameters('adminShell')]" + }, + "sicKey": { + "value": "[parameters('sicKey')]" + }, + "sshPublicKey": { + "value": "[parameters('sshPublicKey')]" + }, + "BGP": { + "value": "[parameters('BGP')]" + }, + "NVA": { + "value": "[parameters('NVAName')]" + }, + "customMetrics": { + "value": "[parameters('customMetrics')]" + }, + "location": { + "value": "[resourceGroup().location]" + }, + "hubASN": { + "value": "[parameters('hubASN')]" + }, + "hubPeers": { + "value": "[parameters('hubPeers')]" + }, + "smart1CloudTokenA": { + "value": "[parameters('smart1CloudTokenA')]" + }, + "smart1CloudTokenB": { + "value": "[parameters('smart1CloudTokenB')]" + }, + "smart1CloudTokenC": { + "value": "[parameters('smart1CloudTokenC')]" + }, + "smart1CloudTokenD": { + "value": "[parameters('smart1CloudTokenD')]" + }, + "smart1CloudTokenE": { + "value": "[parameters('smart1CloudTokenE')]" + }, + "publicIPIngress": { + "value": "[parameters('publicIPIngress')]" + }, + "createNewIPIngress": { + "value": "[parameters('createNewIPIngress')]" + }, + "ipIngressExistingResourceId": { + "value": "[parameters('ipIngressExistingResourceId')]" + } + } + } + } + ] + } diff --git a/common/central_license_debug_collector.sh b/common/central_license_debug_collector.sh new file mode 100755 index 00000000..cd3e3509 --- /dev/null +++ b/common/central_license_debug_collector.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +# The script collects Central Licenses debug files for troubleshooting purposes. + +# Instructions : + # If you have MDS environment and uses license in domain mode - please run the script with -d + # If your environment acceseses the internet using a configured proxy - please run the script with -p + # Otherwise , run the script directly . + +# Written by: Check Point Software Technologies LTD. +# For additional information please refer to CloudGuard Network Central License Tool Administration Guide. + + +# Licenses_Collector - version 5 + +usage() +{ + echo "Usage: `basename $0` [-p IP_or_HostName:port] [-d domain] [-h]" + echo "output_file: Will be a tar.gz file" + echo "proxy: To be used when checking connectivity with usercenter only" + echo "domain: To be used only on MDS environment. The domain name taken from 'mdsstat'" +} + +while getopts "p:d:h" opt; do + case "$opt" in + d) + DOMAIN_NAME="$OPTARG" + ;; + p) + PROXY_PORT="$OPTARG" + ;; + h) + usage + exit 0 + ;; + *) + usage + exit 1 + esac +done + + +BASEPATH=$VSECDIR +TMPPATH=$BASEPATH/tmp +OUTPUTFILE_NAME=vsec___data.tar +CURL_CLI=curl_cli +USERCENTER=https://usercenter.CheckPoint.com + +log_msg() +{ + echo "$(date) $1" +} + +log_msg "Starting" +log_msg " Creating $TMPPATH" +\rm -rf $TMPPATH +mkdir -p $TMPPATH + +if [ -n "$DOMAIN_NAME" ]; then + log_msg " switch to domain env" + . $MDSDIR/scripts/MDSprofile.sh && mdsenv "$DOMAIN_NAME" +fi + +# checking if there's connectivity with userCenter and if TCP port 18208 is open +log_msg " Checking if TCP port 18208 is open and accessible" +printf " Checking TCP port \n\n" >> $TMPPATH/Sync +netstat -na | grep "18208" >> $TMPPATH/Sync +printf "\n\n" >> $TMPPATH/Sync + + +printf " Checking connecitivty with userCenter\n\n" >> $TMPPATH/Sync + +if [ -n "$PROXY_PORT" ]; then + log_msg " Checking connecitivty with userCenter using proxy" + $CURL_CLI --proxy $PROXY_PORT -v -k $USERCENTER &>> $TMPPATH/Sync +else + log_msg " Checking connecitivty with userCenter without using proxy" + $CURL_CLI -v -k $USERCENTER &>> $TMPPATH/Sync +fi + +printf "the exit code is : %s\n" $? >> $TMPPATH/Sync + +# Collect server logs (cpm.elg*) data +log_msg " Copying $MDS_FWDIR/log/cpm.elg* into $TMPPATH" +cp $MDS_FWDIR/log/cpm.elg* $TMPPATH + +if [ -f "$MDS_FWDIR/log/alignLicensesInDB.elg" ]; then + log_msg " Copying $MDS_FWDIR/log/alignLicensesInDB.elg into $TMPPATH" + cp $MDS_FWDIR/log/alignLicensesInDB.elg $TMPPATH +fi + +#Collect client logs (vseclic.elg*) data +log_msg " Copying $MDS_FWDIR/log/vseclic.elg* into $TMPPATH" +cp $MDS_FWDIR/log/vseclic.elg* $TMPPATH + +# Collect licenses data from DB +log_msg " Collecting licenses with cprlic into $TMPPATH" +cprlic print -all -x -a >> $TMPPATH/attached_licenses + +log_msg " Collecting vsec view into $TMPPATH" +vsec_lic_cli view >> $TMPPATH/view_licenses.txt + +log_msg " Collecting management licenses into $TMPPATH" +cplic print -n -x >> $TMPPATH/management_licenses.txt + +log_msg " Collecting licensepool_data DB into $TMPPATH" +psql_client cpm postgres -c "select * from licensePool_data;" >> $TMPPATH/licensePoolData.txt + +log_msg " Collecting GatewayLicenses_data DB into $TMPPATH" +psql_client cpm postgres -c "select * from GatewayLicenses_data;" >> $TMPPATH/gatewayLicensesData.txt + +log_msg " Compressing $TMPPATH into $OUTPUTFILE_NAME" +tar -cvf $OUTPUTFILE_NAME $TMPPATH > /dev/null 2>&1 + +log_msg " Cleaning up $TMPPATH" +rm -rf $TMPPATH + +log_msg " Done. $OUTPUTFILE_NAME is ready" diff --git a/common/cme_api_postman/CME_API.postman_collection b/common/cme_api_postman/CME_API.postman_collection new file mode 100644 index 00000000..d1af79cc --- /dev/null +++ b/common/cme_api_postman/CME_API.postman_collection @@ -0,0 +1,3255 @@ +{ + "info": { + "_postman_id": "2c69ec16-0fde-440c-90df-1503f55cfca1", + "name": "cme_api", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "28214663" + }, + "item": [ + { + "name": "Session Management", + "item": [ + { + "name": "login", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "try {\r", + " var sid = JSON.parse(responseBody).sid;\r", + " postman.setEnvironmentVariable(\"session\", sid);\r", + " tests[\"login session-id = \" + sid] = true;\r", + "} catch (e) {}" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"user\": \"PLEASE ENTER USERNAME\", //\"admin\"\r\n \"password\": \"PLEASE ENTER PASSWORD\" //\"123456\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/login", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "login" + ] + }, + "description": "Login request to receive session token." + }, + "response": [] + }, + { + "name": "login to last session", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "try {\r", + " var sid = JSON.parse(responseBody).sid;\r", + " postman.setEnvironmentVariable(\"session\", sid);\r", + " tests[\"login session-id = \" + sid] = true;\r", + "} catch (e) {}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"user\": \"\",\r\n \"password\": \"\",\r\n \"continue-last-session\": true\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/login", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "login" + ] + }, + "description": "Login to the last session" + }, + "response": [] + }, + { + "name": "login to system domain", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "try {\r", + " var sid = JSON.parse(responseBody).sid;\r", + " postman.setEnvironmentVariable(\"session\", sid);\r", + " tests[\"login session-id = \" + sid] = true;\r", + "} catch (e) {}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"user\": \"\",\r\n \"password\": \"\",\r\n \"domain\": \"System Data\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/login", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "login" + ] + }, + "description": "Login to system domain" + }, + "response": [] + }, + { + "name": "login with API key", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "try {\r", + " var sid = JSON.parse(responseBody).sid;\r", + " postman.setEnvironmentVariable(\"session\", sid);\r", + " tests[\"login session-id = \" + sid] = true;\r", + "} catch (e) {}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\"api-key\" : \"\"}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/login", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "login" + ] + }, + "description": "Login with API key without user and password." + }, + "response": [] + }, + { + "name": "publish", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{ }" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.7/publish", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.7", + "publish" + ] + }, + "description": "Publish the last changes. Use the show-task command to check the progress of the task." + }, + "response": [] + }, + { + "name": "discard", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{ }" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/discard", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "discard" + ] + }, + "description": "Discard the changes" + }, + "response": [] + }, + { + "name": "logout", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{ }" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/logout", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "logout" + ] + }, + "description": "Log out from the existing session" + }, + "response": [] + }, + { + "name": "disconnect", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"uid\": \"\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/disconnect", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "disconnect" + ] + }, + "description": "Disconnect a private session" + }, + "response": [] + }, + { + "name": "keepalive", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{ }" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/keepalive", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "keepalive" + ] + }, + "description": "Keep the session alive" + }, + "response": [] + }, + { + "name": "revert-to-revision", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"to-session\": \"\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/revert-to-revision", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "revert-to-revision" + ] + }, + "description": "Revert the Management Database to the selected revision." + }, + "response": [] + }, + { + "name": "verify-revert", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"to-session\": \"\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/verify-revert", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "verify-revert" + ] + }, + "description": "Verify the Management Database can revert to the selected revision." + }, + "response": [] + }, + { + "name": "add-repository-script", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "try {\r", + " var sid = JSON.parse(responseBody).sid;\r", + " postman.setEnvironmentVariable(\"session\", sid);\r", + " tests[\"login session-id = \" + sid] = true;\r", + "} catch (e) {}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER SCRIPT'S NAME\", //\"repo_script\"\r\n \"script-body\": \"PLEASE ENTER SCRIPT'S CONTENT\" //\"#!/bin/bash clish -c lock database override clish -c set static-route 10.24.2.0/32 nexthop gateway address 10.24.0.0 on clish -c save config\"\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.9/add-repository-script", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.9", + "add-repository-script" + ] + }, + "description": "Add repository script to the script repository." + }, + "response": [] + } + ] + }, + { + "name": "v1", + "item": [ + { + "name": "GCP", + "item": [ + { + "name": "POST add GCP account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"account_name\"\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIAL FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\" // 3\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIAL FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\" // 3\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "gcp", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add GCP gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"gcpGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\" //\"gcp-account\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n }\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "gcp", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in GCP cloud." + }, + { + "name": "AWS", + "item": [ + { + "name": "POST add AWS account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAwsAccount\"\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "aws", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add AWS gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"awsGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": \"PLEASE ENTER TGW STATIC ROUTES\", //\"10.0.0.0/16,10.100.0.0/16\"\r\n \"tgw_spoke_routes\": \"PLEASE ENTER TGW SPOKE ROUTES\" //\"192.168.100.0/24,192.168.200.0/24\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": [\r\n \"10.0.0.0/16\",\r\n \"10.100.0.0/16\"\r\n ],\r\n \"tgw_spoke_routes\": [\r\n \"192.168.100.0/24\",\r\n \"192.168.200.0/24\"\r\n ]\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "aws", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in AWS cloud." + }, + { + "name": "Gw Configurations", + "item": [ + { + "name": "GET all gw configurations", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations" + ] + } + }, + "response": [] + }, + { + "name": "GET gw configuration", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE gw configuration", + "request": { + "method": "DELETE", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Gw Configurations in CME
(Previously known as \"templates\")." + }, + { + "name": "Accounts", + "item": [ + { + "name": "GET all accounts", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts" + ] + } + }, + "response": [] + }, + { + "name": "GET account", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE account", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "{{server}}/v1.8/cme-api/v1/accounts/", + "host": [ + "{{server}}" + ], + "path": [ + "v1.8", + "cme-api", + "v1", + "accounts", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Accounts in CME
(Previously known as \"controllers\")." + }, + { + "name": "Management", + "item": [ + { + "name": "GET management", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "management" + ] + } + }, + "response": [] + }, + { + "name": "PUT set management", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER MANAGEMENT NAME\" // \"mgmt_name\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "management" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Management." + }, + { + "name": "Azure", + "item": [ + { + "name": "POST Azure account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAzureAccount\"\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\" // 3\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{server}}/v1.8/cme-api/v1/accounts/azure", + "host": [ + "{{server}}" + ], + "path": [ + "v1.8", + "cme-api", + "v1", + "accounts", + "azure" + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\" // 3\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/accounts/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "accounts", + "azure", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add Azure gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"azureGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"identity-awareness\": true,\r\n \"application-control\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\" //\"azure-account\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/azure", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "azure" + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"identity-awareness\": false,\r\n \"anti-virus\": true,\r\n \"https-inspection\": true\r\n }\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/gwConfigurations/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "gwConfigurations", + "azure", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in Azure cloud." + }, + { + "name": "CME General Configuration", + "item": [ + { + "name": "GET delayCycle", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "PUT set delayCycle", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"delay_cycle\": \"PLEASE ENTER DELAY CYCLE\" // 20 \r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "GET cmeVersion", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1/generalConfiguration/cmeVersion", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1", + "generalConfiguration", + "cmeVersion" + ] + } + }, + "response": [] + } + ], + "description": "Operations for general CME configurations." + } + ] + }, + { + "name": "v1.1", + "item": [ + { + "name": "GCP", + "item": [ + { + "name": "POST add GCP account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"account_name\"\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"credentials_data\": \"PLEASE ENTER CREDENTIALS DATA\", //\"ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAibXktcHJvamVj...\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME (OPTIONAL IN MDS)\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"credentials_data\": \"PLEASE ENTER CREDENTIALS DATA\", //\"ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAibXktcHJvamVj...\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME (OPTIONAL IN MDS)\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "gcp", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add GCP gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"gcpGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"vpn\": true,\r\n \"url-filtering\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"gcp-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"vpn\": true,\r\n \"url-filtering\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"gcp-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "gcp", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in GCP cloud." + }, + { + "name": "AWS", + "item": [ + { + "name": "POST add AWS account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAwsAccount\"\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "aws", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add AWS gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"awsGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": \"PLEASE ENTER TGW STATIC ROUTES\", //\"10.0.0.0/16,10.100.0.0/16\"\r\n \"tgw_spoke_routes\": \"PLEASE ENTER TGW SPOKE ROUTES\", //\"192.168.100.0/24,192.168.200.0/24\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": [\r\n \"10.0.0.0/16\",\r\n \"10.100.0.0/16\"\r\n ],\r\n \"tgw_spoke_routes\": [\r\n \"192.168.100.0/24\",\r\n \"192.168.200.0/24\"\r\n ],\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "aws", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in AWS cloud." + }, + { + "name": "Gw Configurations", + "item": [ + { + "name": "GET all gw configurations", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations" + ] + } + }, + "response": [] + }, + { + "name": "GET gw configuration", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE gw configuration", + "request": { + "method": "DELETE", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Gw Configurations in CME
(Previously known as \"templates\")." + }, + { + "name": "Accounts", + "item": [ + { + "name": "GET all accounts", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts" + ] + } + }, + "response": [] + }, + { + "name": "GET account", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE account", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Accounts in CME
(Previously known as \"controllers\")." + }, + { + "name": "Management", + "item": [ + { + "name": "GET management", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "management" + ] + } + }, + "response": [] + }, + { + "name": "PUT set management", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER MANAGEMENT NAME\", //\"mgmt_name\"\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\" //\"myDomain\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "management" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Management." + }, + { + "name": "Azure", + "item": [ + { + "name": "POST Azure account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAzureAccount\"\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/azure", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "azure" + ], + "query": [ + { + "key": "", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/accounts/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "accounts", + "azure", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add Azure gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"azureGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"identity-awareness\": true,\r\n \"application-control\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"azure-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/azure", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "azure" + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"blades\": {\r\n \"identity-awareness\": false,\r\n \"https-inspection\": true,\r\n \"anti-virus\": true\r\n },\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" //\"[\"ALM1\", \"ALM_2\"]\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/gwConfigurations/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "gwConfigurations", + "azure", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in Azure cloud." + }, + { + "name": "CME General Configuration", + "item": [ + { + "name": "GET delayCycle", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "PUT set delayCycle", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"delay_cycle\": \"PLEASE ENTER DELAY CYCLE\" // 20 \r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "GET cmeVersion", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/generalConfiguration/cmeVersion", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "generalConfiguration", + "cmeVersion" + ] + } + }, + "response": [] + }, + { + "name": "GET api-versions", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.1/api-versions", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.1", + "api-versions" + ] + } + }, + "response": [] + } + ], + "description": "Operations for general CME configurations." + } + ] + }, + { + "name": "v1.2", + "item": [ + { + "name": "GCP", + "item": [ + { + "name": "POST add GCP account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"account_name\"\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"credentials_data\": \"PLEASE ENTER CREDENTIALS DATA\", //\"ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAibXktcHJvamVj...\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME (OPTIONAL IN MDS)\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"project_id\": \"PLEASE ENTER PROJECT ID\", //\"gcp_project_id\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"GCP_credentials_file_name\"\r\n \"credentials_data\": \"PLEASE ENTER CREDENTIALS DATA\", //\"ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAibXktcHJvamVj...\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME (OPTIONAL IN MDS)\" //\"myDomain\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "gcp", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add GCP gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"gcpGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"vpn\": true,\r\n \"url-filtering\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"gcp-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\", //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/gcp", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "gcp" + ] + } + }, + "response": [] + }, + { + "name": "PUT set GCP gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"vpn\": true,\r\n \"url-filtering\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"gcp-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\", //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/gcp/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "gcp", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in GCP cloud." + }, + { + "name": "AWS", + "item": [ + { + "name": "POST add AWS account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAwsAccount\"\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"regions\": [\r\n \"eu-west-1\",\r\n \"us-east-2\"\r\n ],\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"credentials_file\": \"PLEASE ENTER CREDENTIALS FILE NAME\", //\"IAM\"\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\",\r\n \"scan_gateways\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_vpn\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_load_balancers\": \"PLEASE SET TRUE OR FALSE\",\r\n \"scan_subnets\": \"PLEASE SET TRUE OR FALSE\",\r\n \"communities\": [\r\n \"community_a\",\r\n \"community_b\"\r\n ],\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\",\r\n \"sub_accounts\": [\r\n {\r\n \"name\": \"sub_account_a\",\r\n \"credentials_file\": \"AWS_credentials_file_name\"\r\n },\r\n {\r\n \"name\": \"sub_account_b\",\r\n \"access_key\": \"PLEASE ENTER ACCESS KEY\",\r\n \"secret_key\": \"PLEASE ENTER SECRET KEY\"\r\n },\r\n {\r\n \"name\": \"sub_account_c\",\r\n \"sts_role\": \"PLEASE ENTER STS ROLE\",\r\n \"sts_external_id\": \"PLEASE ENTER STS EXTERNAL ID\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "aws", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add AWS gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"awsGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": \"PLEASE ENTER TGW STATIC ROUTES\", //\"10.0.0.0/16,10.100.0.0/16\"\r\n \"tgw_spoke_routes\": \"PLEASE ENTER TGW SPOKE ROUTES\", //\"192.168.100.0/24,192.168.200.0/24\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\", //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/aws", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "aws" + ] + } + }, + "response": [] + }, + { + "name": "PUT set AWS gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"ips\": true,\r\n \"anti-bot\": true,\r\n \"url-filtering\": true,\r\n \"https-inspection\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"aws-account\"\r\n \"vpn_domain\": \"PLEASE ENTER VPN DOMAIN\",\r\n \"vpn_community\": \"PLEASE ENTER VPN COMMUNITY\",\r\n \"deployment_type\": \"PLEASE ENTER DEPLOYMENT TYPE\", //\"TGW\"\r\n \"tgw_static_routes\": [\r\n \"10.0.0.0/16\",\r\n \"10.100.0.0/16\"\r\n ],\r\n \"tgw_spoke_routes\": [\r\n \"192.168.100.0/24\",\r\n \"192.168.200.0/24\"\r\n ],\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\" , //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/aws/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "aws", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in AWS cloud." + }, + { + "name": "Azure", + "item": [ + { + "name": "POST Azure account", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER ACCOUNT NAME\", //\"myAzureAccount\"\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"environment\": \"PLEASE ENTER THE AZURE ENVIRONMENT\" //\"AzureCloud\",\"AzureChinaCloud\",\"AzureUSGovernment\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/azure", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "azure" + ], + "query": [ + { + "key": "", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure account", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"subscription\": \"PLEASE ENTER SUBSCRIPTION\", //\"aaaa-aaaa-aaaa-aaaa-aaaa\"\r\n \"directory_id\": \"PLEASE ENTER DIRECTORY ID\", //\"bbbb-bbbb-bbbb-bbbb-bbbb\"\r\n \"application_id\": \"PLEASE ENTER APPLICATION ID\", //\"cccc-cccc-cccc-cccc-cccc\"\r\n \"client_secret\": \"PLEASE ENTER CLIENT SECRET\", //\"mySecret\"\r\n \"deletion_tolerance\": \"PLEASE ENTER DELETION TOLERANCE\", // 3\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\", //\"myDomain\"\r\n \"environment\": \"PLEASE ENTER THE AZURE ENVIRONMENT\" //\"AzureCloud\",\"AzureChinaCloud\",\"AzureUSGovernment\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "azure", + "" + ] + } + }, + "response": [] + }, + { + "name": "POST add Azure gw configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER GATEWAY CONFIGURATION NAME\", //\"azureGwConfiguration\"\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"ipv6\": \"PLEASE ENTER BOLEAN VALUE FOR IPV6\", //true / false\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"identity-awareness\": true,\r\n \"application-control\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"azure-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\", //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/azure", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "azure" + ] + } + }, + "response": [] + }, + { + "name": "PUT set Azure gw configuration", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"base64_sic_key\": \"PLEASE ENTER ENCODED BASE64 SIC KEY\", //\"MTIzNDU2Nzg=\"\r\n \"version\": \"PLEASE ENTER GATEWAY VERSION\", //\"R81.20\"\r\n \"policy\": \"PLEASE ENTER POLICY NAME\", //\"Standard\"\r\n \"ipv6\": \"PLEASE ENTER BOLEAN VALUE FOR IPV6\", //true / false\r\n \"section_name\": \"PLEASE ENTER SECTION NAME\", //\"sectionName\"\r\n \"x_forwarded_for\": \"PLEASE ENTER BOOLEAN VALUE FOR X FORWARDED FOR\", //true / false\r\n \"color\": \"PLEASE ENTER COLOR NAME\", //\"red\"\r\n \"blades\": {\r\n \"identity-awareness\": false,\r\n \"https-inspection\": true,\r\n \"anti-virus\": true\r\n },\r\n \"related_account\": \"PLEASE ENTER RELATED ACCOUNT\", //\"azure-account\"\r\n \"repository_gateway_scripts\": [\r\n {\r\n \"name\": \"PLEASE ENTER REPOSITORY GATEWAY SCRIPT NAME\", //\"repo_script\"\r\n \"parameters\": \"PLEASE ENTEAR PARAMETERS SEPARATED BY SPACE\" //\"param1 param2\"\r\n\r\n }\r\n ],\r\n \"send_logs_to_server\": \"PLEASE ENTER PRIMARY LOG SERVERS NAMES\", //\"[\"PLM1\", \"PLM_2\"]\"\r\n \"send_logs_to_backup_server\": \"PLEASE ENTER BACKUP LOG SERVERS NAMES\", //\"[\"BLM1\", \"BLM_2\"]\"\r\n \"send_alerts_to_server\": \"PLEASE ENTER ALERTS SERVERS NAMES\", //\"[\"ALM1\", \"ALM_2\"]\"\r\n \"communication_with_servers_behind_nat\": \"PLEASE ENTER MANAGEMENT BEHIND NAT CONFIGURATION\" // \"according-to-topology | original-ip-only | translated-ip-only | use-management-settings\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/azure/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "azure", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations in Azure cloud." + }, + { + "name": "Gw Configurations", + "item": [ + { + "name": "GET all gw configurations", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations" + ] + } + }, + "response": [] + }, + { + "name": "GET gw configuration", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE gw configuration", + "request": { + "method": "DELETE", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/gwConfigurations/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "gwConfigurations", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Gw Configurations in CME
(Previously known as \"templates\")." + }, + { + "name": "Accounts", + "item": [ + { + "name": "GET all accounts", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts" + ] + } + }, + "response": [] + }, + { + "name": "GET account", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "" + ] + } + }, + "response": [] + }, + { + "name": "DELETE account", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/accounts/", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "accounts", + "" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Accounts in CME
(Previously known as \"controllers\")." + }, + { + "name": "Management", + "item": [ + { + "name": "GET management", + "request": { + "method": "GET", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "management" + ] + } + }, + "response": [] + }, + { + "name": "PUT set management", + "request": { + "method": "PUT", + "header": [ + { + "key": "X-chkp-sid", + "value": "{{session}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"PLEASE ENTER MANAGEMENT NAME\", //\"mgmt_name\"\r\n \"domain\": \"PLEASE ENTER DOMAIN NAME\" //\"myDomain\"\r\n}" + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/management", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "management" + ] + } + }, + "response": [] + } + ], + "description": "Operations for configuring Management." + }, + { + "name": "CME General Configuration", + "item": [ + { + "name": "GET delayCycle", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "PUT set delayCycle", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"delay_cycle\": \"PLEASE ENTER DELAY CYCLE\" // 20 \r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/generalConfiguration/delayCycle", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "generalConfiguration", + "delayCycle" + ] + } + }, + "response": [] + }, + { + "name": "GET cmeVersion", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/generalConfiguration/cmeVersion", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "generalConfiguration", + "cmeVersion" + ] + } + }, + "response": [] + }, + { + "name": "GET api-versions", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-chkp-sid", + "value": "{{session}}" + } + ], + "url": { + "raw": "https://{{managementIP}}/web_api/v1.8/cme-api/v1.2/api-versions", + "protocol": "https", + "host": [ + "{{managementIP}}" + ], + "path": [ + "web_api", + "v1.8", + "cme-api", + "v1.2", + "api-versions" + ] + } + }, + "response": [] + } + ], + "description": "Operations for general CME configurations." + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Check for collectionVariables\", function () {", + " let vars = ['managementIP', 'user', 'password'];", + " vars.forEach(function (item, index, array) {", + " console.log(item, index);", + " pm.expect(pm.collectionVariables.get(item), item + \" variable not set\").to.not.be.undefined;", + " pm.expect(pm.collectionVariables.get(item), item + \" variable not set\").to.not.be.empty; ", + " });", + "", + " if (!pm.collectionVariables.get(\"session\") || Date.now() > new Date(pm.collectionVariables.get(\"sessionTimeout\") * 1000)) {", + " pm.sendRequest({", + " url: 'https://' + pm.collectionVariables.get(\"managementIP\") + '/web_api/v1.8/login',", + " method: 'POST',", + " header: 'Content-Type: application/json', // Set the Content-Type header to application/json", + " body: {", + " mode: 'raw', // Use raw body mode", + " raw: JSON.stringify({ // Convert the object to JSON string", + " user: pm.collectionVariables.get(\"user\"),", + " password: pm.collectionVariables.get(\"password\")", + " })", + " }", + " }, function (err, res) {", + " if (err) {", + " console.log(err);", + " } else {", + " let resJson = res.json();", + " pm.collectionVariables.set(\"sessionTimeout\", resJson[\"session-timeout\"]);", + " pm.collectionVariables.set(\"session\", resJson.sid);", + " }", + " });", + " }", + "});" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "managementIP", + "value": "" + }, + { + "key": "user", + "value": "", + "type": "string" + }, + { + "key": "password", + "value": "", + "type": "string" + }, + { + "key": "session", + "value": "", + "type": "string" + }, + { + "key": "sessionTimeout", + "value": "600", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/common/cme_api_postman/README.md b/common/cme_api_postman/README.md new file mode 100755 index 00000000..0b513eb0 --- /dev/null +++ b/common/cme_api_postman/README.md @@ -0,0 +1,19 @@ +# CME API Postman +Postman is a popular API client that makes it easy for developers to create, share, test and document APIs. +
Postman can import and export Postman data, including collections, environments, data dumps, and globals. +## How to set CME-API environment in Postman +In order to set your Postman to use CME-API we created a data file for you to import: + +### CME-API collection +1. Open Postman. +2. Click Import in the upper-left corner +
(You can import your data via files, folders, links, raw text, or GitHub repositories) +4. Load the "cme_api.postman_collection.json" file and click "Import" + +## How to use it +After importing the CME-API collection, click on the “cme_api” collection at the left bar and then on the “Variables” tab. +
You need to set the current value of “managementIP", “user” and “password” variables. +
If you used previously the CME_API Environment variables, please go to the Environments tab and uncheck it. + +Now, for each API call you make, a login to your server will be done if needed and the session key will automatically be saved into the session variable, +
All you need to do now is update body values of your requests according to your need. \ No newline at end of file diff --git a/common/cme_xff_inject.sh b/common/cme_xff_inject.sh new file mode 100644 index 00000000..b82f23b1 --- /dev/null +++ b/common/cme_xff_inject.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +# This script activates XFF injection on the gateways +# For more information about XFF injection, see https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk167578&partition=Advanced&product=Security + +fw ctl set int inject_xff_header_activated 1 +echo "inject_xff_header_activated=1" >> $FWDIR/modules/fwkern.conf \ No newline at end of file diff --git a/common/custom-management-script.py b/common/custom-management-script.py new file mode 100755 index 00000000..8b53028c --- /dev/null +++ b/common/custom-management-script.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 + +# custom-script version 1 +# Written by: Check Point Software Technologies LTD + +# Instructions: +# In order to use custom management script refer to: Cloud Management Extension R80.10 and Higher Administration Guide +# The script runs on the Security Management server just after the policy is installed when a gateway is provisioned, +# and at the beginning of the deprovisioning process. +# Important: This is a placeholder script, and you should implement __add and __delete functions. + +import collections +import os +import subprocess +import sys +import traceback +import logging +from logging.handlers import RotatingFileHandler + + +class ACTION(set): + ADD = 'add' + DELETE = 'delete' + + +def __get_parent_path(): + full_path = os.path.realpath(__file__) + return f'{os.path.split(full_path)[0]}' + + +# logger variables +LOGGER_PATH = '/var/log/CPcme/custom-script.log' +logger = None + + +def __set_logger(): + """ + Setting logger to write all output to custom-script.log file and to the console at the same time + :return: nothing + """ + global logger + + # create a file handler + handler = RotatingFileHandler(LOGGER_PATH, mode='a', maxBytes=1024, backupCount=2, encoding=None, delay=0) + handler.setLevel(logging.INFO) + + # create a logging format + formatter = logging.Formatter('%(asctime)s %(levelname)s - %(message)s') + handler.setFormatter(formatter) + + logger = logging.getLogger("custom-script-logger") + logger.setLevel(logging.INFO) + + # add the file handler to the logger + logger.addHandler(handler) + + # Print also to the console (will also be printed in /var/log/CPcme/cme.log when run by the CME) + logger.addHandler(logging.StreamHandler(sys.stdout)) + + +def __parse_arguments(args): + logger.info('Starting to parse parameters.') + args_count = len(args) + if args_count < 3: + logger.error('Error: missing action (add/delete) and/or security gateway name') + sys.exit(1) + + action = args[1] + gateway_name = args[2] + + if action != ACTION.ADD and action != ACTION.DELETE: + logger.error(f'Error: unknown action: {action}. action must be add or delete') + + logger.info(f'action: {action}') + logger.info(f'gateway_name: {gateway_name}') + + script_args = args[3:] + for i, arg in enumerate(script_args): + logger.info(f'args[{i}]: {script_args[i]}') + + logger.info('Parsing completed.') + + return action, gateway_name, script_args + + +def __add(gateway_name, script_args: list): + """ + Being called when: + 1. Security Gateway is added + 2. After the following updates: + - Generation value modification in CME template + - Load Balancer configuration change when the auto-nat feature is enabled (enabled by default in AWS) + In the case of the above updates, the __delete function will be called and afterwards the __add function + """ + logger.info(f'Starting add for gateway: {gateway_name}') + # TODO - put your custom add code here + + +def __delete(gateway_name, script_args: list): + """ + Being called when: + 1. Security Gateway is deleted + 2. After the following updates: + - Generation value modification in CME template + - Load Balancer configuration change when the auto-nat feature is enabled (enabled by default in AWS) + In the case of the above updates, the __delete function will be called and afterwards the __add function + """ + logger.info(f'Starting delete for gateway: {gateway_name}') + # TODO - put your custom delete code here + + +def main(): + __set_logger() + action, gateway_name, script_args = __parse_arguments(sys.argv) + + try: + if action == ACTION.ADD: + return __add(gateway_name, script_args) + + if action == ACTION.DELETE: + return __delete(gateway_name, script_args) + except: + logger.error('Error: ' + str(sys.exc_info()[1])) + sys.exit(1) + + +if __name__ == '__main__': + main() diff --git a/common/custom_scripts/README.md b/common/custom_scripts/README.md new file mode 100644 index 00000000..bb1651da --- /dev/null +++ b/common/custom_scripts/README.md @@ -0,0 +1,21 @@ +# Custom Scripts +This folder contains custom scripts that can be uploaded in the "Bootstrap scripts" option when deploying a resource via a template. + +--- +## password_script.sh - Password Change Script + +This script is designed to be used on Check Point's solutions that do not have the option to add a password for the Gaia machine. +It allows you to configure the desired password for logging in to the Gaia Portal, it will be run during the deployment process. + +### Usage + +To use this script, follow these steps: +1. Get the desired password hash by running the following command: `openssl passwd -6 YOUR_PASSWORD` change `YOUR_PASSWORD` to the designed password. +2. Edit the script file and replace the placeholder "" with the hash value from step 1. +3. Save the modified script file. +4. Upload the script file to the "Bootstrap script" option during the deployment process. + +The script will be executed during the deployment process, and the specified password will be set for logging in to the Gaia Portal + +--- + diff --git a/common/custom_scripts/password_script.sh b/common/custom_scripts/password_script.sh new file mode 100644 index 00000000..2b60030a --- /dev/null +++ b/common/custom_scripts/password_script.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +HASHED_PASSWORD="" + +# Unlock Database +clish -c "lock database override" +# Set password +clish -c "set user admin password-hash $HASHED_PASSWORD" -s + + diff --git a/common/maintenance_mode/README.md b/common/maintenance_mode/README.md new file mode 100755 index 00000000..3afd323e --- /dev/null +++ b/common/maintenance_mode/README.md @@ -0,0 +1,19 @@ +# Maintenance mode +The Maintenance Mode boot option is known on UNIX systems as 'single-user mode'. In this mode, a Virtual Machine (VM) boots to run level 1. The local file systems will be mounted, but the network will not be activated. + +## Configuration +The configuration below related to Azure and Google Cloud Platform (GCP). +### How to enter maintenance mode +1. Connect to the VM (with SSH client or serial console). +2. Back up /boot/grub/grub.conf +3. Run: cp /boot/grub/grub.conf /boot/grub/grub.conf.backup +4. Copy grub.conf from this directory and place it in /boot/grub/ +5. Reboot the VM. +6. After it boots, click on Serial Console to enter maintenance mode. + +### How to return to normal mode +1. Connect to the serial console. +2. Rename the backup file as grub.conf +3. Run: mv /boot/grub/grub.conf.backup /boot/grub/grub.conf +4. Reboot the VM. +5. After the boot, your VM is in normal mode. \ No newline at end of file diff --git a/common/maintenance_mode/grub.conf b/common/maintenance_mode/grub.conf new file mode 100755 index 00000000..729d4216 --- /dev/null +++ b/common/maintenance_mode/grub.conf @@ -0,0 +1,11 @@ +default=0 +vmalloc=338M +timeout=10 +serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 +terminal --timeout=0 serial console +hiddenmenu +menutitle=Check Point Gaia R81 +title Start in maintenance mode 64bit + root (hd0,0) + kernel /vmlinuz-x86_64 ro root=/dev/vg_splat/lv_current vmalloc=338M rootdelay=300 panic=15 console=ttyS0 earlyprintk=ttyS0 numa=off debug 7 single + initrd /initrd-x86_64 diff --git a/common/simulate_cpu_load.sh b/common/simulate_cpu_load.sh new file mode 100644 index 00000000..d0dcb0de --- /dev/null +++ b/common/simulate_cpu_load.sh @@ -0,0 +1,11 @@ +#!/bin/bash +ncores="$(cat /proc/cpuinfo | grep vendor_id | wc -l)" +PIDS=() +for i in $(seq $ncores) + do + taskset ff dd if=/dev/zero of=/dev/null & + PIDS+=($!) + done +echo "Load started" +read -n1 -r -p "Press any key to stop the load..." key +kill ${PIDS[@]} diff --git a/common/static_route_config.sh b/common/static_route_config.sh new file mode 100755 index 00000000..feb3dcd5 --- /dev/null +++ b/common/static_route_config.sh @@ -0,0 +1,13 @@ +#! /bin/bash + +#External Application gateway subnet address, for example 10.1.2.0/24 +EXTERNAL_AGW_SUBNET_CIDR=<> + +#VMSS frontend subnet default gateway. +#For each Azure subnet the IP Address x.x.x.1 is reserved for the default gateway +# https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-faq#are-there-any-restrictions-on-using-ip-addresses-within-these-subnets +EXTERNAL_VMSS_SUBNET_DEFAULT_GATEWAY=<> + +clish -c "lock database override" + +clish -s -c "set static-route $EXTERNAL_AGW_SUBNET_CIDR nexthop gateway address $EXTERNAL_VMSS_SUBNET_DEFAULT_GATEWAY on" diff --git a/common/vwan_postman/README.md b/common/vwan_postman/README.md new file mode 100644 index 00000000..70d250bc --- /dev/null +++ b/common/vwan_postman/README.md @@ -0,0 +1,66 @@ +# Postman Collection for Azure Virtual Network Management + +This Postman collection provides a set of APIs for managing Azure Virtual Network resources. The collection includes the following categories: + +## Virtual WANs + +- **GET All Virtual Wans in resourceGroup**: Retrieves a list of all virtual WANs in a specified resource group. +- **GET All Virtual Wans in subscription**: Retrieves a list of all virtual WANs in a specified subscription. +- **GET Virtual Wan**: Retrieves details of a specific virtual WAN. +- **DEL Virtual Wan**: Deletes a specific virtual WAN. +- **PATCH Update Tags for vWAN**: Updates the tags for a specific virtual WAN. +- **PUT Virtual Wan**: Creates or updates a virtual WAN. + +## Virtual Hubs +- **GET Virtual Hub**: Retrieves details of a specific virtual hub. +- **PUT Virtual Hub - Create Or Update**: Creates or updates a virtual hub. +- **GET All Virtual Hubs in resourceGroup**: Retrieves a list of all virtual hubs in a specified resource group. +- **GET All Virtual Hubs in subscription**: Retrieves a list of all virtual hubs in a specified subscription. +- **PATCH Update Tags for vHub**: Updates the tags for a specific virtual hub. +### Hub Route Tables + +- **GET Route Table**: Retrieves details of a specific route table associated with a virtual hub. +- **PUT Route Table - Create Or Update**: Creates or updates a route table associated with a virtual hub. +- **DEL Route Table**: Deletes a specific route table associated with a virtual hub. +- **GET All Route Tables**: Retrieves a list of all route tables associated with a virtual hub. + +### Hub Virtual Network Connections + +- **GET Virtual Network Connections**: Retrieves details of a specific virtual network connection associated with a virtual hub. +- **PUT Virtual Network Connections - Create Or Update**: Creates or updates a virtual network connection associated with a virtual hub. +- **DEL Virtual Network Connections**: Deletes a specific virtual network connection associated with a virtual hub. +- **GET All Virtual Network Connections**: Retrieves a list of all virtual network connections associated with a virtual hub. + +- **POST Effective Routes**: Creates or updates a ExpressRoute gateway in a specified resource group. + +## Routing Intent + +- **PUT Routing Intent**: Creates or updates a routing intent for a specific virtual hub. +- **GET Routing Intent**: Retrieves the routing intent for a specific virtual hub. +- **DEL Routing Intent**: Deletes a specific routing intent for a specific virtual hub. + +## VPN Sites + +- **GET VPN Site**: Retrieves details of a specific VPN site. +- **GET All VPN Sites in resourceGroup**: Retrieves a list of all VPN sites in a specified resource group. +- **GET All VPN Sites in subscription**: Retrieves a list of all VPN sites in a specified subscription. + +## Network Virtual Appliance (NVA) + +- **DEL NVA**: Deletes a specific Network Virtual Appliance. +- **GET NVA**: Retrieves details of a specific Network Virtual Appliance. +- **GET All NVAs**: Retrieves a list of all Network Virtual Appliances in a resource group. + +## Security Rule + +- **PUT Inbound Security Rule - Create Or Update**: Creates or updates an inbound security rule. + +## Usage + +To use this collection, you will need to set up a Virtual Network environment and have the appropriate credentials in your subscription to manage Virtual Network resources. You will also need to import the collection into Postman and configure the variables in the collection with your Azure credentials. + +Once you have configured the environment variables, you can use the collection to manage your Virtual Network resources. + +## Contributing + +If you find any issues with this collection or would like to suggest an improvement, please feel free to open an issue or submit a pull request. We welcome contributions from the community! \ No newline at end of file diff --git a/common/vwan_postman/vwan.postman_collection.json b/common/vwan_postman/vwan.postman_collection.json new file mode 100755 index 00000000..022302cb --- /dev/null +++ b/common/vwan_postman/vwan.postman_collection.json @@ -0,0 +1,1307 @@ +{ + "info": { + "_postman_id": "f0e0ca41-ec67-4f50-9c4d-930a7f3fcaab", + "name": "Azure Virtual WAN - REST APIs", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "20296973" + }, + "item": [ + { + "name": "Virtual WANs", + "item": [ + { + "name": "All Virtual Wans in resourceGroup", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualWans" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All Virtual Wans in subscription", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.Network/virtualWans?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "providers", + "Microsoft.Network", + "virtualWans" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Wan", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans/{{virtualWan}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualWans", + "{{virtualWan}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Wan", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans/{{virtualWan}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualWans", + "{{virtualWan}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Update Tags for vWAN", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans/{{virtualWan}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualWans", + "{{virtualWan}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Wan", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"disableVpnEncryption\": false,\r\n \"type\": \"Basic\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans/{{virtualWan}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualWans", + "{{virtualWan}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Virtual Hubs", + "item": [ + { + "name": "Hub Route Tables", + "item": [ + { + "name": "Route Table", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables/{{hubRouteTable}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubRouteTables", + "{{hubRouteTable}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Route Table - Create Or Update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"properties\": {\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"destinationType\": \"CIDR\",\r\n \"destinations\": [\r\n \"10.0.0.0/8\",\r\n \"20.0.0.0/8\",\r\n \"30.0.0.0/8\"\r\n ],\r\n \"nextHopType\": \"ResourceId\",\r\n \"nextHop\": \"/subscriptions/{{subscriptionId}}/resourcegroups/{{managedAppRG}}/providers/Microsoft.Network/networkVirtualAppliances/{{nvaName}}\"\r\n }\r\n ],\r\n \"labels\": [\r\n \"label1\",\r\n \"label2\"\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables/{{hubRouteTable}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubRouteTables", + "{{hubRouteTable}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Route Table", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables/{{hubRouteTable}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubRouteTables", + "{{hubRouteTable}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All Route Tables", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubRouteTables" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Hub Virtual Network Connections", + "item": [ + { + "name": "Virtual Network Connections", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubVirtualNetworkConnections/{{hubVirtualNetworkConnection}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubVirtualNetworkConnections", + "{{hubVirtualNetworkConnection}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Network Connections - Create Or Update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"properties\": {\r\n \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/{{remoteVnetSub}}/resourceGroups/{{remoteVnetRG}}/providers/Microsoft.Network/virtualNetworks/{{remoteVnetID}}\"\r\n },\r\n \"enableInternetSecurity\": false,\r\n \"routingConfiguration\": {\r\n \"associatedRouteTable\": {\r\n \"id\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}//providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables/{{hubRouteTable}}\"\r\n },\r\n \"propagatedRouteTables\": {\r\n \"labels\": [\r\n \"label1\",\r\n \"label2\"\r\n ],\r\n \"ids\": [\r\n {\r\n \"id\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}//providers/Microsoft.Network/virtualHubs/{{hubName}}/hubRouteTables/{{hubRouteTable}}\"\r\n }\r\n ]\r\n },\r\n \"vnetRoutes\": {\r\n \"staticRoutesConfig\": {\r\n \"vnetLocalRouteOverrideCriteria\": \"Equal\"\r\n },\r\n \"staticRoutes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"addressPrefixes\": [\r\n \"10.1.0.0/16\",\r\n \"10.2.0.0/16\"\r\n ],\r\n \"nextHopIpAddress\": \"10.0.0.68\"\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"addressPrefixes\": [\r\n \"10.3.0.0/16\",\r\n \"10.4.0.0/16\"\r\n ],\r\n \"nextHopIpAddress\": \"10.0.0.65\"\r\n }\r\n ]\r\n },\r\n \"inboundRouteMap\": {\r\n \"id\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}//providers/Microsoft.Network/virtualHubs/{{hubName}}/routeMaps/{{routeMap}}\"\r\n },\r\n \"outboundRouteMap\": {\r\n \"id\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}//providers/Microsoft.Network/virtualHubs/{{hubName}}/routeMaps/{{routeMap}}\"\r\n }\r\n }\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubVirtualNetworkConnections/{{hubVirtualNetworkConnection}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubVirtualNetworkConnections", + "{{hubVirtualNetworkConnection}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Network Connections", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubVirtualNetworkConnections/{{hubVirtualNetworkConnection}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubVirtualNetworkConnections", + "{{hubVirtualNetworkConnection}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All Virtual Network Connections", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/hubVirtualNetworkConnections?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "hubVirtualNetworkConnections" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Virtual Hub", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Virtual Hub - Create Or Update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualWans/{{virtualWan}}\"\r\n },\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"sku\": \"Basic\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Effective Routes", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceId\": \"/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}//providers/Microsoft.Network/expressRouteGateways/{{expressRouteGatewayName}}/expressRouteConnections/{{expressRouteConnections}}>\",\r\n \"virtualWanResourceType\": \"ExpressRouteConnection\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/effectiveRoutes?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "effectiveRoutes" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All Virtual Hubs in resourceGroup", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All Virtual Hubs in subscription", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.Network/virtualHubs?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "providers", + "Microsoft.Network", + "virtualHubs" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Update Tags for vHub", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Routing Intent", + "item": [ + { + "name": "Routing Intent", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"properties\": {\r\n \"routingPolicies\": [\r\n {\r\n \"name\": \"InternetTraffic\",\r\n \"destinations\": [\r\n \"Internet\"\r\n ],\r\n \"nextHop\": \"/subscriptions/{{subscriptionId}}/resourcegroups/{{managedAppRG}}/providers/Microsoft.Network/networkVirtualAppliances/{{nvaName}}\"\r\n },\r\n {\r\n \"name\": \"PrivateTrafficPolicy\",\r\n \"destinations\": [\r\n \"PrivateTraffic\"\r\n ],\r\n \"nextHop\": \"/subscriptions/{{subscriptionId}}/resourcegroups/{{managedAppRG}}/providers/Microsoft.Network/networkVirtualAppliances/{{nvaName}}\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/routingIntent/{{routingIntent}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "routingIntent", + "{{routingIntent}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Routing Intent", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/routingIntent/{{routingIntent}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "routingIntent", + "{{routingIntent}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Routing Intent", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/virtualHubs/{{hubName}}/routingIntent/{{routingIntent}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "virtualHubs", + "{{hubName}}", + "routingIntent", + "{{routingIntent}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "VPN Sites", + "item": [ + { + "name": "VPN Site", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/vpnSites/{{vpnSiteName}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "vpnSites", + "{{vpnSiteName}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All VPN Sites in resourceGroup", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupID}}/providers/Microsoft.Network/vpnSites?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{resourceGroupID}}", + "providers", + "Microsoft.Network", + "vpnSites" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "All VPN Sites in subscription", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.Network/vpnSites?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "providers", + "Microsoft.Network", + "vpnSites" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Network Virtual Appliance (NVA)", + "item": [ + { + "name": "NVA", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{managedAppRG}}/providers/Microsoft.Network/NetworkVirtualAppliances/{{nvaName}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{managedAppRG}}", + "providers", + "Microsoft.Network", + "NetworkVirtualAppliances", + "{{nvaName}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + }, + { + "name": "NVA", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{managedAppRG}}/providers/Microsoft.Network/networkVirtualAppliances/{{nvaName}}?api-version=2022-11-01", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{managedAppRG}}", + "providers", + "Microsoft.Network", + "networkVirtualAppliances", + "{{nvaName}}" + ], + "query": [ + { + "key": "api-version", + "value": "2022-11-01" + } + ] + } + }, + "response": [] + }, + { + "name": "All NVAs", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{managedAppRG}}/providers/Microsoft.Network/NetworkVirtualAppliances?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{managedAppRG}}", + "providers", + "Microsoft.Network", + "NetworkVirtualAppliances" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Security Rule", + "item": [ + { + "name": "Inbound Security Rule - Create Or Update", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"properties\": {\r\n \"rules\": [\r\n {\r\n \"protocol\": \"TCP\",\r\n \"sourceAddressPrefix\": \"172.172.172.172/32\",\r\n \"destinationPortRange\": 22\r\n }\r\n ]\r\n }\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{managedAppRG}}/providers/Microsoft.Network/networkVirtualAppliances/{{nvaName}}inboundSecurityRules/{{inboundSecurityRule}}?api-version={{apiVersion}}", + "protocol": "https", + "host": [ + "management", + "azure", + "com" + ], + "path": [ + "subscriptions", + "{{subscriptionId}}", + "resourceGroups", + "{{managedAppRG}}", + "providers", + "Microsoft.Network", + "networkVirtualAppliances", + "{{nvaName}}inboundSecurityRules", + "{{inboundSecurityRule}}" + ], + "query": [ + { + "key": "api-version", + "value": "{{apiVersion}}" + } + ] + } + }, + "response": [] + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Check for collectionVariables\", function () {", + " let vars = ['clientId', 'clientSecret', 'tenantId', 'subscriptionId'];", + " vars.forEach(function (item, index, array) {", + " console.log(item, index);", + " pm.expect(pm.collectionVariables.get(item), item + \" variable not set\").to.not.be.undefined;", + " pm.expect(pm.collectionVariables.get(item), item + \" variable not set\").to.not.be.empty; ", + " });", + "", + " if (!pm.collectionVariables.get(\"bearerToken\") || Date.now() > new Date(pm.collectionVariables.get(\"bearerTokenExpiresOn\") * 1000)) {", + " pm.sendRequest({", + " url: 'https://login.microsoftonline.com/' + pm.collectionVariables.get(\"tenantId\") + '/oauth2/token',", + " method: 'POST',", + " header: 'Content-Type: application/x-www-form-urlencoded',", + " body: {", + " mode: 'urlencoded',", + " urlencoded: [", + " { key: \"grant_type\", value: \"client_credentials\", disabled: false },", + " { key: \"client_id\", value: pm.collectionVariables.get(\"clientId\"), disabled: false },", + " { key: \"client_secret\", value: pm.collectionVariables.get(\"clientSecret\"), disabled: false },", + " { key: \"resource\", value: pm.collectionVariables.get(\"resource\") || \"https://management.azure.com/\", disabled: false }", + " ]", + " }", + " }, function (err, res) {", + " if (err) {", + " console.log(err);", + " } else {", + " let resJson = res.json();", + " pm.collectionVariables.set(\"bearerTokenExpiresOn\", resJson.expires_on);", + " pm.collectionVariables.set(\"bearerToken\", resJson.access_token);", + " }", + " });", + " }", + "});" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "tenantId", + "value": "" + }, + { + "key": "clientSecret", + "value": "" + }, + { + "key": "clientId", + "value": "", + "type": "string" + }, + { + "key": "subscriptionId", + "value": "" + }, + { + "key": "nvaName", + "value": "", + "type": "string" + }, + { + "key": "managedAppRG", + "value": "", + "type": "string" + }, + { + "key": "resourceGroupID", + "value": "" + }, + { + "key": "virtualWan", + "value": "", + "type": "string" + }, + { + "key": "hubName", + "value": "", + "type": "string" + }, + { + "key": "hubRouteTable", + "value": "", + "type": "string" + }, + { + "key": "hubVirtualNetworkConnection", + "value": "", + "type": "string" + }, + { + "key": "routingIntent", + "value": "", + "type": "string" + }, + { + "key": "vpnSiteName", + "value": "", + "type": "string" + }, + { + "key": "inboundSecurityRule", + "value": "", + "type": "string" + }, + { + "key": "remoteVnetSub", + "value": "", + "type": "string" + }, + { + "key": "remoteVnetRG", + "value": "", + "type": "string" + }, + { + "key": "remoteVnetID", + "value": "", + "type": "string" + }, + { + "key": "routeMap", + "value": "", + "type": "string" + }, + { + "key": "expressRouteGatewayName", + "value": "", + "type": "string" + }, + { + "key": "expressRouteConnections", + "value": "", + "type": "string" + }, + { + "key": "apiVersion", + "value": "2022-09-01", + "type": "string" + }, + { + "key": "bearerToken", + "value": "" + }, + { + "key": "resource", + "value": "https://management.azure.com/" + }, + { + "key": "bearerTokenExpiresOn", + "value": "" + } + ] +} \ No newline at end of file diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 00000000..0f096324 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,2 @@ +## Disclaimer +The content of this directory is released under an as-is, best effort, support policy. It should be seen as community supported and Check Point will contribute its expertise as and when possible. We do not provide technical support in using or troubleshooting the content of this directory through our normal support options. diff --git a/contrib/azure/templates/ha-public-ip-prefix/README.MD b/contrib/azure/templates/ha-public-ip-prefix/README.MD new file mode 100644 index 00000000..44e4da6c --- /dev/null +++ b/contrib/azure/templates/ha-public-ip-prefix/README.MD @@ -0,0 +1,51 @@ +# ARM CloudGuard High Availability public IPs allocated from public IP prefix + +This directory contains the CloudGuard IaaS HA template derived from the ´20201102` version of the template . +This template adds the ability to create a public IP Prefix that is used to allocated the Public IP addresses for the cluster. + +## Changes from Marketplace template +* added parameters: + - `ipPrefix` - Set parameter to `'yes'` to deploy the prefix + - `ipPrefixSize`- Size of the Public IP Prefix, `/30`, `/29` or `/28` + +* added variables: + - `ipPrefixName` : constructs the public IP prefix name + - `publicIPPrefixProperty` : constructs the public IP prefix property that will be added to app Public IPs if the `ipPrefix` parameter is set to 'yes' + +* added resources: + - Public IP Prefix `Microsoft.Network/publicipprefixes`, deployed if the `ipPrefix` parameter is set to 'yes' - https://docs.microsoft.com/en-us/azure/virtual-network/public-ip-address-prefix. + +* changed declarations: + - Added the Public IP prefix resource to the `dependsOn` property on all Public IP addresses. + - Added the `publicIPPrefix` property to all Public IP address resources with an if statement to set the value to variable `publicIPPrefixProperty` if the `ipPrefix` parameter is set to 'yes' + - Changed the default value of the `_artifactsLocation` parameter to point to this GitHub Repo to allow the template to be deployed outside of the marketplace. + +## How to deploy the template: + +Local deployment: download this template and parameter file, edit the parameters and run your deployment tool of choice, e. g. + +``` +az group deployment create -g --template-file ha-publicipprefix.json --parameters @ha-publicipprefix-parameters.json +``` + +### *Extra*: to load the administrator password from an existing keyvault (provided that you declared appropriate permissions), include in the parameters.json file in the parameters section: +``` +"adminPassword": { + "reference": { + "keyVault": { + "id": "/subscriptions/your-subscription-id-here/resourceGroups/your-resource-group-here/providers/Microsoft.KeyVault/vaults/your-keyvault-name-here", + "secretName": "your-secret-name" + } +}, +``` +It might be useful to include also a ssh public key in the parameters section of the ha-publicipprefix-parameters.json file. + +## To deploy the ARM templates manually without using the Azure Marketplace: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*ha-publicipprefix.json*" file of the desired template and click "*Save*" +6. Enter the required and/or optional template parameters +7. Click *Purchase* to deploy the solution +8. Debug the deployment diff --git a/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix-parameters.json b/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix-parameters.json new file mode 100644 index 00000000..1aa6435c --- /dev/null +++ b/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix-parameters.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "East US" + }, + "cloudGuardVersion": { + "value": "R80.40 - Bring Your Own License" + }, + "adminPassword": { + "value": "" + }, + "authenticationType": { + "value": "password" + }, + "sshPublicKey": { + "value": "" + }, + "vmName": { + "value": "cloudguard" + }, + "vmSize": { + "value": "Standard_D3_v2" + }, + "sicKey": { + "value": "" + }, + "virtualNetworkName": { + "value": "cloudguard-vnet" + }, + "virtualNetworkAddressPrefixes": { + "value": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "value": "Frontend" + }, + "subnet1Prefix": { + "value": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "value": "10.0.1.10" + }, + "subnet2Name": { + "value": "Backend" + }, + "subnet2Prefix": { + "value": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "value": "10.0.2.10" + }, + "vnetNewOrExisting": { + "value": "new" + }, + "virtualNetworkExistingRGName": { + "value": "" + }, + "ipPrefix": { + "value": "yes" + }, + "ipPrefixSize": { + "value": 28 + }, + "bootstrapScript": { + "value": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "value": "true" + }, + "additionalDiskSizeGB": { + "value": 0 + }, + "diskType": { + "value": "Standard_LRS" + }, + "role": { + "value": "Contributor" + }, + "managedSystemAssigned": { + "value": "yes" + }, + "sourceImageVhdUri": { + "value": "noCustomUri" + }, + "availabilityOptions": { + "value": "Availability Set" + }, + "_artifactsLocation": { + "value": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "value": "" + }, + "Check_PointTags": { + "value": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + }, + "customMetrics": { + "value": "yes" + } + } +} \ No newline at end of file diff --git a/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix.json b/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix.json new file mode 100644 index 00000000..caaef705 --- /dev/null +++ b/contrib/azure/templates/ha-public-ip-prefix/ha-publicipprefix.json @@ -0,0 +1,1033 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)", + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.40 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "ipPrefix": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "no", + "metadata": { + "description": "Define if a Public IP Prefix should be created or not" + } + }, + "ipPrefixSize": { + "type": "int", + "defaultValue": 30, + "allowedvalues": [ + 28, + 29, + 30 + ], + "metadata": { + "description": "Define the size of the Public IP Prefix" + } + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "role": { + "type": "string", + "defaultValue": "Contributor", + "metadata": { + "description": "Role" + } + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + } + }, + "variables": { + "templateName": "ha", + "templateVersion": "20201102", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2", + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030", + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),2)))]" + ], + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "azureCloud": "[not(or(startsWith(variables('location'), 'china'), startsWith(variables('location'), 'germany')))]", + "managedSystemAssigned": "[if(not(variables('azureCloud')), 'no', parameters('managedSystemAssigned'))]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "ipPrefixName": "[concat(parameters('vmName'), '-ipprefix')]", + "publicIPPrefixProperty": { + "id": "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixName'))]" + } + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-7fbd7ca2-a62c-5cb5-9b28-3900ca6dba8d", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2019-06-01", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "nsgName": { + "value": "[variables('nsgName')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[equals(parameters('ipPrefix'), 'yes')]", + "type": "Microsoft.Network/publicipprefixes", + "apiVersion": "2020-06-01", + "name": "[variables('ipPrefixName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[parameters('ipPrefixSize')]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixName'))]" + ], + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('ipPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixName'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('ipPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixName'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('ipPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(variables('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2018-07-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[equals(variables('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), '2018-10-01', 'Full').identity.principalId]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } + } \ No newline at end of file diff --git a/contrib/azure/templates/ha-redeploy-single-member/README.MD b/contrib/azure/templates/ha-redeploy-single-member/README.MD new file mode 100644 index 00000000..d449370f --- /dev/null +++ b/contrib/azure/templates/ha-redeploy-single-member/README.MD @@ -0,0 +1,41 @@ +# ARM CloudGuard High Availability template to redeploy Cluster member + +This directory contains the CloudGuard IaaS HA template derived from the ´20220130` version of the template . + +This template adds the ability to redeploy a single member of a HA cluster into the same Resource Group of an existing Ha cluster withouth the need to redeploy the whole cluster. + +The template is specially useful in the following use cases: +1 - Redeploy/Replace a single memeber of a cluster that has failed on the same version. +2 - Perform an upgrade of the Cluster using MVC (Multi-version cluster) + + +The logic of the template is to simply replace one VM and re-attach the old NIC’s and Public addresses and deploy on the same resource group as the old VM. + +NOTE 1: IAM roles must be configured manually since the template fails to update the resource group. + +NOTE 2: Deploys a new Storage account dedicated to the new deployed VM. + +## How to deploy the template: + +Note: Backup device according to sk169814 (if possible). + +1. Log in to the Microsoft Azure Portal +2. Locate the resource group where the cluster is installed into +3. Proceed to delete failed Virtual Machine. +a. Select to delete associated Disk but to retain existing NIC and Public Addresses +4. Click “Create a Resource” +5. Log in to the Microsoft Azure Portal +6. Search for "Template deployment (deploy using custom templates)" and click "Create" +7. Click "Build your own template in the editor" +8. Load the "ha-redeploy-single-member.json" file of the desired template and click "Save" +9. Enter the desired template parameters. +a. NOTE: Pay close attention to correctly fill the information relevant to the cluster name and member ID and match the resource group and VM size. +b. Specify the Virtual Network name, resource group and cluster-vip of the cluster. +c. Replace the "_artifacts Location" property with: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/ +10. Click Purchase to deploy the solution +11. Once deployment is completed. Verify IAM roles and permissions of the new VM. +12. Restore any clish backups. +13. Open SmartConsole, re-establishing SIC. + 13.a For Member Recovery: Re-install policy and test failover + 13.b For Upgrades: Perform MVC upgrade process as per documentation and then repeat all steps for second member to be upgraded. + diff --git a/contrib/azure/templates/ha-redeploy-single-member/ha-redeploy-single-member.json b/contrib/azure/templates/ha-redeploy-single-member/ha-redeploy-single-member.json new file mode 100644 index 00000000..c21ed531 --- /dev/null +++ b/contrib/azure/templates/ha-redeploy-single-member/ha-redeploy-single-member.json @@ -0,0 +1,561 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)", + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + },"memberID": { + "type": "string", + "defaultValue": "1", + "allowedValues": [ + "1", + "2" + ], + "metadata": { + "description": "ID of the Check Point Cluster member that is to be replaced 1 or 2" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM (must be identical as existing deployed VM)" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "existing", + "allowedValues": [ + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "cluster-ip": { + "type": "string", + "metadata": { + "description": "The address of the cluster-ip private address associated with eth0 network interface of the current active member of the cluster" + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "role": { + "type": "string", + "defaultValue": "Contributor", + "metadata": { + "description": "Role" + } + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones (must match existing deployed VM)" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + } + }, + "variables": { + "templateName": "ha", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2", + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX", + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030", + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81", + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "externalPrivateAddresses": "[parameters('cluster-ip')]", + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "availabilityZonesLocations": [ + "australiaeast", + "brazilsouth", + "canadacentral", + "centralus", + "eastasia", + "eastus", + "eastus2", + "francecentral", + "germanywestcentral", + "japaneast", + "koreacentral", + "northeurope", + "norwayeast", + "southafricanorth", + "southcentralus", + "southeastasia", + "swedencentral", + "uksouth", + "usgovvirginia", + "westeurope", + "westus2", + "westus3" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "emptyString": "none", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), parameters('memberID'))]", + "zones": "[if(variables('useAZ'), array(parameters('memberID')), json('null'))]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(parameters('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-04-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), parameters('memberID'), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), parameters('memberID'), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computername": "[concat(toLower(parameters('vmName')), parameters('memberID'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), parameters('memberID'))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + }, + + { + "condition": "[equals(parameters('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), parameters('memberID')))]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), parameters('memberID')))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), parameters('memberID'))), '2021-07-01', 'Full').identity.principalId]" + } + } + ], + "outputs": { + "DeploymentName": { + "type": "string", + "value": "[concat('bootdiag', resourceGroup().id, '-' ,deployment().name)]" + } + } +} \ No newline at end of file diff --git a/contrib/azure/templates/ha-redeploy-single-member/mainTemplate.json b/contrib/azure/templates/ha-redeploy-single-member/mainTemplate.json new file mode 100644 index 00000000..b1aef4c4 --- /dev/null +++ b/contrib/azure/templates/ha-redeploy-single-member/mainTemplate.json @@ -0,0 +1,1055 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)", + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "floatingIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "publicIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Use public IP prefix" + } + }, + "createNewIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Create new public IP prefix" + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "role": { + "type": "string", + "defaultValue": "Contributor", + "metadata": { + "description": "Role" + } + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + } + }, + "variables": { + "templateName": "ha", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2", + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX", + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030", + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81", + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),2)))]" + ], + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "australiaeast", + "brazilsouth", + "canadacentral", + "centralus", + "eastasia", + "eastus", + "eastus2", + "francecentral", + "germanywestcentral", + "japaneast", + "koreacentral", + "northeurope", + "norwayeast", + "southafricanorth", + "southcentralus", + "southeastasia", + "swedencentral", + "uksouth", + "usgovvirginia", + "westeurope", + "westus2", + "westus3" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "emptyString": "none", + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), variables('emptyString'))]", + "ipNewPrefixId": "[resourceId('Microsoft.Network/publicIPPrefixes',variables('ipPrefixNewName'))]", + "publicIPNewPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipNewPrefixId'), json('null'))]", + "usepublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPNewPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPrefixProperty": { + "Id": "[variables('usepublicIPPrefix')]" + }, + "prefixDependsOn": "[if(equals(parameters('publicIPPrefix'), 'yes'), if(equals(parameters('createNewIPPrefix'), 'yes'), variables('publicIPNewPrefixId'), variables('ipNewPrefixId')), variables('ipNewPrefixId'))]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicIPPrefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "30", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + } + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "nsgName": { + "value": "[variables('nsgName')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(parameters('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-04-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]", + "publicIPPrefix": { + "id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usepublicIPPrefix'), json('null'))]" + } + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + }, + { + "condition": "[equals(parameters('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), '2021-07-01', 'Full').identity.principalId]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": "[variables('enableFloatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/contrib/azure/templates/vmss-publicipprefixinstances/README.MD b/contrib/azure/templates/vmss-publicipprefixinstances/README.MD new file mode 100644 index 00000000..eec923c4 --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstances/README.MD @@ -0,0 +1,47 @@ +# ARM CloudGuard IaaS Scale Set with instances' public IPs allocated from an existing public IP prefix + +This directory contains the CloudGuard IaaS VMSS template derived from the 20191003 vmss-v2 Marketplace scale set template. +This template adds the ability to allocate IP addresses for instances from an existing public IP prefix. +The VM scale set is deployed in the same existing resource group which includes the public IP prefix. + +## Changes from Marketplace template +* added parameters: + - `existingPublicIPprefixGroupName` + - `existingPublicIPprefixName` + +* added variables: + - `existingPublicIPprefixResID` : constructs the public IP prefix ID from the parameters declared above, ID to be referenced in `publicIPProperties` existing variable + +* changed declarations: + - `publicIPProperties` + - hardcoded main template URL in existing parameter `_artifactsLocation` referenced by `networkSetupURL` and `loadBalacerSetupURL` to locate the nested templates + +## How to deploy the template: + +Local deployment: download this template, construct a parameters.json file and run your deployment tool of choice, e. g. + +``` +az group deployment create -g --template-file vmss-publicipprefix-instances.json --parameters @parameters.json --debug +``` + +### *Extra*: to load the administrator password from an existing keyvault (provided that you declared appropriate permissions), include in the parameters.json file in the parameters section: +``` +"adminPassword": { + "reference": { + "keyVault": { + "id": "/subscriptions/your-subscription-id-here/resourceGroups/your-resource-group-here/providers/Microsoft.KeyVault/vaults/your-keyvault-name-here", + "secretName": "your-secret-name" + } +}, +``` +It might be useful to include also a ssh public key in the parameters section of the parameters.json file. + +## To deploy the ARM templates manually without using the Azure Marketplace: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*vmss-publicipprefix-instances.json*" file of the desired template and click "*Save*" +6. Enter the required and/or optional template parameters +7. Click *Purchase* to deploy the solution +8. Debug the deployment diff --git a/contrib/azure/templates/vmss-publicipprefixinstances/vmss-publicipprefix-instances.json b/contrib/azure/templates/vmss-publicipprefixinstances/vmss-publicipprefix-instances.json new file mode 100644 index 00000000..cb0ae439 --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstances/vmss-publicipprefix-instances.json @@ -0,0 +1,891 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (NGTP)", + "R80.20 - Pay As You Go (NGTX)", + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "existingPublicIPprefixGroupName": { + "type": "string", + "metadata": { + "description": "The name of the group where an existing Public IP Prefix for instance-level public IPs is declared" + } + }, + "existingPublicIPprefixName": { + "type": "string", + "metadata": { + "description": "The name of existing Public IP Prefix for instance-level public IPs" + } + }, + "instanceCount": { + "defaultValue": "1", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "The name of a template as it appears in the configuration file of CloudGuard controller" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key as generated by ssh-keygen" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vmss')]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user is upgrading the CloudGuard VMSS solution" + } + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "existing", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth0-public", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of avalability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://catalogartifact.azureedge.net/publicartifacts/checkpoint.vsec-b5bcf577-339b-44df-a901-2dd353948955-autoscale-v2/Artifacts/mainTemplate.json" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "templateName": "vmss-v2", + "templateVersion": "20200113", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (NGTP)": "NGTP", + "R80.20 - Pay As You Go (NGTX)": "NGTX", + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP", + "R80.30 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (NGTP)": "R8020", + "R80.20 - Pay As You Go (NGTX)": "R8020", + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-12-01", + "storageApiVersion": "2017-10-01", + "networkApiVersion": "2018-01-01", + "deploymentsApiVersion": "2017-08-01", + "insightsApiVersion": "2015-04-01", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "existingPublicIPprefixResID": "[resourceId(parameters('existingPublicIPprefixGroupName'), 'Microsoft.Network/publicIPPrefixes', parameters('existingPublicIPprefixName'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80-blink-v2", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOfferR8030": "check-point-cg-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "false", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "vmssID": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/virtualMachineScaleSets/', parameters('vmName'))]", + "emailSelector": [ + [], + [ + "[parameters('adminEmail')]" + ] + ], + "customEmails": "[variables('emailSelector')[length(take(parameters('adminEmail'), 1))]]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "vmss", + "publicIPProperties": { + "name": "[concat(parameters('vmName'), '-eth0')]", + "properties": { + "idleTimeoutInMinutes": "15", + "publicIPPrefix": { + "id": "[variables('existingPublicIPprefixResID')]" + }, + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + } + }, + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "networkSetupId": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Resources/deployments', 'networkSetup')]", + "lbRGName": "[if(variables('upgrading'), parameters('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "storageAccountId": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]", + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-5432b4df-d783-57a2-b65f-39f4bca4974a", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "networkApiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Id": { + "value": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "lbsTargetRGName": { + "value": "[parameters('lbsTargetRGName')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "[variables('computeApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('networkSetupId')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', reference('networkSetup').outputs.vnetAddressPrefixes.value[0], '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "networkSecurityGroup": "[reference('networkSetup').outputs.nsgProperties.value]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), variables('storageApiVersion')).primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "[variables('insightsApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[variables('customEmails')]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/contrib/azure/templates/vmss-publicipprefixinstanceselb/README.MD b/contrib/azure/templates/vmss-publicipprefixinstanceselb/README.MD new file mode 100644 index 00000000..a1839a60 --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstanceselb/README.MD @@ -0,0 +1,51 @@ +# ARM CloudGuard IaaS Scale Set with instances' public IPs and external load balancer public IP allocated from an existing public IP prefix + +This directory contains the CloudGuard IaaS VMSS template derived from the `vmss-v2` Check Point CloudGuard IaaS Scale Set Marketplace template version `20191003`. + +This template adds the ability to allocate IP addresses for instances and for external load balancer from an existing public IP prefix - the public IP prefix for instances and for external load balancer could be the same or different, defined in the resource group allocated for VMSS or in a different resource group. + +The VM scale set deployment was tested in the same existing resource group which includes the public IP prefix and public IP address for external load balancer. + +## Changes from Marketplace template +* new parameters: + * `mainTemplate.json`: + - `existingPublicIPprefixGroupName` + - `existingPublicIPprefixName` + - `elbUsePublicIP` + - `elbPublicIPAddressGroupName` + - `elbPublicIPAddressName` + * `load-balancers.json` nested template: + - `elbUsePublicIP` + - `elbPublicIPAddressId` +* new variables: + * `mainTemplate.json`: + - `existingPublicIPaddressResID` : constructs the public IP prefix ID from the parameters declared above, ID to be referenced in `publicIPProperties` existing variable + * `load-balancers.json`: + - `newAppAddressId`: automatically constructs external load balancer public IP if existing public IP is not used - previous declaration of `appAddressId` variable + - `existingAppAddressId`: existing public IP address Id, referenced from resource group and public IP address names passed as parameters +* changed declarations: + - `mainTemplate.json`: `publicIPProperties` + - `load-balancers.json`: `appAddressId`: conditionally resolves the external load balancer public IP id based on utilization of existing public IP address + - hardcoded main template URL in existing parameter `_artifactsLocation` referenced by `networkSetupURL` and `loadBalacerSetupURL` to locate the nested templates + *Please verify and change accordingly to the raw github URI the `_artifactsLocation` value before deployment !* + - removed `dependsOn: [variables('appAddressId')]` in `load-balancers.json` to allow reference to resorce not declared in template + +## How to deploy the template: + +Construct a parameters.json file and run your deployment tool of choice, e. g. + +``` +az group deployment create -g CPSM-OMV --template-uri https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json --parameters @parameters.json --debug +``` + +### *Extra*: to load the administrator password from an existing keyvault (provided that you declared appropriate permissions), include in the parameters.json file in the parameters section: +``` +"adminPassword": { + "reference": { + "keyVault": { + "id": "/subscriptions/your-subscription-id-here/resourceGroups/your-resource-group-here/providers/Microsoft.KeyVault/vaults/your-keyvault-name-here", + "secretName": "your-secret-name" + } +}, +``` +Additional logic have to be implemented to select admin password source. \ No newline at end of file diff --git a/contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json b/contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json new file mode 100644 index 00000000..47f1c2f0 --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json @@ -0,0 +1,922 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (NGTP)", + "R80.20 - Pay As You Go (NGTX)", + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "existingPublicIPprefixGroupName": { + "type": "string", + "metadata": { + "description": "The name of the group where an existing Public IP Prefix for instance-level public IPs is declared" + } + }, + "existingPublicIPprefixName": { + "type": "string", + "metadata": { + "description": "The name of existing Public IP Prefix for instance-level public IPs" + } + }, + "elbUsePublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "description": "Assign an existing public IP address to the external load balancer" + } + }, + "elbPublicIPAddressGroupName": { + "type": "string", + "metadata": { + "description": "The name of the group where an existing Public IP address to be assigned to external load balancer is declared" + } + }, + "elbPublicIPAddressName": { + "type": "string", + "metadata": { + "description": "The name (not resource ID) of existing Public IP address to be assign to external load balancer" + } + }, + "instanceCount": { + "defaultValue": "1", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "The name of a template as it appears in the configuration file of CloudGuard controller" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key as generated by ssh-keygen" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vmss')]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user is upgrading the CloudGuard VMSS solution" + } + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "existing", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth0-public", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of avalability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/contrib/azure/templates/vmss-publicipprefixinstanceselb/mainTemplate.json" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "templateName": "vmss-v2", + "templateVersion": "20200114", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (NGTP)": "NGTP", + "R80.20 - Pay As You Go (NGTX)": "NGTX", + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP", + "R80.30 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (NGTP)": "R8020", + "R80.20 - Pay As You Go (NGTX)": "R8020", + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-12-01", + "storageApiVersion": "2017-10-01", + "networkApiVersion": "2018-01-01", + "deploymentsApiVersion": "2017-08-01", + "insightsApiVersion": "2015-04-01", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "existingPublicIPprefixResID": "[resourceId(parameters('existingPublicIPprefixGroupName'), 'Microsoft.Network/publicIPPrefixes', parameters('existingPublicIPprefixName'))]", + "existingPublicIPaddressResID": "[resourceId(parameters('elbPublicIPAddressGroupName'), 'Microsoft.Network/publicIPAddresses', parameters('elbPublicIPAddressName'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80-blink-v2", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOfferR8030": "check-point-cg-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "false", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "vmssID": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/virtualMachineScaleSets/', parameters('vmName'))]", + "emailSelector": [ + [], + [ + "[parameters('adminEmail')]" + ] + ], + "customEmails": "[variables('emailSelector')[length(take(parameters('adminEmail'), 1))]]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "vmss", + "publicIPProperties": { + "name": "[concat(parameters('vmName'), '-eth0')]", + "properties": { + "idleTimeoutInMinutes": "15", + "publicIPPrefix": { + "id": "[variables('existingPublicIPprefixResID')]" + }, + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + } + }, + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "elbUsePublic": "[equals(parameters('elbUsePublicIP'), 'yes')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "networkSetupId": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Resources/deployments', 'networkSetup')]", + "lbRGName": "[if(variables('upgrading'), parameters('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "storageAccountId": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]", + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-5432b4df-d783-57a2-b65f-39f4bca4974a", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "networkApiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Id": { + "value": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "lbsTargetRGName": { + "value": "[parameters('lbsTargetRGName')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "elbUsePublicIP": { + "value": "[variables('elbUsePublic')]" + }, + "elbPublicIPAddressId": { + "value": "[variables('existingPublicIPaddressResID')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "[variables('computeApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('networkSetupId')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', reference('networkSetup').outputs.vnetAddressPrefixes.value[0], '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "networkSecurityGroup": "[reference('networkSetup').outputs.nsgProperties.value]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), variables('storageApiVersion')).primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "[variables('insightsApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[variables('customEmails')]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/load-balancers.json b/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/load-balancers.json new file mode 100644 index 00000000..cebba5fc --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/load-balancers.json @@ -0,0 +1,283 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentMode": { + "type": "string" + }, + "networkApiVersion": { + "type": "string" + }, + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "Subnet2StartAddress": { + "type": "string" + }, + "subnet2Name": { + "type": "string" + }, + "subnet2Id": { + "type": "string" + }, + "ilbLoadDistribution": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "lbsTargetRGName": { + "type": "string" + }, + "elbResourceId": { + "type": "string" + }, + "elbTargetBEAddressPoolName": { + "type": "string" + }, + "ilbResourceId": { + "type": "string" + }, + "ilbTargetBEAddressPoolName": { + "type": "string" + }, + "elbUsePublicIP": { + "type": "bool" + }, + "elbPublicIPAddressId": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "deployELB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ELBOnly'))]", + "deployILB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ILBOnly'))]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "newAppAddressId": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]", + "appAddressId": "[if(parameters('elbUsePublicIP'), parameters('elbPublicIPAddressId'), variables('newAppAddressId'))]", + "appFEName": "[variables('appName')]", + "elbName": "frontend-lb", + "elbID": "[if(parameters('upgrading'), parameters('elBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('elbName')))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolName": "[if(parameters('upgrading'), parameters('elbTargetBEAddressPoolName'), variables('elbBEAddressPool'))]", + "elbBEAddressPoolID": "[concat(variables('elbID'), '/backendAddressPools/', variables('elbBEAddressPoolName'))]", + "appFEIPConfigID": "[concat(variables('elbID'), '/frontendIPConfigurations/', variables('appFEName'))]", + "appProbeName": "[variables('appName')]", + "appProbeID": "[concat(variables('elbID'),'/probes/',variables('appProbeName'))]", + "appFrontEndProtocol": "tcp", + "appFrontEndPort": 80, + "appBackEndPort": 8081, + "appHealthProtocol": "tcp", + "ilbHealthProtocol": "tcp", + "lbHealthPort": 8117, + "ilbName": "['backend-lb']", + "ilbID": "[if(parameters('upgrading'), parameters('ilbResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('ilbName')))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbFEIPConfigID": "[concat(variables('ilbID'), '/frontendIPConfigurations/', variables('ilbName'))]", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "ilbBEAddressPoolName": "[if(parameters('upgrading'), parameters('ilbTargetBEAddressPoolName'), variables('ilbBEAddressPool'))]", + "ilbBEAddressPoolID": "[concat(variables('ilbID'), '/backendAddressPools/', variables('ilbBEAddressPoolName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[concat(variables('ilbID'), '/probes/', variables('ilbProbeName'))]", + "ilbBEAddressPoolProperties": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ], + "elbBEAddressPoolProperties": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')), not(parameters('elbUsePublicIP')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "location": "[parameters('location')]", + "name": "[variables('appAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "name": "[variables('elbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[variables('appAddressId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('appFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('elbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('appProbeID')]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": "[variables('appFrontEndPort')]", + "backendPort": "[variables('appBackEndPort')]", + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployILB'), not(parameters('upgrading')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "name": "[variables('ilbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[parameters('subnet2ID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "[parameters('ilbLoadDistribution')]", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "[variables('ilbHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "appAddressId": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName')), '')]", + "type": "string" + }, + "elbId": { + "value": "[if(variables('deployELB'), variables('elbId'), '')]", + "type": "string" + }, + "ilbId": { + "value": "[if(variables('deployILB'), variables('ilbId'), '')]", + "type": "string" + }, + "ilbBEAddressPoolProperties": { + "value": "[variables('ilbBEAddressPoolProperties')]", + "type": "array" + }, + "elbBEAddressPoolProperties": { + "value": "[variables('elbBEAddressPoolProperties')]", + "type": "array" + }, + "ApplicationAddress": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), parameters('networkApiVersion')).IpAddress, 'no public ip')]", + "type": "string" + }, + "ApplicationFQDN": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), parameters('networkApiVersion')).dnsSettings.fqdn, 'no public ip')]", + "type": "string" + } + } +} diff --git a/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/vnet-2-subnet-ha-existing.json b/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/vnet-2-subnet-ha-existing.json new file mode 100644 index 00000000..286d1927 --- /dev/null +++ b/contrib/azure/templates/vmss-publicipprefixinstanceselb/nestedtemplates/vnet-2-subnet-ha-existing.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": "true" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[reference(variables('vnetId'),parameters('apiVersion')).addressSpace.addressPrefixes]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/contrib/cme/examples/README.md b/contrib/cme/examples/README.md new file mode 100644 index 00000000..d1cc1c10 --- /dev/null +++ b/contrib/cme/examples/README.md @@ -0,0 +1,2 @@ +This directory contains examples of CME configuration and usage.
+Refer to each subdirectorie's README.md file for more information. diff --git a/contrib/terraform-azure-gwlb/README.md b/contrib/terraform-azure-gwlb/README.md new file mode 100644 index 00000000..45c0f2d3 --- /dev/null +++ b/contrib/terraform-azure-gwlb/README.md @@ -0,0 +1,70 @@ +# CloudGuard GWLB Deployment on Azure +This Terraform project is intended to be used as a template in a demonstration or to build a test environment. +What it does is creating an infrastructure composed of three directly exposed application, and protect them with a VMSS CloudGuard deployment by using the newly launched Azure GWLB service. These applications will have then the East-West traffic protected by a CloudGuard HA Cluster. + +## Disclaimer +Please note that GWLB service is today in Preview and therefore not reccomanded for production workload. +You can review the support statement at: +1. Microsoft Azure public documentation: [Documentation Link](https://docs.microsoft.com/en-us/azure/load-balancer/gateway-overview) +2. Check Point public documentation: [Documentation Link](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_Azure_VMSS_GWLB/Content/Topics-Azure-VMSS-GWLB/Public-Preview-Disclaimer.htm?tocpath=_____3#Public_Preview_Disclaimer) + +## Do you want to see more? +Check out other CloudGuard examples at [Github/gbrembati](https://github.com/gbrembati/) + +## Which are the components created? +The project creates the following resources and combine them: +1. **Resource Groups**: for the vnets, the management and the spokes +2. **Vnet**: north / south / mgmt / spokes +3. **Subnets**: inside the vNets +4. **Vnet peerings** (as shown in the design below) +5. **Routing table**: associated with the network in the spokes +6. **Rules** for the routing tables created +7. **Network Security Groups**: associated with nets and VMs +8. **NSG Rules** inside the differents NSGs: to prevent undesired connections +9. **Check Point Instances**: A Check Point R80.40 Cluster, R81.10 Management, R81.10 VMSS GWLB +10. **Public IPs**: associated with the management and the spoke VMs) +11. **Create DNS zone**: used later on to have the application easily accessible +12. **Created 3 web application**: it builds three application directly accessible with Public IPs or Public LBs +13. **Integrates GWLB with Application**: the deployed GWLB is set to protect the web applications + +## How to use it +The only thing that you need to do is changing the __*terraform.tfvars*__ file located in this directory. + +```hcl +# Set in this file your deployment variables +# Specify the Azure values +azure-client-id = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-client-secret = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-subscription = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-tenant = "xxxxx-xxxxx-xxxxx-xxxxx" + +# Specify where you want to deploy it and where you are coming from +location = "France Central" +my-pub-ip = "x.x.x.x/32" + +# Management details +mgmt-sku-enabled = false # Have you ever deployed a R81.10 CKP management? Set to false if not +mgmt-dns-suffix = "xxxxx" +mgmt-admin-pwd = "xxxxx" + +# VMspoke details +vmspoke-sku-enabled = false # Have you ever deployed a Nginx VM before? set to false if not +vmspoke-usr = "xxxxx" +vmspoke-pwd = "xxxxx" + +# Cluster Details +cpcluster-sku-enabled = false # Have you ever deployed a R80.40 CKP cluster? set to false if not" +admin_username = "xxxxx" +admin_password = "xxxxx" +sic_key = "xxxxx" + +# GWLB VMSS Details +gwlb-vmss-agreement = false # Have you ever deployed a GWLB VMSS? set to false if not +chkp-admin-pwd = "xxxxx" +chkp-sic = "xxxxx" +``` +If you want (or need) to further customize other project details, you can change defaults in the different __*name-variables.tf*__ files. +Here you will also able to find the descriptions that explains what each variable is used for. + +## The infrastruction created with the following design: +![Architectural Design](/contrib/terraform-azure-gwlb/zimages/azure-gwlb-design.jpg) \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/app-main.tf b/contrib/terraform-azure-gwlb/app-main.tf new file mode 100644 index 00000000..be91a9f7 --- /dev/null +++ b/contrib/terraform-azure-gwlb/app-main.tf @@ -0,0 +1,382 @@ +# Accept the agreement for the mgmt-byol for vmspoke image +resource "azurerm_marketplace_agreement" "vmspoke-agreement" { + count = var.vmspoke-sku-enabled ? 0 : 1 + publisher = var.vmspoke-publisher + offer = var.vmspoke-offer + plan = var.vmspoke-sku +} + +resource "azurerm_resource_group" "rg-app-A" { + name = "rg-${var.app-name-con}" + location = var.location +} +resource "azurerm_public_ip" "publicip-app-A" { + name = "pub-${var.app-name-con}" + sku = "Standard" + location = azurerm_resource_group.rg-app-A.location + resource_group_name = azurerm_resource_group.rg-app-A.name + allocation_method = "Static" + domain_name_label = "pub-${var.app-name-con}-${var.mgmt-dns-suffix}" +} +resource "azurerm_lb" "lb-app-A" { + name = "lb-${var.app-name-con}" + sku = "Standard" + location = azurerm_resource_group.rg-app-A.location + resource_group_name = azurerm_resource_group.rg-app-A.name + + frontend_ip_configuration { + name = "PublicIPAddress" + public_ip_address_id = azurerm_public_ip.publicip-app-A.id + gateway_load_balancer_frontend_ip_configuration_id = data.azurerm_lb.gateway-lb.frontend_ip_configuration.0.id + } + depends_on = [azurerm_resource_group_template_deployment.template-deployment-gwlb] +} +resource "azurerm_lb_backend_address_pool" "lb-backend-pool" { + loadbalancer_id = azurerm_lb.lb-app-A.id + name = "BackEndAddressPool" + depends_on = [azurerm_lb.lb-app-A] +} +resource "azurerm_lb_backend_address_pool_address" "lb-backend-pool-addr" { + name = "BackEndAddressPoolAddr" + backend_address_pool_id = azurerm_lb_backend_address_pool.lb-backend-pool.id + virtual_network_id = azurerm_virtual_network.vnet-spoke[0].id + ip_address = "10.0.0.4" + depends_on = [azurerm_lb_backend_address_pool.lb-backend-pool] +} +resource "azurerm_lb_probe" "lb-backend-probe" { + resource_group_name = azurerm_resource_group.rg-app-A.name + loadbalancer_id = azurerm_lb.lb-app-A.id + name = "http-running-probe" + port = 3000 + + depends_on = [azurerm_lb.lb-app-A] +} + +resource "azurerm_lb_rule" "lb-rule-3000" { + resource_group_name = azurerm_resource_group.rg-app-A.name + loadbalancer_id = azurerm_lb.lb-app-A.id + name = "LBRule3000" + protocol = "Tcp" + frontend_port = 3000 + backend_port = 3000 + frontend_ip_configuration_name = "PublicIPAddress" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.lb-backend-pool.id] + probe_id = azurerm_lb_probe.lb-backend-probe.id + + depends_on = [azurerm_lb.lb-app-A] +} +resource "azurerm_lb_rule" "lb-rule-80" { + resource_group_name = azurerm_resource_group.rg-app-A.name + loadbalancer_id = azurerm_lb.lb-app-A.id + name = "LBRule80" + protocol = "Tcp" + frontend_port = 80 + backend_port = 80 + frontend_ip_configuration_name = "PublicIPAddress" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.lb-backend-pool.id] + probe_id = azurerm_lb_probe.lb-backend-probe.id + + depends_on = [azurerm_lb.lb-app-A] +} + +resource "azurerm_network_profile" "profile-app-juiceshop" { + name = "net-profile-juiceshop-${var.app-name-con}" + location = azurerm_resource_group.rg-app-A.location + resource_group_name = azurerm_resource_group.rg-app-A.name + + container_network_interface { + name = "container-nic-${var.app-name-con}" + + ip_configuration { + name = "nic-ipconfig-${var.app-name-con}" + subnet_id = azurerm_subnet.net-spoke-0-web.id + } + } + depends_on = [azurerm_subnet.net-spoke-0-web] +} + +resource "azurerm_container_group" "container-app-juiceshop" { + name = "juiceshop-${var.app-name-con}" + location = azurerm_resource_group.rg-app-A.location + resource_group_name = azurerm_resource_group.rg-app-A.name + os_type = "Linux" + ip_address_type = "private" + network_profile_id = azurerm_network_profile.profile-app-juiceshop.id + + container { + name = "juiceshop${var.app-name-con}" + image = "${var.docker-image}:latest" + cpu = "1" + memory = "1.5" + + ports { + port = 3000 + protocol = "TCP" + } + ports { + port = 80 + protocol = "TCP" + } + } + depends_on = [azurerm_network_profile.profile-app-juiceshop] +} + +# Building the second app +resource "azurerm_resource_group" "rg-app-B" { + name = "rg-${var.app-name-vm}" + location = var.location +} +resource "azurerm_public_ip" "publicip-app-B" { + name = "pub-${var.app-name-vm}" + sku = "Standard" + location = azurerm_resource_group.rg-app-B.location + resource_group_name = azurerm_resource_group.rg-app-B.name + allocation_method = "Static" + domain_name_label = "pub-${var.app-name-vm}-${var.mgmt-dns-suffix}" +} +resource "azurerm_lb" "lb-app-B" { + name = "lb-${var.app-name-vm}" + sku = "Standard" + location = azurerm_resource_group.rg-app-B.location + resource_group_name = azurerm_resource_group.rg-app-B.name + + frontend_ip_configuration { + name = "PublicIPAddress" + public_ip_address_id = azurerm_public_ip.publicip-app-B.id + gateway_load_balancer_frontend_ip_configuration_id = data.azurerm_lb.gateway-lb.frontend_ip_configuration.0.id + } + depends_on = [azurerm_resource_group_template_deployment.template-deployment-gwlb] +} +resource "azurerm_lb_backend_address_pool" "lb-backend-pool-B" { + loadbalancer_id = azurerm_lb.lb-app-B.id + name = "BackEndAddressPool" + depends_on = [azurerm_lb.lb-app-B] +} +resource "azurerm_lb_backend_address_pool_address" "lb-backend-pool-B-addr" { + name = "BackEndAddressPoolAddr" + backend_address_pool_id = azurerm_lb_backend_address_pool.lb-backend-pool-B.id + virtual_network_id = azurerm_virtual_network.vnet-spoke[1].id + ip_address = "10.0.4.4" + depends_on = [azurerm_lb_backend_address_pool.lb-backend-pool-B] +} +resource "azurerm_lb_probe" "lb-backend-probe-B" { + resource_group_name = azurerm_resource_group.rg-app-B.name + loadbalancer_id = azurerm_lb.lb-app-B.id + name = "http-running-probe" + port = 80 + + depends_on = [azurerm_lb.lb-app-B] +} + +resource "azurerm_lb_rule" "lb-rule-B-80" { + resource_group_name = azurerm_resource_group.rg-app-B.name + loadbalancer_id = azurerm_lb.lb-app-B.id + name = "LBRule80" + protocol = "Tcp" + frontend_port = 80 + backend_port = 80 + frontend_ip_configuration_name = "PublicIPAddress" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.lb-backend-pool-B.id] + probe_id = azurerm_lb_probe.lb-backend-probe-B.id + + depends_on = [azurerm_lb.lb-app-B] +} + +# VM-Spoke Network interface +resource "azurerm_network_interface" "nic-vmspoke" { + name = "${var.app-name-vm}-eth0" + location = azurerm_resource_group.rg-app-B.location + resource_group_name = azurerm_resource_group.rg-app-B.name + enable_ip_forwarding = "false" + + ip_configuration { + name = "${var.app-name-vm}-eth0-config" + subnet_id = azurerm_subnet.net-spoke-1-web.id + private_ip_address_allocation = "Dynamic" + primary = true + } + depends_on = [azurerm_subnet.net-spoke-1-web] +} + +# Create NSG for the vmspoke +resource "azurerm_network_security_group" "nsg-vmspoke" { + name = "nsg-vmspoke" + location = azurerm_resource_group.rg-app-B.location + resource_group_name = azurerm_resource_group.rg-app-B.name +} + +# Create the NSG rules for the vmspoke +resource "azurerm_network_security_rule" "nsg-vmspoke-rl-http-s" { + priority = 110 + name = "http-s-access" + + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_ranges = ["80","443"] + source_address_prefix = "*" + destination_address_prefix = "*" + resource_group_name = azurerm_resource_group.rg-app-B.name + network_security_group_name = azurerm_network_security_group.nsg-vmspoke.name + depends_on = [azurerm_network_security_group.nsg-vmspoke] +} + +resource "azurerm_network_interface_security_group_association" "nsg-assoc-nic-vmspoke" { + network_interface_id = azurerm_network_interface.nic-vmspoke.id + network_security_group_id = azurerm_network_security_group.nsg-vmspoke.id + depends_on = [azurerm_network_interface.nic-vmspoke,azurerm_network_security_group.nsg-vmspoke] +} + + +# Accept the agreement for the mgmt-byol for vmspoke image +resource "azurerm_marketplace_agreement" "vmspoke-agreement" { + count = var.vmspoke-sku-enabled ? 0 : 1 + publisher = var.vmspoke-publisher + offer = var.vmspoke-offer + plan = var.vmspoke-sku +} + +# VM-Spoke Virtual Machine +resource "azurerm_virtual_machine" "vm-spoke" { + name = "${var.app-name-vm}" + location = azurerm_resource_group.rg-app-B.location + resource_group_name = azurerm_resource_group.rg-app-B.name + network_interface_ids = [azurerm_network_interface.nic-vmspoke.id] + vm_size = "Standard_A1_v2" + + plan { + publisher = var.vmspoke-publisher + product = var.vmspoke-offer + name = var.vmspoke-sku + } + storage_image_reference { + publisher = var.vmspoke-publisher + offer = var.vmspoke-offer + sku = var.vmspoke-sku + version = "latest" + } + storage_os_disk { + name = "disk-${var.app-name-vm}" + caching = "ReadWrite" + create_option = "FromImage" + managed_disk_type = "Standard_LRS" + } + os_profile { + computer_name = "${var.app-name-vm}" + admin_username = var.chkp-admin-usr + admin_password = var.chkp-admin-pwd + } + os_profile_linux_config { + disable_password_authentication = false + } + depends_on = [azurerm_marketplace_agreement.vmspoke-agreement,azurerm_network_interface.nic-vmspoke] +} + +resource "azurerm_resource_group" "rg-app-C" { + name = "rg-${var.app-name-direct}" + location = var.location +} + +resource "azurerm_public_ip" "publicip-app-C" { + name = "pub-${var.app-name-direct}" + sku = "Standard" + location = azurerm_resource_group.rg-app-C.location + resource_group_name = azurerm_resource_group.rg-app-C.name + allocation_method = "Static" + domain_name_label = "pub-${var.app-name-direct}-${var.mgmt-dns-suffix}" +} +resource "azurerm_network_interface" "nic-vmspoke-C" { + name = "${var.app-name-direct}-eth0" + location = azurerm_resource_group.rg-app-C.location + resource_group_name = azurerm_resource_group.rg-app-C.name + enable_ip_forwarding = "false" + + ip_configuration { + name = "${var.app-name-direct}-eth0-config" + subnet_id = azurerm_subnet.net-spoke-1-web.id + private_ip_address_allocation = "Dynamic" + primary = true + public_ip_address_id = azurerm_public_ip.publicip-app-C.id + gateway_load_balancer_frontend_ip_configuration_id = data.azurerm_lb.gateway-lb.frontend_ip_configuration.0.id + } + depends_on = [azurerm_subnet.net-spoke-1-web] +} + +resource "azurerm_network_interface_security_group_association" "nsg-assoc-nic-vmspoke-C" { + network_interface_id = azurerm_network_interface.nic-vmspoke-C.id + network_security_group_id = azurerm_network_security_group.nsg-vmspoke.id + depends_on = [azurerm_network_interface.nic-vmspoke-C,azurerm_network_security_group.nsg-vmspoke] +} + +# VM-Spoke Virtual Machine +resource "azurerm_virtual_machine" "vm-spoke-C" { + name = var.app-name-direct + location = azurerm_resource_group.rg-app-C.location + resource_group_name = azurerm_resource_group.rg-app-C.name + network_interface_ids = [azurerm_network_interface.nic-vmspoke-C.id] + vm_size = "Standard_A1_v2" + + plan { + publisher = var.vmspoke-publisher + product = var.vmspoke-offer + name = var.vmspoke-sku + } + storage_image_reference { + publisher = var.vmspoke-publisher + offer = var.vmspoke-offer + sku = var.vmspoke-sku + version = "latest" + } + storage_os_disk { + name = "disk-${var.app-name-direct}" + caching = "ReadWrite" + create_option = "FromImage" + managed_disk_type = "Standard_LRS" + } + os_profile { + computer_name = "${var.app-name-direct}" + admin_username = var.chkp-admin-usr + admin_password = var.chkp-admin-pwd + } + os_profile_linux_config { + disable_password_authentication = false + } + depends_on = [azurerm_marketplace_agreement.vmspoke-agreement,azurerm_network_interface.nic-vmspoke-C] +} + +resource "azurerm_dns_a_record" "publicip-app-A-dns-record" { + name = var.app-name-con + zone_name = azurerm_dns_zone.mydns-public-zone.name + resource_group_name = azurerm_resource_group.rg-dns-myzone.name + ttl = 300 + target_resource_id = azurerm_public_ip.publicip-app-A.id + depends_on = [azurerm_public_ip.publicip-app-A] +} +output "webapp-A-public-fqdn" { + value = "http://${azurerm_dns_a_record.publicip-app-A-dns-record.name}.${azurerm_dns_zone.mydns-public-zone.name}:3000/" +} + +resource "azurerm_dns_a_record" "publicip-app-B-dns-record" { + name = var.app-name-vm + zone_name = azurerm_dns_zone.mydns-public-zone.name + resource_group_name = azurerm_resource_group.rg-dns-myzone.name + ttl = 300 + target_resource_id = azurerm_public_ip.publicip-app-B.id + depends_on = [azurerm_public_ip.publicip-app-B] +} +output "webapp-B-public-fqdn" { + value = "http://${azurerm_dns_a_record.publicip-app-B-dns-record.name}.${azurerm_dns_zone.mydns-public-zone.name}/" +} + +resource "azurerm_dns_a_record" "publicip-app-C-dns-record" { + name = var.app-name-direct + zone_name = azurerm_dns_zone.mydns-public-zone.name + resource_group_name = azurerm_resource_group.rg-dns-myzone.name + ttl = 300 + target_resource_id = azurerm_public_ip.publicip-app-C.id + depends_on = [azurerm_public_ip.publicip-app-C] +} +output "webapp-C-public-fqdn" { + value = "http://${azurerm_dns_a_record.publicip-app-C-dns-record.name}.${azurerm_dns_zone.mydns-public-zone.name}/" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/app-variables.tf b/contrib/terraform-azure-gwlb/app-variables.tf new file mode 100644 index 00000000..4cc907a3 --- /dev/null +++ b/contrib/terraform-azure-gwlb/app-variables.tf @@ -0,0 +1,26 @@ +variable "app-name-con" { + default = "webapp-con" +} +variable "docker-image" { + default = "bkimminich/juice-shop" +} +variable "app-name-direct" { + default = "webapp-direct" +} +variable "app-name-vm" { + default = "webapp-vm" +} +variable "vmspoke-publisher" { + default = "bitnami" +} +variable "vmspoke-offer" { + default = "nginxstack" +} +variable "vmspoke-sku" { + default = "1-9" +} +variable "vmspoke-sku-enabled" { + description = "Have you ever deployed this vm spoke before? set to false if not" + type = bool + default = true +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/cpcluster-main.tf b/contrib/terraform-azure-gwlb/cpcluster-main.tf new file mode 100644 index 00000000..dc622c82 --- /dev/null +++ b/contrib/terraform-azure-gwlb/cpcluster-main.tf @@ -0,0 +1,461 @@ +//********************** Basic Configuration **************************// +module "common" { + source = "./modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type +} + +//********************** Networking **************************// +data "azurerm_subnet" "frontend" { + name = azurerm_subnet.net-south-frontend.name + virtual_network_name = azurerm_virtual_network.vnet-south.name + resource_group_name = azurerm_virtual_network.vnet-south.resource_group_name +} + +data "azurerm_subnet" "backend" { + name = azurerm_subnet.net-south-backend.name + virtual_network_name = azurerm_virtual_network.vnet-south.name + resource_group_name = azurerm_virtual_network.vnet-south.resource_group_name +} + +resource "azurerm_public_ip" "public-ip" { + count = 2 + name = "${var.cluster_name}${count.index+1}_IP" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku +} + +resource "azurerm_public_ip" "cluster-vip" { + name = var.cluster_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku +} + +resource "azurerm_network_interface" "nic_vip" { + depends_on = [ + azurerm_public_ip.cluster-vip, + azurerm_public_ip.public-ip] + name = "${var.cluster_name}1-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefix, var.frontend_IP_addresses[0]) + public_ip_address_id = azurerm_public_ip.public-ip.0.id + } + ip_configuration { + name = "cluster-vip" + subnet_id = data.azurerm_subnet.frontend.id + primary = false + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefix, var.frontend_IP_addresses[2]) + public_ip_address_id = azurerm_public_ip.cluster-vip.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_vip_lb_association" { + depends_on = [azurerm_network_interface.nic_vip, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic_vip.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip, + azurerm_lb.frontend-lb] + name = "${var.cluster_name}2-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefix, var.frontend_IP_addresses[1]) + public_ip_address_id = azurerm_public_ip.public-ip.1.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_lb_association" { + depends_on = [azurerm_network_interface.nic, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [ + azurerm_lb.backend-lb] + count = 2 + name = "${var.cluster_name}${count.index+1}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefix, var.backend_IP_addresses[count.index+1]) + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic1_lb_association" { + depends_on = [azurerm_network_interface.nic1, azurerm_lb_backend_address_pool.backend-lb-pool] + count = 2 + network_interface_id = azurerm_network_interface.nic1[count.index].id + ip_configuration_name = "ipconfig2" + backend_address_pool_id = azurerm_lb_backend_address_pool.backend-lb-pool.id +} + +//********************** Load Balancers **************************// +resource "azurerm_public_ip" "public-ip-lb" { + name = "frontend_lb_ip" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku +} + +resource "azurerm_lb" "frontend-lb" { + depends_on = [azurerm_public_ip.public-ip-lb] + name = "lb-cluster-frontend" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "LoadBalancerFrontend" + public_ip_address_id = azurerm_public_ip.public-ip-lb.id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { +# resource_group_name = module.common.resource_group_name + loadbalancer_id = azurerm_lb.frontend-lb.id + name = "frontend-lb-pool" +} + +resource "azurerm_lb" "backend-lb" { + name = "lb-cluster-backend" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefix, var.backend_IP_addresses[0]) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb.id + # resource_group_name = module.common.resource_group_name +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = 2 + resource_group_name = module.common.resource_group_name + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb.id : azurerm_lb.backend-lb.id + name = var.lb_probe_name + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +//********************** Availability Set **************************// +locals { + availability_set_condition = var.availability_type == "Availability Set" ? true : false + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false +} +resource "azurerm_availability_set" "availability-set" { + count = local.availability_set_condition ? 1 : 0 + name = "${var.cluster_name}-AvailabilitySet" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + platform_fault_domain_count = 2 + platform_update_domain_count = 5 + managed = true +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "clusterrandomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.clusterrandomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type +} + +//********************** Virtual Machines **************************// +locals { + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +# Accept the agreement for the cluster-byol for R80.40 +resource "azurerm_marketplace_agreement" "cpcluster-agreement" { + count = var.cpcluster-sku-enabled ? 0 : 1 + publisher = "checkpoint" + offer = var.vm_os_offer + plan = var.vm_os_sku +} + +resource "azurerm_virtual_machine" "vm-instance-availability-set" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? module.common.number_of_vm_instances : 0 + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + availability_set_id = local.availability_set_condition ? azurerm_availability_set.availability-set[0].id : "" + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.azure-tenant + virtual_network = azurerm_virtual_network.vnet-south.name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics=var.enable_custom_metrics ? "yes" : "no" + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} + +resource "azurerm_virtual_machine" "vm-instance-availability-zone" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? 0 : module.common.number_of_vm_instances + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + zones = [ + count.index+1] + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.azure-tenant + virtual_network = azurerm_virtual_network.vnet-south.name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics=var.enable_custom_metrics ? "yes" : "no" + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} +//********************** Role Assigments **************************// +data "azurerm_role_definition" "role_definition" { + name = module.common.role_definition +} +data "azurerm_client_config" "client_config" { +} +resource "azurerm_role_assignment" "cluster_assigment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} diff --git a/contrib/terraform-azure-gwlb/cpcluster-variables.tf b/contrib/terraform-azure-gwlb/cpcluster-variables.tf new file mode 100644 index 00000000..a11c5e29 --- /dev/null +++ b/contrib/terraform-azure-gwlb/cpcluster-variables.tf @@ -0,0 +1,201 @@ +//********************** Basic Configuration Variables **************************// +variable "cluster_name" { + description = "Cluster name" + type = string + default = "cpcluster" +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string + default = "rg-cpcluster" +} + +//********************** Virtual Machine Instances Variables **************************// +variable "availability_type" { + description = "Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone." + type = string + default = "Availability Zone" +} + +locals { // locals for 'availability_type' allowed values + availability_type_allowed_values = [ + "Availability Zone", + "Availability Set" + ] + // will fail if [var.availability_type] is invalid: + validate_availability_type_value = index(local.availability_type_allowed_values, var.availability_type) +} + +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "cpadmin" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Macine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "ha_terraform" +} + +variable "template_version" { + description = "Template version. It is reccomended to always use the latest template version" + type = string + default = "20210111" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "cluster" +} + +variable "number_of_vm_instances" { + description = "Number of VM instances to deploy " + type = string + default = "2" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string + default = "Standard_D2_v2" +} + +variable "disk_size" { + description = "Storage data disk size size(GB).Select a number between 100 and 3995" + type = string + default = "110" +} + +variable "os_version" { + description = "GAIA OS version" + type = string + default = "R80.40" +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string + default = "sg-byol" +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8030, check-point-cg-r8040, check-point-cg-r81" + type = string + default = "check-point-cg-r8040" +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string + default = "Password" +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool + default = true +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +//********************** Natworking Variables **************************// +variable "frontend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth0 NICs and the cluster vip ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given frontend subnet prefix. The IP addresses are defined by their position in the frontend subnet." + type = list(number) + default = [5, 6, 7] +} + +variable "backend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth1 NICs and the backend lb ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given backend subnet prefix. The IP addresses are defined by their position in the backend subnet." + type = list(number) + default = [5, 6, 7] +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "lb_probe_name" { + description = "Name to be used for lb health probe" + default = "health_prob_port" +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule perfoms a check" + default = 5 +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +//********************** Credentials **************************// +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "cpcluster-sku-enabled" { + description = "Have you ever deployed a ckp cluster before? set to false if not" + type = bool + default = true +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/cpmgmt-main.tf b/contrib/terraform-azure-gwlb/cpmgmt-main.tf new file mode 100644 index 00000000..8dabd6ab --- /dev/null +++ b/contrib/terraform-azure-gwlb/cpmgmt-main.tf @@ -0,0 +1,189 @@ +# Accept the agreement for the mgmt-byol for R80.40 +resource "azurerm_marketplace_agreement" "cpmgmt-agreement" { + count = var.mgmt-sku-enabled ? 0 : 1 + publisher = "checkpoint" + offer = "check-point-cg-${var.mgmt-version}" + plan = var.mgmt-sku +} +# Create management resource group +resource "azurerm_resource_group" "rg-ckpmgmt" { + name = "rg-${var.mgmt-name}" + location = var.location +} +# Create NSG for the management +resource "azurerm_network_security_group" "nsg-ckpmgmt" { + name = "nsg-${var.mgmt-name}" + location = azurerm_resource_group.rg-ckpmgmt.location + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + depends_on = [azurerm_resource_group.rg-ckpmgmt] +} + +# Create the NSG rules for the management +resource "azurerm_network_security_rule" "nsg-ckpmgmt-rl-ssh" { + priority = 100 + name = "ssh-access" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + + source_port_range = "*" + destination_port_range = "22" + source_address_prefix = var.my-pub-ip + destination_address_prefix = "*" + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + network_security_group_name = azurerm_network_security_group.nsg-ckpmgmt.name + depends_on = [azurerm_network_security_group.nsg-ckpmgmt] +} +resource "azurerm_network_security_rule" "nsg-ckpmgmt-rl-https" { + priority = 110 + name = "https-access" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + + source_port_range = "*" + destination_port_range = "443" + source_address_prefix = var.my-pub-ip + destination_address_prefix = "*" + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + network_security_group_name = azurerm_network_security_group.nsg-ckpmgmt.name + depends_on = [azurerm_network_security_group.nsg-ckpmgmt] +} +resource "azurerm_network_security_rule" "nsg-ckpmgmt-rl-smartconsole" { + priority = 120 + name = "smartconsole-access" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + + source_port_range = "*" + destination_port_ranges = ["18190","19009"] + source_address_prefix = var.my-pub-ip + destination_address_prefix = "*" + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + network_security_group_name = azurerm_network_security_group.nsg-ckpmgmt.name + depends_on = [azurerm_network_security_group.nsg-ckpmgmt] +} +resource "azurerm_network_security_rule" "nsg-ckpmgmt-rl-exposedsrvc" { + priority = 130 + name = "log-ICA-CRL-Policy-access" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + + source_port_range = "*" + destination_port_ranges = ["257","18210","18264","18191"] + source_address_prefix = "*" + destination_address_prefix = "*" + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + network_security_group_name = azurerm_network_security_group.nsg-ckpmgmt.name + depends_on = [azurerm_network_security_group.nsg-ckpmgmt] +} + +# Create Public IP +resource "azurerm_public_ip" "pub-ckpmgmt" { + name = "pub-${var.mgmt-name}" + location = azurerm_resource_group.rg-ckpmgmt.location + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + allocation_method = "Dynamic" + domain_name_label = "pub-${var.mgmt-name}-${var.mgmt-dns-suffix}" + depends_on = [azurerm_resource_group.rg-ckpmgmt] +} +# Create NIC +resource "azurerm_network_interface" "nic-ckpmgmt" { + name = "${var.mgmt-name}-eth0" + location = azurerm_resource_group.rg-ckpmgmt.location + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + enable_ip_forwarding = "false" + + ip_configuration { + name = "${var.mgmt-name}-eth0-config" + subnet_id = azurerm_subnet.net-secmgmt.id + primary = true + private_ip_address = "172.16.8.4" + private_ip_address_allocation = "Static" + public_ip_address_id = azurerm_public_ip.pub-ckpmgmt.id + } + depends_on = [azurerm_public_ip.pub-ckpmgmt,azurerm_subnet.net-secmgmt,azurerm_network_security_group.nsg-ckpmgmt] +} +resource "azurerm_network_interface_security_group_association" "nsg-assoc-nic-ckpmgmt" { + network_interface_id = azurerm_network_interface.nic-ckpmgmt.id + network_security_group_id = azurerm_network_security_group.nsg-ckpmgmt.id + depends_on = [azurerm_network_interface.nic-ckpmgmt,azurerm_network_security_group.nsg-ckpmgmt] +} + +# Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = azurerm_resource_group.rg-ckpmgmt.name + } + byte_length = 8 + depends_on = [azurerm_resource_group.rg-ckpmgmt] +} + +# Create storage account for boot diagnostics +resource "azurerm_storage_account" "ckp-storageaccount" { + name = "diag${random_id.randomId.hex}" + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + location = azurerm_resource_group.rg-ckpmgmt.location + account_tier = "Standard" + account_replication_type = "LRS" + depends_on = [random_id.randomId,azurerm_resource_group.rg-ckpmgmt] +} + +# Create virtual machine +resource "azurerm_virtual_machine" "ckpmgmt" { + name = var.mgmt-name + location = azurerm_resource_group.rg-ckpmgmt.location + resource_group_name = azurerm_resource_group.rg-ckpmgmt.name + network_interface_ids = [azurerm_network_interface.nic-ckpmgmt.id] + primary_network_interface_id = azurerm_network_interface.nic-ckpmgmt.id + vm_size = var.mgmt-size + + # parameters = { "installationType" = "management" } + + storage_os_disk { + name = "disk-${var.mgmt-name}" + caching = "ReadWrite" + create_option = "FromImage" + managed_disk_type = "Standard_LRS" + } + storage_image_reference { + publisher = "checkpoint" + offer = "check-point-cg-${var.mgmt-version}" + sku = var.mgmt-sku + version = "latest" + } + plan { + name = var.mgmt-sku + publisher = "checkpoint" + product = "check-point-cg-${var.mgmt-version}" + } + os_profile { + computer_name = var.mgmt-name + admin_username = var.chkp-admin-usr + admin_password = var.chkp-admin-pwd + custom_data = file("customdata.sh") + } + os_profile_linux_config { + disable_password_authentication = false + } + boot_diagnostics { + enabled = "true" + storage_uri = azurerm_storage_account.ckp-storageaccount.primary_blob_endpoint + } + depends_on = [azurerm_marketplace_agreement.cpmgmt-agreement,azurerm_resource_group.rg-ckpmgmt,azurerm_network_interface.nic-ckpmgmt,azurerm_storage_account.ckp-storageaccount] +} + +resource "azurerm_dns_a_record" "mgmt-dns-record" { + name = "ckpmgmt" + zone_name = azurerm_dns_zone.mydns-public-zone.name + resource_group_name = azurerm_resource_group.rg-dns-myzone.name + ttl = 300 + target_resource_id = azurerm_public_ip.pub-ckpmgmt.id + depends_on = [azurerm_public_ip.pub-ckpmgmt] +} +output "ckpmgmt-public-fqdn" { + value = "https://${azurerm_dns_a_record.mgmt-dns-record.name}.${azurerm_dns_zone.mydns-public-zone.name}/" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/cpmgmt-variables.tf b/contrib/terraform-azure-gwlb/cpmgmt-variables.tf new file mode 100644 index 00000000..ee9cc6a7 --- /dev/null +++ b/contrib/terraform-azure-gwlb/cpmgmt-variables.tf @@ -0,0 +1,28 @@ +variable "mgmt-name" { + description = "Choose the name of the management" + default = "ckpmgmt" +} +variable "mgmt-sku" { + description = "Choose the plan to deploy" + default = "mgmt-byol" +} +variable "mgmt-version" { + description = "Choose the version to deploy: either r8040, r81 or r8110" + default = "r8110" +} +variable "mgmt-size" { + description = "Choose the vm-size to deploy" + default = "Standard_D3_v2" +} +variable "chkp-admin-usr" { + default = "cpadmin" +} +variable "mgmt-sku-enabled" { + description = "Have you ever deployed a ckp management before? set to false if not" + type = bool + default = true +} +variable "mgmt-dns-suffix" { + description = "This is the public DNS suffix of your mgmt FQDN" + default = "testing" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/customdata.sh b/contrib/terraform-azure-gwlb/customdata.sh new file mode 100644 index 00000000..fe4840c0 --- /dev/null +++ b/contrib/terraform-azure-gwlb/customdata.sh @@ -0,0 +1,17 @@ +#!/bin/bash +clish -c 'set user admin shell /bin/bash' -s +config_system -s 'install_security_gw=false&install_ppak=false&gateway_cluster_member=false&install_security_managment=true&install_mgmt_primary=true&install_mgmt_secondary=false&download_info=true&hostname=ckpmgmt&mgmt_gui_clients_radio=any&mgmt_admin_radio=gaia_admin' +while true; do + status=`api status |grep 'API readiness test SUCCESSFUL. The server is up and ready to receive connections' |wc -l` + echo "Checking if the API is ready" + if [[ ! $status == 0 ]]; then + break + fi + sleep 15 + done +echo "API ready " `date` +sleep 5 +echo "Set R80 API to accept all ip addresses" +mgmt_cli -r true set api-settings accepted-api-calls-from "All IP addresses" --domain 'System Data' +echo "Restarting API Server" +api restart \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/deployment-variables.tf b/contrib/terraform-azure-gwlb/deployment-variables.tf new file mode 100644 index 00000000..0f74cb33 --- /dev/null +++ b/contrib/terraform-azure-gwlb/deployment-variables.tf @@ -0,0 +1,29 @@ +variable "azure-client-id" { + description = "Insert your application client-id" +} +variable "azure-client-secret" { + description = "Insert your application client-secret" +} +variable "azure-subscription" { + description = "Insert your subscription-id" +} +variable "azure-tenant" { + description = "Insert your active-directory-id" +} +variable "location" { + description = "Choose where to deploy the environment" + default = "France Central" +} +variable "mydns-zone" { + description = "Specify your dns zone" + type = string +} +variable "my-pub-ip" { + description = "Put your public-ip" +} +variable "chkp-admin-pwd" { + description = "Choose your admin password" +} +variable "chkp-sic" { + description = "Choose your gateway sic" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/files/azure-gwlb-template.json b/contrib/terraform-azure-gwlb/files/azure-gwlb-template.json new file mode 100644 index 00000000..edcc730c --- /dev/null +++ b/contrib/terraform-azure-gwlb/files/azure-gwlb-template.json @@ -0,0 +1,849 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R81.10 - Bring Your Own License", + "R81.10 - Pay As You Go (NGTP)", + "R81.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.10 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user is upgrading the CloudGuard VMSS solution" + } + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Gateway Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "lbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Gateway Load Balancer." + }, + "defaultValue": "" + }, + "lbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Gateway Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.0.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the subnet" + }, + "defaultValue": "10.0.0.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private" + ], + "defaultValue": "eth0-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external NIC's public or private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Gateway Load Balancer distribution method" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "vxlanTunnelExternalIdentifier": { + "type": "int", + "minValue": 800, + "maxValue": 1000, + "defaultValue": 801, + "metadata": { + "description": "VXLAN tunnel external identifier. A value between 800-1000." + } + }, + "vxlanTunnelExternalPort": { + "type": "int", + "defaultValue": 2001, + "metadata": { + "description": "VXLAN tunnel external port number." + } + }, + "vxlanTunnelInternalIdentifier": { + "type": "int", + "minValue": 800, + "maxValue": 1000, + "defaultValue": 800, + "metadata": { + "description": "VXLAN tunnel internal identifier. A value between 800-1000." + } + }, + "vxlanTunnelInternalPort": { + "type": "int", + "defaultValue": 2000, + "metadata": { + "description": "VXLAN Tunnel Internal port number." + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "templateName": "gwlb", + "templateVersion": "20211101", + "location": "[parameters('location')]", + "offers": { + "R81.10 - Bring Your Own License": "BYOL", + "R81.10 - Pay As You Go (NGTP)": "NGTP", + "R81.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R81.10 - Bring Your Own License": "R8110", + "R81.10 - Pay As You Go (NGTP)": "R8110", + "R81.10 - Pay As You Go (NGTX)": "R8110" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "subnet1Name": "[parameters('subnet1Name')]", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "gwlb", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/gateway-load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "lbsTargetRGName": "[parameters('lbsTargetRGName')]", + "lbRGName": "[if(variables('upgrading'), variables('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "vnetRGName": "[if(equals(parameters('vnetNewOrExisting'), 'new'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "vnetName": "[if(equals(parameters('vnetNewOrExisting'), 'new'), parameters('virtualNetworkName'), parameters('virtualNetworkName'))]", + "vnetID": "[if(equals(parameters('vnetNewOrExisting'), 'new'), resourceId(variables('vnetRGName'),'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(variables('vnetRGName'),'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth", + "southafricanorth", + "southcentralus", + "germanywestcentral", + "canadacentral", + "japaneast" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), 'eth0-private')]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtIPaddress": "[parameters('mgmtIPaddress')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "eth0", + "x-chkp-topology": "eth0:external", + "x-chkp-anti-spoofing": "eth0:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-5432b4df-d783-57a2-b65f-39f4bca4974a", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2019-12-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ] + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + }, + "deployRouteTable": { + "value": true + }, + "deployGWLB": { + "value": true + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + }, + "deployGWLB": { + "value": true + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet1StartAddress": { + "value": "[parameters('subnet1StartAddress')]" + }, + "subnet1Id": { + "value": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]" + }, + "lbResourceId": { + "value": "[parameters('lbResourceId')]" + }, + "lbTargetBEAddressPoolName": { + "value": "[parameters('lbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "vxlanTunnelExternalPort": { + "value": "[parameters('vxlanTunnelExternalPort')]" + }, + "vxlanTunnelExternalIdentifier": { + "value": "[parameters('vxlanTunnelExternalIdentifier')]" + }, + "vxlanTunnelInternalPort": { + "value": "[parameters('vxlanTunnelInternalPort')]" + }, + "vxlanTunnelInternalIdentifier": { + "value": "[parameters('vxlanTunnelInternalIdentifier')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2020-06-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.nsgProperties.value, reference('networkExistingSetup').outputs.nsgProperties.value)]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.lbId.value), json('null'), reference('loadBalancerSetup').outputs.lbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2019-06-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + } + } + ], + "outputs": { + "GatewayLoadBalancerId": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.lbId.value]" + } + } +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/gwlb-main.tf b/contrib/terraform-azure-gwlb/gwlb-main.tf new file mode 100644 index 00000000..cd6c4cc7 --- /dev/null +++ b/contrib/terraform-azure-gwlb/gwlb-main.tf @@ -0,0 +1,156 @@ +# Accept the agreement for the mgmt-byol for R80.40 +resource "azurerm_marketplace_agreement" "gwlb-vmss-agreement" { + count = var.gwlb-vmss-agreement ? 0 : 1 + publisher = "checkpoint" + offer = "check-point-cg-r8110" + plan = "sg-byol" +} + +# Create gwlb resource group +resource "azurerm_resource_group" "rg-gwlb-vmss" { + name = "rg-${var.gwlb-name}" + location = var.location +} +resource "azurerm_resource_group_template_deployment" "template-deployment-gwlb" { + name = "${var.gwlb-name}-deploy" + resource_group_name = azurerm_resource_group.rg-gwlb-vmss.name + deployment_mode = "Complete" + + template_content = file("files/azure-gwlb-template.json") + parameters_content = <= 100 && tonumber(var.disk_size) <= 3995 ? 0 : "variable disk_size must be a number between 100 and 3995" +} + +//************** Storage OS disk variables **************// +variable "storage_os_disk_create_option" { + description = "The method to use when creating the managed disk" + type = string + default = "FromImage" +} + +variable "storage_os_disk_caching" { + description = "Specifies the caching requirements for the OS Disk" + default = "ReadWrite" +} + +variable "managed_disk_type" { + description = "Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS" + type = string + default = "Standard_LRS" +} + +locals { // locals for 'managed_disk_type' allowed values + managed_disk_type_allowed_values = [ + "Standard_LRS", + "Premium_LRS" + ] + // will fail if [var.managed_disk_type] is invalid: + validate_managed_disk_type_value = index(local.managed_disk_type_allowed_values, var.managed_disk_type) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + + +//********************** Role Assigments variables**************************// +variable "role_definition" { + description = "Role definition. The full list of Azure Built-in role descriptions can be found at https://docs.microsoft.com/bs-latn-ba/azure/role-based-access-control/built-in-roles" + type = string + default = "Contributor" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/common/versions.tf b/contrib/terraform-azure-gwlb/modules/common/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/common/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/network-security-group/main.tf b/contrib/terraform-azure-gwlb/modules/network-security-group/main.tf new file mode 100644 index 00000000..1beeaf14 --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/network-security-group/main.tf @@ -0,0 +1,23 @@ +resource "azurerm_network_security_group" "nsg" { + name = var.security_group_name + location = var.location + resource_group_name = var.resource_group_name + tags = var.tags + } + +//************ Security Rule Example **************// +resource "azurerm_network_security_rule" "security_rule" { + count = length(var.security_rules) + name = lookup(var.security_rules[count.index], "name") + priority = lookup(var.security_rules[count.index], "priority", 4096 - length(var.security_rules) + count.index) + direction = lookup(var.security_rules[count.index], "direction") + access = lookup(var.security_rules[count.index], "access") + protocol = lookup(var.security_rules[count.index], "protocol") + source_port_range = lookup(var.security_rules[count.index], "source_port_ranges") + destination_port_range = lookup(var.security_rules[count.index], "destination_port_ranges") + description = lookup(var.security_rules[count.index], "description") + source_address_prefix = lookup(var.security_rules[count.index], "source_address_prefix") + destination_address_prefix = lookup(var.security_rules[count.index], "destination_address_prefix") + resource_group_name = var.resource_group_name + network_security_group_name = azurerm_network_security_group.nsg.name +} diff --git a/contrib/terraform-azure-gwlb/modules/network-security-group/output.tf b/contrib/terraform-azure-gwlb/modules/network-security-group/output.tf new file mode 100644 index 00000000..c1aa127d --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/network-security-group/output.tf @@ -0,0 +1,7 @@ +output "network_security_group_id" { + value = azurerm_network_security_group.nsg.id +} + +output "network_security_group_name" { + value = azurerm_network_security_group.nsg.name +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/network-security-group/variables.tf b/contrib/terraform-azure-gwlb/modules/network-security-group/variables.tf new file mode 100644 index 00000000..363489e3 --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/network-security-group/variables.tf @@ -0,0 +1,43 @@ +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + type = string + description = "The location/region where Network Security Group will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" +} + +variable "security_group_name" { + description = "Network Security Group name" + default = "nsg" +} + +variable "tags" { + description = "The tags to associate with Network Security Group" + type = map(string) + default = {} +} + +# Security Rules definition + +variable "security_rules" { + description = "Security rules for the Network Security Group using this format name = [priority, direction, access, protocol, source_port_range, destination_port_range, source_address_prefix, destination_address_prefix, description]" + type = list(any) + default = [] +} + +variable "source_address_prefix" { + description = "Source address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/24"] or ["VirtualNetwork"] +} + +variable "destination_address_prefix" { + description = "Destination address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/32","10.0.3.128/32"] or ["VirtualNetwork"] +} + diff --git a/contrib/terraform-azure-gwlb/modules/network-security-group/versions.tf b/contrib/terraform-azure-gwlb/modules/network-security-group/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/network-security-group/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/vnet/main.tf b/contrib/terraform-azure-gwlb/modules/vnet/main.tf new file mode 100644 index 00000000..4f9a318b --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/vnet/main.tf @@ -0,0 +1,80 @@ +resource "azurerm_virtual_network" "vnet" { + name = var.vnet_name + location = var.location + address_space = [var.address_space] + resource_group_name = var.resource_group_name + dns_servers = var.dns_servers + tags = var.tags +} + +resource "azurerm_subnet" "subnet" { + depends_on = [azurerm_virtual_network.vnet] + count = length(var.subnet_names) + name = var.subnet_names[count.index] + virtual_network_name = azurerm_virtual_network.vnet.name + resource_group_name = var.resource_group_name + address_prefixes = [var.subnet_prefixes[count.index]] +} + +resource "azurerm_subnet_network_security_group_association" "security_group_frontend_association" { + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[0]] + subnet_id = azurerm_subnet.subnet[0].id + network_security_group_id = var.nsg_id +} +resource "azurerm_subnet_network_security_group_association" "security_group_backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[1]] + subnet_id = azurerm_subnet.subnet[1].id + network_security_group_id = var.nsg_id +} + +locals { // locals for 'next_hop_type' allowed values + next_hop_type_allowed_values = [ + "VirtualNetworkGateway", + "VnetLocal", + "Internet", + "VirtualAppliance", + "None" + ] +} + +resource "azurerm_route_table" "frontend" { + name = azurerm_subnet.subnet[0].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "Local-Subnet" + address_prefix = azurerm_subnet.subnet[0].address_prefix + next_hop_type = local.next_hop_type_allowed_values[1] + } + route { + name = "To-Internal" + address_prefix = var.address_space + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "frontend_association" { + subnet_id = azurerm_subnet.subnet[0].id + route_table_id = azurerm_route_table.frontend.id +} + +resource "azurerm_route_table" "backend" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + name = azurerm_subnet.subnet[1].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "To-Internet" + address_prefix = "0.0.0.0/0" + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + subnet_id = azurerm_subnet.subnet[1].id + route_table_id = azurerm_route_table.backend[count.index].id +} diff --git a/contrib/terraform-azure-gwlb/modules/vnet/outputs.tf b/contrib/terraform-azure-gwlb/modules/vnet/outputs.tf new file mode 100644 index 00000000..9dc8e206 --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/vnet/outputs.tf @@ -0,0 +1,27 @@ +output "vnet_id" { + value = azurerm_virtual_network.vnet.id +} + +output "vnet_name" { + value = azurerm_virtual_network.vnet.name +} + +output "vnet_location" { + value = azurerm_virtual_network.vnet.location +} + +output "vnet_address_space" { + value = azurerm_virtual_network.vnet.address_space +} + +output "vnet_subnets" { + value = azurerm_subnet.subnet.*.id +} + +output "subnet_prefixes" { + value = var.subnet_prefixes +} + +output "allocation_method" { + value = var.allocation_method +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/vnet/variables.tf b/contrib/terraform-azure-gwlb/modules/vnet/variables.tf new file mode 100644 index 00000000..d40a6bba --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/vnet/variables.tf @@ -0,0 +1,63 @@ +variable "vnet_name" { + description = "Name of Virtual Network" + type = string + default = "vnet01" +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where the core network will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +variable "address_space" { + description = "The address prefixes of the virtual network" + type = string + default = "10.0.0.0/16" +} + +variable "dns_servers" { + description = " DNS servers to be used with a Virtual Network. If no values specified, this defaults to Azure DNS" + type = list(string) + default = [] +} + +variable "subnet_prefixes" { + description = "The address prefixes to be used for subnets" + type = list(string) + default = ["10.0.0.0/24","10.0.1.0/24"] +} + +variable "subnet_names" { + description = "A list of subnets's names in a Virtual Network" + type = list(string) + default = ["Frontend","Backend"] +} + +variable "tags" { + description = "Tags to be associated with Virual Network and subnets" + type = map(string) + default = {} +} +variable "nsg_id" { + description = "Network security group to be associated with a Virual Network and subnets" + type = string +} + +variable "allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +locals { // locals for 'allocation_method' allowed values + allocation_method_allowed_values = [ + "Static" + ] + // will fail if [var.allocation_method] is invalid: + validate_method_allowed_value = index(local.allocation_method_allowed_values, var.allocation_method) +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/modules/vnet/versions.tf b/contrib/terraform-azure-gwlb/modules/vnet/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/contrib/terraform-azure-gwlb/modules/vnet/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/net-main.tf b/contrib/terraform-azure-gwlb/net-main.tf new file mode 100644 index 00000000..18b53a4a --- /dev/null +++ b/contrib/terraform-azure-gwlb/net-main.tf @@ -0,0 +1,261 @@ +# Creation of DNS Zone +resource "azurerm_resource_group" "rg-dns-myzone" { + name = "rg-dns-myzone" + location = var.location +} +resource "azurerm_dns_zone" "mydns-public-zone" { + name = var.mydns-zone + resource_group_name = azurerm_resource_group.rg-dns-myzone.name +} + +# Creation of the Management Hub +resource "azurerm_resource_group" "rg-vnet-secmgmt" { + name = "rg-v${var.net-secmgmt}" + location = var.location +} +resource "azurerm_network_security_group" "nsg-vnet-secmgmt" { + name = "nsg-v${var.net-secmgmt}" + location = azurerm_resource_group.rg-vnet-secmgmt.location + resource_group_name = azurerm_resource_group.rg-vnet-secmgmt.name + depends_on = [azurerm_resource_group.rg-vnet-secmgmt] +} +resource "azurerm_virtual_network" "vnet-secmgmt" { + name = "v${var.net-secmgmt}" + address_space = ["172.16.8.0/22"] + location = azurerm_resource_group.rg-vnet-secmgmt.location + resource_group_name = azurerm_resource_group.rg-vnet-secmgmt.name + depends_on = [azurerm_resource_group.rg-vnet-secmgmt] +} +resource "azurerm_subnet" "net-secmgmt" { + name = var.net-secmgmt + address_prefixes = ["172.16.8.0/24"] + virtual_network_name = azurerm_virtual_network.vnet-secmgmt.name + resource_group_name = azurerm_resource_group.rg-vnet-secmgmt.name + depends_on = [azurerm_virtual_network.vnet-secmgmt] +} + +# Creation of the Northbound Hub +resource "azurerm_resource_group" "rg-vnet-north" { + name = "rg-v${var.net-north}" + location = var.location +} +resource "azurerm_network_security_group" "nsg-vnet-north" { + name = "nsg-v${var.net-north}" + location = azurerm_resource_group.rg-vnet-north.location + resource_group_name = azurerm_resource_group.rg-vnet-north.name + depends_on = [azurerm_resource_group.rg-vnet-north] +} +resource "azurerm_virtual_network" "vnet-north" { + name = "v${var.net-north}" + address_space = ["172.16.0.0/22"] + location = azurerm_resource_group.rg-vnet-north.location + resource_group_name = azurerm_resource_group.rg-vnet-north.name + depends_on = [azurerm_resource_group.rg-vnet-north] +} +resource "azurerm_subnet" "net-north-gateways" { + name = "${var.net-north}-gateways" + address_prefixes = ["172.16.0.0/24"] + virtual_network_name = azurerm_virtual_network.vnet-north.name + resource_group_name = azurerm_resource_group.rg-vnet-north.name + depends_on = [azurerm_virtual_network.vnet-north] +} + +# Peering from/to Management Hub to Nouthbound Hub +resource "azurerm_virtual_network_peering" "vnet-secmgmt-to-vnet-north" { + name = "v${var.net-secmgmt}-to-${data.azurerm_virtual_network.vnet-north-gwlb.name}" + resource_group_name = "rg-v${var.net-secmgmt}" + virtual_network_name = azurerm_virtual_network.vnet-secmgmt.name + remote_virtual_network_id = data.azurerm_virtual_network.vnet-north-gwlb.id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false + depends_on = [azurerm_subnet.net-secmgmt,azurerm_subnet.net-north-gateways] +} +resource "azurerm_virtual_network_peering" "vnet-north-to-vnet-secmgmt" { + name = "${data.azurerm_virtual_network.vnet-north-gwlb.name}-to-v${var.net-secmgmt}" + resource_group_name = azurerm_resource_group.rg-gwlb-vmss.name + virtual_network_name = data.azurerm_virtual_network.vnet-north-gwlb.name + remote_virtual_network_id = azurerm_virtual_network.vnet-secmgmt.id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false + depends_on = [azurerm_subnet.net-secmgmt,azurerm_subnet.net-north-gateways] +} + +# Creation of the Spoke Num +resource "azurerm_resource_group" "rg-vnet-spoke" { + count = length(var.num-spoke) + name = "rg-v${var.net-spoke}-${count.index}" + location = var.location +} +resource "azurerm_network_security_group" "nsg-vnet-spoke" { + count = length(var.num-spoke) + name = "nsg-v${var.net-spoke}-${count.index}" + location = var.location + resource_group_name = "rg-v${var.net-spoke}-${count.index}" + depends_on = [azurerm_resource_group.rg-vnet-spoke] +} +resource "azurerm_virtual_network" "vnet-spoke" { + count = length(var.num-spoke) + name = "v${var.net-spoke}-${count.index}" + location = var.location + address_space = ["${lookup(var.num-spoke, count.index)[0]}/22"] + resource_group_name = "rg-v${var.net-spoke}-${count.index}" + depends_on = [azurerm_resource_group.rg-vnet-spoke] +} +resource "azurerm_subnet" "net-spoke-0-web" { + name = "${var.net-spoke}-0-web" + virtual_network_name = "v${var.net-spoke}-0" + resource_group_name = "rg-v${var.net-spoke}-0" + address_prefixes = ["${lookup(var.num-spoke, 0)[0]}/24"] + + delegation { + name = "delegation" + service_delegation { + name = "Microsoft.ContainerInstance/containerGroups" + actions = ["Microsoft.Network/virtualNetworks/subnets/action"] + } + } + depends_on = [azurerm_virtual_network.vnet-spoke] +} +resource "azurerm_subnet" "net-spoke-1-web" { + name = "${var.net-spoke}-1-web" + virtual_network_name = "v${var.net-spoke}-1" + resource_group_name = "rg-v${var.net-spoke}-1" + address_prefixes = ["${lookup(var.num-spoke, 1)[0]}/24"] + + depends_on = [azurerm_virtual_network.vnet-spoke] +} +resource "azurerm_subnet" "net-spoke-db" { + count = length(var.num-spoke) + name = "${var.net-spoke}-${count.index}-db" + + virtual_network_name = "v${var.net-spoke}-${count.index}" + resource_group_name = "rg-v${var.net-spoke}-${count.index}" + address_prefixes = ["${lookup(var.num-spoke, count.index)[1]}/24"] + depends_on = [azurerm_virtual_network.vnet-spoke] +} +# Routing Tables for Spoke +locals { // locals for 'next_hop_type' allowed values + next_hop_type_allowed_values = ["VirtualNetworkGateway","VnetLocal","Internet","VirtualAppliance","None"] +} + resource "azurerm_route_table" "rt-vnet-spoke" { + count = length(var.num-spoke) + name = "rt-v${var.net-spoke}-${count.index}" + location = var.location + resource_group_name = "rg-v${var.net-spoke}-${count.index}" + depends_on = [azurerm_resource_group.rg-vnet-spoke] + + route { + name = "route-to-internet" + address_prefix = "0.0.0.0/0" + next_hop_type = local.next_hop_type_allowed_values[2] + # next_hop_type = local.next_hop_type_allowed_values[3] + # next_hop_in_ip_address = var.spokes-default-gateway + } + route { + name = "route-to-vnet-addrspace" + address_prefix = azurerm_virtual_network.vnet-spoke[count.index].address_space[0] + next_hop_type = local.next_hop_type_allowed_values[1] + } + route { + name = "route-to-internal-networks" + address_prefix = "10.0.0.0/16" + next_hop_type = local.next_hop_type_allowed_values[3] + next_hop_in_ip_address = var.spokes-default-gateway + } +} +resource "azurerm_subnet_route_table_association" "rt-assoc-net-spoke-db" { + count = length(var.num-spoke) + subnet_id = azurerm_subnet.net-spoke-db[count.index].id + route_table_id = azurerm_route_table.rt-vnet-spoke[count.index].id + depends_on = [azurerm_subnet.net-spoke-db,azurerm_route_table.rt-vnet-spoke] +} +resource "azurerm_subnet_route_table_association" "rt-assoc-net-spoke-0-web" { + subnet_id = azurerm_subnet.net-spoke-0-web.id + route_table_id = azurerm_route_table.rt-vnet-spoke[0].id + depends_on = [azurerm_subnet.net-spoke-0-web,azurerm_route_table.rt-vnet-spoke] +} +resource "azurerm_subnet_route_table_association" "rt-assoc-net-spoke-1-web" { + subnet_id = azurerm_subnet.net-spoke-1-web.id + route_table_id = azurerm_route_table.rt-vnet-spoke[1].id + depends_on = [azurerm_subnet.net-spoke-1-web,azurerm_route_table.rt-vnet-spoke] +} + +# Creation of the Southbound Hub +resource "azurerm_resource_group" "rg-vnet-south" { + name = "rg-v${var.net-south}" + location = var.location +} +resource "azurerm_network_security_group" "nsg-vnet-south" { + name = "nsg-v${var.net-south}" + location = var.location + resource_group_name = "rg-v${var.net-south}" + depends_on = [azurerm_resource_group.rg-vnet-south] +} +resource "azurerm_virtual_network" "vnet-south" { + name = "v${var.net-south}" + address_space = ["172.16.4.0/22"] + location = var.location + resource_group_name = "rg-v${var.net-south}" + tags = { + environment = "south" + } + depends_on = [azurerm_resource_group.rg-vnet-south] +} +resource "azurerm_subnet" "net-south-frontend" { + name = "${var.net-south}-frontend" + address_prefixes = ["172.16.4.0/24"] + virtual_network_name = "v${var.net-south}" + resource_group_name = "rg-v${var.net-south}" + depends_on = [azurerm_virtual_network.vnet-south] +} +resource "azurerm_subnet" "net-south-backend" { + name = "${var.net-south}-backend" + address_prefixes = ["172.16.5.0/24"] + virtual_network_name = "v${var.net-south}" + resource_group_name = "rg-v${var.net-south}" + depends_on = [azurerm_virtual_network.vnet-south] +} +# Peering from/to Management Hub to Southbound Hub +resource "azurerm_virtual_network_peering" "vnet-secmgmt-to-vnet-south" { + name = "v${var.net-secmgmt}-to-v${var.net-south}" + resource_group_name = "rg-v${var.net-secmgmt}" + virtual_network_name = "v${var.net-secmgmt}" + remote_virtual_network_id = azurerm_virtual_network.vnet-south.id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false + depends_on = [azurerm_subnet.net-secmgmt,azurerm_subnet.net-south-backend,azurerm_subnet.net-south-frontend] +} +resource "azurerm_virtual_network_peering" "vnet-south-to-vnet-secmgmt" { + name = "v${var.net-south}-to-v${var.net-secmgmt}" + resource_group_name = "rg-v${var.net-south}" + virtual_network_name = "v${var.net-south}" + remote_virtual_network_id = azurerm_virtual_network.vnet-secmgmt.id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false + depends_on = [azurerm_subnet.net-secmgmt,azurerm_subnet.net-south-backend,azurerm_subnet.net-south-frontend] +} +# Peering from/to spoke to south +resource "azurerm_virtual_network_peering" "vnet-spoke-to-vnet-south" { + count = length(var.num-spoke) + name = "v${var.net-spoke}-${count.index}-to-v${var.net-south}" + resource_group_name = "rg-v${var.net-spoke}-${count.index}" + virtual_network_name = "v${var.net-spoke}-${count.index}" + remote_virtual_network_id = azurerm_virtual_network.vnet-south.id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false +} +resource "azurerm_virtual_network_peering" "vnet-south-to-vnet-spoke" { + count = length(var.num-spoke) + name = "v${var.net-south}-to-v${var.net-spoke}-${count.index}" + resource_group_name = "rg-v${var.net-south}" + virtual_network_name = "v${var.net-south}" + remote_virtual_network_id = azurerm_virtual_network.vnet-spoke[count.index].id + allow_virtual_network_access = true + allow_forwarded_traffic = true + allow_gateway_transit = false +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/net-variables.tf b/contrib/terraform-azure-gwlb/net-variables.tf new file mode 100644 index 00000000..7e1b00c3 --- /dev/null +++ b/contrib/terraform-azure-gwlb/net-variables.tf @@ -0,0 +1,26 @@ +variable "net-north" { + description = "resources in the north" + default = "net-north" +} +variable "net-south" { + description = "resources in the south" + default = "net-south" +} +variable "net-secmgmt" { + description = "resources in the management" + default = "net-mgmt" +} +variable "net-spoke" { + description = "resources in the spoke" + default = "net-spoke" +} +variable "num-spoke" { + default = { + "0" = ["10.0.0.0","10.0.1.0"] + "1" = ["10.0.4.0","10.0.5.0"] + } +} +variable "spokes-default-gateway" { + type = string + default = "172.16.5.5" +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/terraform.tfvars b/contrib/terraform-azure-gwlb/terraform.tfvars new file mode 100644 index 00000000..f35851c3 --- /dev/null +++ b/contrib/terraform-azure-gwlb/terraform.tfvars @@ -0,0 +1,31 @@ +# Set in this file your deployment variables +# Specify the Azure values +azure-client-id = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-client-secret = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-subscription = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-tenant = "xxxxx-xxxxx-xxxxx-xxxxx" + +# Specify where you want to deploy it and where you are coming from +location = "France Central" +my-pub-ip = "x.x.x.x/32" + +# Management details +mgmt-sku-enabled = false # Have you ever deployed a R81.10 CKP management? Set to false if not +mgmt-dns-suffix = "xxxxx" +mgmt-admin-pwd = "xxxxx" + +# VMspoke details +vmspoke-sku-enabled = false # Have you ever deployed a Nginx VM before? set to false if not +vmspoke-usr = "xxxxx" +vmspoke-pwd = "xxxxx" + +# Cluster Details +cpcluster-sku-enabled = false # Have you ever deployed a R80.40 CKP cluster? set to false if not" +admin_username = "xxxxx" +admin_password = "xxxxx" +sic_key = "xxxxx" + +# GWLB VMSS Details +gwlb-vmss-agreement = false # Have you ever deployed a GWLB VMSS? set to false if not +chkp-admin-pwd = "xxxxx" +chkp-sic = "xxxxx" diff --git a/contrib/terraform-azure-gwlb/tfc-project.tf b/contrib/terraform-azure-gwlb/tfc-project.tf new file mode 100644 index 00000000..937c0e2b --- /dev/null +++ b/contrib/terraform-azure-gwlb/tfc-project.tf @@ -0,0 +1,20 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = ">= 2.92.0" + } + random = { + version = ">= 2.2.1" + } + } +} + +# Configuration of Terraform with Azure environment variables +provider "azurerm" { + features { } + client_id = var.azure-client-id + client_secret = var.azure-client-secret + subscription_id = var.azure-subscription + tenant_id = var.azure-tenant +} \ No newline at end of file diff --git a/contrib/terraform-azure-gwlb/zimages/azure-gwlb-design.jpg b/contrib/terraform-azure-gwlb/zimages/azure-gwlb-design.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fcd13c4f64bdea40b9eeddfde8f468150571a772 GIT binary patch literal 329545 zcmeFY2UJsE^ez}hK$>)r8Wj+v{^*^E2nq;D??jq3>AfY20!oW?=}MIv>7CFK5KwyW z(n~@KffQbT|2OmgYrUCSQ`XFzwPwxDJu53K_a^7NXP*L}lAN6EHZ>(RH5DZl70n$6I+{E5cc`f7 zSm@{(nV6ZGscBj7vM}9cU}9$a_eXA!5bwD~N94Eq#|BWPY1YpgM{SfEs}qGO}sjs z_&wkjJt@O|aaA%#eOvMe-b@nj62IN%c~afQZ14xkD{1EwK|#sFdY6rz?;*dyBS9%? z8Cf}b1+}N@8qc0V;<^DK`LD448?yfn7d;Wz&0DufZjt|s>&DGMVk4oyMS5SHj6qeO+}4}% zfyBGpOivQORd-SFNE#rS?R@@FvhYf+@uB{O_8-Xpj{%GLzl7|+0sBu}^8jj+8^pmQ zp$C8fc*Fb{0l`u&l{-^P>#H{$DtQHiW?;~QRT7a z>`Xi({5A5`a+zjY25=jzYRlU3dM>Sr=e21^ggp+S=TW=-O`kPBDr+;ovyokgE%2;? zqaFr98yAc-?y&hS1f)Rjc$FZfFYzeJ4Y4>CNjDov^LHJexNE@9m4AoH?b_eG_J}vx z$%`|#tMJ+Fb!fcEMl-wM&U6iRMN3`&&1Y4k;A;REd_n-3OGT<@(ov;B;R&D(FaH_*1yc5q6p3Az z8YKI)9x4w9M%Fbwr1)}0>O}>-@CCD5Ujw>S2oDw(j$`$Idw|(alD1w#-hS!CyA5>Q z3u8nLbZ3xYqE%adyboYFQPRAjGJanu@6A>{jCND*8nCpAlF2KBzSl$~OQh3nV`!J{ zy=J1V*>Q$0VSldH)FFP5v1>qs4FZYYTX>GLI^8F*^YUlhU-5TUHvV*(0`()@3dG<3 zT|Z3A=!_1jO84hN=LOzPqxz_8Jb7^q*bmqRQ)D?bRpjQ!I|j8EHb6IVu(lz|3Q=#J zq1d`KR4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for R80.30 only;
"sg-ngtx-v2" - NGTX PAYG license for R80.30 only;
"sg-ngtp" - NGTP PAYG license for R80.40 only;
"sg-ngtx" - NGTX PAYG license for R80.40 only | + | | | | | | + | **vm_os_offer** | Storage data disk size size(GB) | string | "check-point-cg-r8030";
"check-point-cg-r8040"; | + | | | | | | + | **os_version** | GAIA OS version | string | "R80.30";
"R80.40"; | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | + | | | | | | + | **disable_password_authentication** | Specifies whether password authentication should be disabled | boolean | true;
false; | + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | + | | | | | | + | **mgmt_vnet_name** | The name of the vNET in which the management server is deployed in | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | + | | | | | | + | **mgmt_resource_group_name** | The of the Resource Group in which the management server is deployed in | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | + | | | | | | + | **management_interface** | Manages the Gateways in the VMSS | string | "eth0" - An instance's external NIC's private IP address;
"eth1" - an instance's internal NIC's private IP address | + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | + + +## Example + resource_group_name = "checkpoint-vmss-terraform" + location = "eastus" + vmss_name = "checkpoint-vmss-terraform" + vnet_name = "checkpoint-vmss-vnet" + address_space = "10.0.0.0/16" + subnet_prefixes = ["10.0.1.0/24","10.0.2.0/24"] + backend_lb_IP_address = 4 + admin_password = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8030" + os_version = "R80.30" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + disable_password_authentication = true + availability_zones_num = "1" + minimum_number_of_vm_instances = 2 + maximum_number_of_vm_instances = 10 + management_name = "mgmt" + management_IP = "1.2.3.4" + management_interface = "eth0" + configuration_template_name = "vmss_template" + notification_email = "" + frontend_load_distribution = "Default" + backend_load_distribution = "Default" + mgmt_vnet_name = "mgmt_vnet" + mgmt_resource_group_name = "management" +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/azure_public_key b/contrib/terraform/azure/vmss-new-vnet-with-peer/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/cloud-init.sh b/contrib/terraform/azure/vmss-new-vnet-with-peer/cloud-init.sh new file mode 100755 index 00000000..905304fc --- /dev/null +++ b/contrib/terraform/azure/vmss-new-vnet-with-peer/cloud-init.sh @@ -0,0 +1,12 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion= "${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +vnet="${vnet}" \ No newline at end of file diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/images/Topology-2.JPG b/contrib/terraform/azure/vmss-new-vnet-with-peer/images/Topology-2.JPG new file mode 100644 index 0000000000000000000000000000000000000000..ec9fa4413a32e5f84c3c379c2de4abae45faf207 GIT binary patch literal 51157 zcmeFY1z256wk|peP9Q*VC%6+lcnHCRyNBQq+;t%Vf?I$DcbDK2G&lse0Kp-++rk!i zrn_JF-raqq-?``9_rALqUqRKR)~p(TjT$v-$o=>GWdKW7QbrPhgM$NJgFnFi3Kmqt z-O>yI92LgW}@CO2aAn-Q? zIG=Jp6?n=mz`;k!!7aeUDZtGK{Ih2OAO_d~mVh%r38(_bfCXUtr_7hq?%bz(Czv3q06W^8A}?rvny&cXJS9S{L7jHg%?aV`^?`D@=d*rH!7_ z(nOeElSlrkyuG-og{8Eoqp7N=f|{|XwK2a5y{HHVnvlDIyN$h#sk0HKyUkl$Cjob1 zsz1G50IdId%uXdD1kFFnAPFx6k?;^yYY=ElWl=V;E(!Ozdn{*;rQlam$f z!Rq8;>uluCYU@P(mlwP=buxCew0E|&v!(p?LZdf!F3!SKE-scP0%k^LJa0@)cv#;U zahb4kaF`ge8kul$u$pjjneg#&JmWOuctiD<;Z2PHI=a1!~${ipDQG=hBu#2rnIoK0VXMda5avp(f!<=|8Me-@sN=NYdM z```5wV*drkZzlS`cjo^ov_ynVj0KE;&E3xN&%>*lI{epG`>mzO?-lDm(+NKQa|Ij# z$mySukkOJ65K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Sz> z?_~>SU9U2mZ?}~1zSgJckj%x$eJrKhtP?KXtEhLoVyaOp{a5MGt6!`)MbCUY@yTt^ zhc#{vPd?cCW&m$#2>ua%_pdRTg&j!ZQ`Oug{yC?bXF_vj5OL z**3F2U1o2W>ikVcYv&}GNS>eKX7{Y}_GR0Zmn)JTcbc(1cDcONDkCr{?vmMWjhI}) zCp9x}?YP~OP!+aRgmET+TZwl4roZ!DFE9En)2qAfv`f6=?e|6rHEXITo?Q9xlF9At z+q+NK+FjG0eTRGHCD!mA2M*jjkh+17tvFm`0nc6K!?Wbu|Ga-AEA4;T=I_4z8*78) zjq?h3XGj7s*?pC9xyEu)#`oa6nNoK16AKIf?TU^L>3sU!-Y|gk`8<#xRxf`!P0Dxu z%`K~?vn9;MKdoIDalP=#91UjmYiqIGtwL-agscv=214bLS|3?Sub3awvf*>k*PD~= z4R{#Ykl3Ap3>)U!2pLLCooK6*)vph+^k`lHz6Mlb9 zSSqZwgiedRFPSatc=g@eiBB9`rliK!^%%H6$lCr*1voKweA&ho2duTdHuL}KSW_Q$ zbo6y0rao>6T#NWY*NhZ*Ki~x$@=lzi%ypo4CJbU3A}47hl8| zqLjz6`-E2}~@XnucKJQYKZA0nt*CGE- zuiJkAYEJv#;th#^o|>+9jhgIrf061@W9{F@!S!Evy?OomN%WEZzl65Rf9Q_}4k^lC z7oWawwe8^?`;ZvTKdxC9{cm|MC|YEp`*3Sx; /home/admin/bootstrap.txt" +} + +variable "notification_email" { + description = "Specifies a list of custom email addresses to which the email notifications will be sent" + type = string +} + +//********************** Credentials **************************// +//variable "tenant_id" {} + +//variable "subscription_id" {} + +//variable "client_id" {} + +//variable "client_secret" {} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/deprecated/README.md b/deprecated/README.md new file mode 100644 index 00000000..8a7296cf --- /dev/null +++ b/deprecated/README.md @@ -0,0 +1,2 @@ +## Disclaimer +The content of this directory is released under an as-is, best effort, support policy. We do not provide technical support in using or troubleshooting the content of this directory through our normal support options. diff --git a/deprecated/aws/templates/README.md b/deprecated/aws/templates/README.md new file mode 100644 index 00000000..0ccf274d --- /dev/null +++ b/deprecated/aws/templates/README.md @@ -0,0 +1,13 @@ +# Deprecated AWS CloudFormation templates +This directory contains deprecated CloudGuard IaaS solution templates. + +# How to manually deploy the templates +To deploy a CloudFormation template, follow these instructions: +1. Log in and navigate to the [AWS CloudForamtion page](https://console.aws.amazon.com/cloudformation/) +2. Click "*Create stack*" +3. Click "*With new resources (standard)*" +4. Select "*Upload a template file*" and then "*Choose file*" +5. Load your template file from selected directory in this repository and click "*Next*" +6. Enter the desired template parameters +7. Click *Next* until you can review the configurations. +8. After you've reviewed the configuraitons, click "*Create stack*". diff --git a/deprecated/aws/templates/asg-r8030/README.md b/deprecated/aws/templates/asg-r8030/README.md new file mode 100644 index 00000000..224d91c4 --- /dev/null +++ b/deprecated/aws/templates/asg-r8030/README.md @@ -0,0 +1,22 @@ + +## Security Gateway Auto Scaling + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures the Security Gateways as an AWS Auto Scaling group.

For more details, refer to the CloudGuard Network Auto Scaling for AWS R80.20 and Higher Deployment Guide . +
Deploys an Auto Scaling group of Security Gateways into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/asg-r8030/autoscale.json b/deprecated/aws/templates/asg-r8030/autoscale.json new file mode 100755 index 00000000..4940ee3b --- /dev/null +++ b/deprecated/aws/templates/asg-r8030/autoscale.json @@ -0,0 +1,1188 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Create an Auto Scaling group of Check Point gateways (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnets" + ] + }, + { + "Label": { + "default": "Automatic Provisioning with Security Management Server Settings" + }, + "Parameters": [ + "ControlGatewayOverPrivateOrPublicAddress", + "ManagementServer", + "ConfigurationTemplate" + ] + }, + { + "Label": { + "default": "EC2 Instances Configuration" + }, + "Parameters": [ + "Name", + "InstanceType", + "KeyName", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "Auto Scaling Configuration" + }, + "Parameters": [ + "MinSize", + "MaxSize", + "AdminEmail", + "LoadBalancers", + "TargetGroups" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "License", + "Shell", + "PasswordHash", + "SICKey", + "AllowUploadDownload", + "EnableCloudWatch", + "BootstrapScript" + ] + }, + { + "Label": { + "default": "Proxy Configuration (optional)" + }, + "Parameters": [ + "ELBType", + "ELBPort", + "ELBClients" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnets": { + "default": "Subnets" + }, + "ELBType": { + "default": "Proxy type" + }, + "ELBPort": { + "default": "Proxy port" + }, + "ELBClients": { + "default": "Allowed proxy clients" + }, + "AdminEmail": { + "default": "Email address" + }, + "LoadBalancers": { + "default": "Load Balancers" + }, + "TargetGroups": { + "default": "Target Groups" + }, + "MinSize": { + "default": "Minimum group size" + }, + "MaxSize": { + "default": "Maximum group size" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "default": "Gateways addresses" + }, + "ManagementServer": { + "default": "Management Server" + }, + "ConfigurationTemplate": { + "default": "Configuration template" + }, + "Name": { + "default": "Name" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "SICKey": { + "default": "SIC key" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Enable volume encryption" + }, + "License": { + "default": "Version & license" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "EnableCloudWatch": { + "default": "CloudWatch metrics" + }, + "BootstrapScript": { + "default": "Bootstrap Script" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnets": { + "Description": "Select at least 2 subnets in the VPC", + "Type": "List", + "MinLength": "1" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "Description": "Determines if the gateways are provisioned using their private or public address", + "Default": "private", + "Type": "String", + "AllowedValues": [ + "private", + "public" + ] + }, + "ELBPort": { + "Default": "8080", + "Type": "Number" + }, + "ELBType": { + "Default": "none", + "AllowedValues": [ + "none", + "internal", + "internet-facing" + ], + "Type": "String" + }, + "ELBClients": { + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})" + }, + "MinSize": { + "Description": "The minimal number of gateways in the Auto Scaling group", + "Default": "2", + "Type": "Number", + "MinValue": "1" + }, + "MaxSize": { + "Description": "The maximal number of gateways in the Auto Scaling group", + "Default": "10", + "Type": "Number", + "MinValue": "1" + }, + "ManagementServer": { + "Description": "The name that represents the Security Management Server in the automatic provisioning configuration", + "Type": "String", + "MinLength": "1" + }, + "ConfigurationTemplate": { + "Description": "A name of a gateway configuration template in the automatic provisioning configuration", + "Type": "String", + "MinLength": "1" + }, + "Name": { + "Type": "String", + "Default": "Check-Point-Gateway" + }, + "InstanceType": { + "Description": "c4 and t2 instance types are supported only up to version R80.10 and c5 are supported only with R80.20 and above", + "Type": "String", + "Default": "c5.xlarge", + "AllowedValues": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.18xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "AdminEmail": { + "Description": "Notifications about scaling events will be sent to this email address (optional)", + "Type": "String", + "Default": "", + "AllowedPattern": "(|([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?))", + "ConstraintDescription": "must be a valid email address." + }, + "LoadBalancers": { + "Description": "An optional list of Classic Load Balancers associated with this Auto Scaling group (comma separated list of LB names, without spaces)", + "Type": "String", + "Default": "" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "Encrypt Auto Scaling instances volume with default AWS KMS key. Will be ignored for versions lower than R80.30", + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "TargetGroups": { + "Description": "An optional list of Target Groups to associate with the Auto Scaling group (comma separated list of ARNs, without spaces)", + "Type": "String", + "Default": "" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instances", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*", + "NoEcho": "true" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "MinLength": "8", + "Type": "String", + "AllowedPattern": "[a-zA-Z0-9]*", + "ConstraintDescription": "At least 8 alpha numeric characters" + }, + "License": { + "Type": "String", + "Default": "R80.30-PAYG-NGTP", + "AllowedValues": [ + "R77.30-BYOL", + "R77.30-PAYG-NGTP", + "R80.10-BYOL", + "R80.10-PAYG-NGTP", + "R80.10-PAYG-NGTX", + "R80.20-BYOL", + "R80.20-PAYG-NGTP", + "R80.20-PAYG-NGTX", + "R80.30-BYOL", + "R80.30-PAYG-NGTP", + "R80.30-PAYG-NGTX", + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX" + ] + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "EnableCloudWatch": { + "Description": "Report Check Point specific CloudWatch metrics", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ], + "Default": "false" + }, + "BootstrapScript": { + "Description": "An optional script with comma separated commands to run on the initial boot", + "Type": "CommaDelimitedList", + "Default": "", + "NoEcho": "true" + } + }, + "Conditions": { + "R80.30": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "License" + } + ] + } + ] + }, + "R80.30" + ] + }, + "R80.40": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "License" + } + ] + } + ] + }, + "R80.40" + ] + }, + "EnableEncryptedVolume": { + "Fn::And": [ + { + "Fn::Equals": [ + { + "Ref": "VolumeEncryption" + }, + "true" + ] + }, + { + "Fn::Or": [ + { + "Condition": "R80.30" + }, + { + "Condition": "R80.40" + } + ] + } + ] + }, + "AdminEmail": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AdminEmail" + }, + "" + ] + } + ] + }, + "CreateELB": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "ELBType" + }, + "none" + ] + } + ] + }, + "EnableInstanceConnect": { + "Fn::Equals": [ + { + "Ref": "EnableInstanceConnect" + }, + "true" + ] + }, + "ProvidedLoadBalancers": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "LoadBalancers" + }, + "" + ] + } + ] + }, + "ProvidedTargetGroups": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "TargetGroups" + }, + "" + ] + } + ] + }, + "EnableCloudWatch": { + "Fn::Equals": [ + { + "Ref": "EnableCloudWatch" + }, + "true" + ] + }, + "ProvidedPassHash": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "PasswordHash" + }, + "" + ] + } + ] + }, + "BlinkConfig": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "License" + } + ] + } + ] + }, + "R77.30" + ] + } + ] + } + }, + "Resources": { + "CheckPointGateway": { + "Type": "AWS::IAM::Role", + "Condition": "EnableCloudWatch", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Path": "/", + "Policies": [ + { + "PolicyName": "CheckPointGateway", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "cloudwatch:PutMetricData" + ], + "Resource": "*" + } + ] + } + } + ] + } + }, + "InstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Condition": "EnableCloudWatch", + "Properties": { + "Path": "/", + "Roles": [ + { + "Ref": "CheckPointGateway" + } + ] + } + }, + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/amis-deprecated.yaml", + "Parameters": { + "Version": { + "Fn::If": [ + "BlinkConfig", + { + "Fn::Join": [ + "-", + [ + { + "Ref": "License" + }, + "GW" + ] + ] + }, + { + "Ref": "License" + } + ] + } + } + } + }, + "NotificationTopic": { + "Type": "AWS::SNS::Topic", + "Condition": "AdminEmail", + "Properties": { + "Subscription": [ + { + "Endpoint": { + "Ref": "AdminEmail" + }, + "Protocol": "email" + } + ] + } + }, + "ElasticLoadBalancer": { + "Type": "AWS::ElasticLoadBalancing::LoadBalancer", + "Condition": "CreateELB", + "Properties": { + "CrossZone": "true", + "Listeners": [ + { + "LoadBalancerPort": { + "Ref": "ELBPort" + }, + "InstancePort": { + "Ref": "ELBPort" + }, + "Protocol": "TCP" + } + ], + "HealthCheck": { + "Target": { + "Fn::Join": [ + ":", + [ + "TCP", + { + "Ref": "ELBPort" + } + ] + ] + }, + "HealthyThreshold": "3", + "UnhealthyThreshold": "5", + "Interval": "30", + "Timeout": "5" + }, + "Scheme": { + "Ref": "ELBType" + }, + "Subnets": { + "Ref": "Subnets" + }, + "Policies": [ + { + "PolicyName": "EnableProxyProtocol", + "PolicyType": "ProxyProtocolPolicyType", + "Attributes": [ + { + "Name": "ProxyProtocol", + "Value": "true" + } + ], + "InstancePorts": [ + { + "Ref": "ELBPort" + } + ] + } + ], + "SecurityGroups": [ + { + "Ref": "ELBSecurityGroup" + } + ] + } + }, + "PermissiveSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Fn::Join": [ + "_", + [ + { + "Ref": "AWS::StackName" + }, + "PermissiveSecurityGroup" + ] + ] + } + } + ], + "GroupDescription": "Permissive security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "IpProtocol": "-1", + "CidrIp": "0.0.0.0/0" + } + ] + } + }, + "GatewayGroup": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "VPCZoneIdentifier": { + "Ref": "Subnets" + }, + "LaunchConfigurationName": { + "Ref": "LaunchConfig" + }, + "MinSize": { + "Ref": "MinSize" + }, + "MaxSize": { + "Ref": "MaxSize" + }, + "LoadBalancerNames": { + "Fn::If": [ + "ProvidedLoadBalancers", + { + "Fn::If": [ + "CreateELB", + { + "Fn::Split": [ + ",", + { + "Fn::Join": [ + ",", + [ + { + "Ref": "LoadBalancers" + }, + { + "Ref": "ElasticLoadBalancer" + } + ] + ] + } + ] + }, + { + "Fn::Split": [ + ",", + { + "Ref": "LoadBalancers" + } + ] + } + ] + }, + { + "Fn::If": [ + "CreateELB", + [ + { + "Ref": "ElasticLoadBalancer" + } + ], + [ + { + "Ref": "AWS::NoValue" + } + ] + ] + } + ] + }, + "TargetGroupARNs": { + "Fn::If": [ + "ProvidedTargetGroups", + { + "Fn::Split": [ + ",", + { + "Ref": "TargetGroups" + } + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "NotificationConfiguration": { + "Fn::If": [ + "AdminEmail", + { + "TopicARN": { + "Ref": "NotificationTopic" + }, + "NotificationTypes": [ + "autoscaling:EC2_INSTANCE_LAUNCH", + "autoscaling:EC2_INSTANCE_LAUNCH_ERROR", + "autoscaling:EC2_INSTANCE_TERMINATE", + "autoscaling:EC2_INSTANCE_TERMINATE_ERROR" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": { + "Ref": "Name" + }, + "PropagateAtLaunch": "true" + }, + { + "Key": "x-chkp-tags", + "Value": { + "Fn::Join": [ + ":", + [ + { + "Fn::Join": [ + "=", + [ + "management", + { + "Ref": "ManagementServer" + } + ] + ] + }, + { + "Fn::Join": [ + "=", + [ + "template", + { + "Ref": "ConfigurationTemplate" + } + ] + ] + }, + { + "Fn::Join": [ + "=", + [ + "ip-address", + { + "Ref": "ControlGatewayOverPrivateOrPublicAddress" + } + ] + ] + } + ] + ] + }, + "PropagateAtLaunch": "true" + } + ] + } + }, + "LaunchConfig": { + "Type": "AWS::AutoScaling::LaunchConfiguration", + "Properties": { + "AssociatePublicIpAddress": "true", + "KeyName": { + "Ref": "KeyName" + }, + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "SecurityGroups": [ + { + "Ref": "PermissiveSecurityGroup" + } + ], + "InstanceType": { + "Ref": "InstanceType" + }, + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "IamInstanceProfile": { + "Fn::If": [ + "EnableCloudWatch", + { + "Ref": "InstanceProfile" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + "echo template_name: autoscale >> /etc/cloud-version", + "echo template_version: 20211212 >> /etc/cloud-version", + { + "Fn::If": [ + "ProvidedPassHash", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + "echo \"set admin password\"", + "clish -c \"set user admin password-hash $pwd_hash\" -s" + ] + ] + }, + "pwd_hash=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"" + ] + }, + { + "Fn::Sub": "enable_cloudwatch=${EnableCloudWatch}" + }, + { + "Fn::Sub": "clish -c \"set user admin shell ${Shell}\" -s" + }, + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::If": [ + "BlinkConfig", + { + "Fn::Sub": "blink_config -s \"gateway_cluster_member=false&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}&admin_hash='$pwd_hash'\"" + }, + { + "Fn::Sub": "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=false&install_security_managment=false&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}\"" + } + ] + }, + "addr=\"$(ip addr show dev eth0 | awk \"/inet/{print \\$2; exit}\" | cut -d / -f 1)\"", + "dynamic_objects -n LocalGateway -r \"$addr\" \"$addr\" -a", + "if \"$enable_cloudwatch\"; then", + " echo '{\"version\":\"1\"}' > $FWDIR/conf/cloudwatch.json", + " cloudwatch start", + "fi", + { + "Fn::Join": [ + "", + [ + "bootstrap=$(echo '", + { + "Fn::Base64": { + "Fn::Join": [ + "; ", + { + "Ref": "BootstrapScript" + } + ] + } + }, + "' | base64 --decode)" + ] + ] + }, + "eval $bootstrap", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + { + "Fn::If": [ + "BlinkConfig", + { + "Ref": "AWS::NoValue" + }, + [ + "echo \"Rebooting...\"", + "shutdown -r now" + ] + ] + }, + "" + ] + ] + } + } + } + }, + "SecurityGatewayScaleUpPolicy": { + "Type": "AWS::AutoScaling::ScalingPolicy", + "Properties": { + "AdjustmentType": "ChangeInCapacity", + "AutoScalingGroupName": { + "Ref": "GatewayGroup" + }, + "Cooldown": "300", + "ScalingAdjustment": "1" + } + }, + "SecurityGatewayScaleDownPolicy": { + "Type": "AWS::AutoScaling::ScalingPolicy", + "Properties": { + "AdjustmentType": "ChangeInCapacity", + "AutoScalingGroupName": { + "Ref": "GatewayGroup" + }, + "Cooldown": "300", + "ScalingAdjustment": "-1" + } + }, + "CPUAlarmHigh": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmDescription": "Scale-up if CPU > 80% for 10 minutes", + "MetricName": "CPUUtilization", + "Namespace": "AWS/EC2", + "Statistic": "Average", + "Period": "300", + "EvaluationPeriods": "2", + "Threshold": "80", + "AlarmActions": [ + { + "Ref": "SecurityGatewayScaleUpPolicy" + } + ], + "Dimensions": [ + { + "Name": "AutoScalingGroupName", + "Value": { + "Ref": "GatewayGroup" + } + } + ], + "ComparisonOperator": "GreaterThanThreshold" + } + }, + "CPUAlarmLow": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmDescription": "Scale-down if CPU < 60% for 10 minutes", + "MetricName": "CPUUtilization", + "Namespace": "AWS/EC2", + "Statistic": "Average", + "Period": "300", + "EvaluationPeriods": "2", + "Threshold": "60", + "AlarmActions": [ + { + "Ref": "SecurityGatewayScaleDownPolicy" + } + ], + "Dimensions": [ + { + "Name": "AutoScalingGroupName", + "Value": { + "Ref": "GatewayGroup" + } + } + ], + "ComparisonOperator": "LessThanThreshold" + } + }, + "ELBSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Condition": "CreateELB", + "Properties": { + "GroupDescription": "ELB security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "IpProtocol": "tcp", + "CidrIp": { + "Ref": "ELBClients" + }, + "FromPort": { + "Ref": "ELBPort" + }, + "ToPort": { + "Ref": "ELBPort" + } + } + ] + } + } + }, + "Outputs": { + "URL": { + "Description": "The URL of the Proxy", + "Condition": "CreateELB", + "Value": { + "Fn::Join": [ + "", + [ + "http://", + { + "Fn::GetAtt": [ + "ElasticLoadBalancer", + "DNSName" + ] + } + ] + ] + } + }, + "SecurityGroup": { + "Description": "The Security Group of the Auto Scaling group", + "Value": { + "Fn::GetAtt": [ + "PermissiveSecurityGroup", + "GroupId" + ] + } + } + } +} diff --git a/deprecated/aws/templates/cluster-r8030/README.md b/deprecated/aws/templates/cluster-r8030/README.md new file mode 100644 index 00000000..282d3075 --- /dev/null +++ b/deprecated/aws/templates/cluster-r8030/README.md @@ -0,0 +1,25 @@ +## Security Cluster + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures two Security Gateways as a Cluster.

For more details, refer to the CloudGuard Network for AWS Security Cluster R80.20 and Higher Deployment Guide. +
Creates a new VPC and deploys a Cluster into it.
Deploys a Cluster into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/cluster-r8030/cluster-into-vpc.json b/deprecated/aws/templates/cluster-r8030/cluster-into-vpc.json new file mode 100644 index 00000000..cf5405d0 --- /dev/null +++ b/deprecated/aws/templates/cluster-r8030/cluster-into-vpc.json @@ -0,0 +1,1313 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Cluster into an existing VPC (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "VPC", + "AvailabilityZone", + "ExternalSubnet", + "InternalSubnet" + ] + }, + { + "Label": { + "default": "Cluster Network Configuration" + }, + "Parameters": [ + "ClusterExternalAddr", + "MemberAExternalAddr", + "MemberBExternalAddr", + "ClusterInternalAddr", + "MemberAInternalAddr", + "MemberBInternalAddr" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "InstanceType", + "KeyName", + "PredefinedRole", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "PasswordHash", + "SICKey", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "AvailabilityZone": { + "default": "Availability zone" + }, + "ExternalSubnet": { + "default": "External subnet" + }, + "InternalSubnet": { + "default": "Internal subnet" + }, + "ClusterExternalAddr": { + "default": "Cluster external address" + }, + "MemberAExternalAddr": { + "default": "Member A external address" + }, + "MemberBExternalAddr": { + "default": "Member B external address" + }, + "ClusterInternalAddr": { + "default": "Cluster internal address" + }, + "MemberAInternalAddr": { + "default": "Member A internal address" + }, + "MemberBInternalAddr": { + "default": "Member B internal address" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "Version": { + "default": "Version & license" + }, + "PredefinedRole": { + "default": "Existing IAM role name" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "SICKey": { + "default": "SIC key" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + } + } + } + }, + "Parameters": { + "InstanceType": { + "Description": "c4 and t2 instance types are supported only up to version R80.10 and c5 are supported only with R80.20 and above", + "Type": "String", + "Default": "c5.xlarge", + "AllowedValues": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.18xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "VPC": { + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "ExternalSubnet": { + "Description": "The external subnet of the cluster. The subnet's route table must have 0.0.0.0/0 route to Internet Gateway", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "InternalSubnet": { + "Description": "The internal subnet of the cluster", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "AvailabilityZone": { + "Description": "The availability zone in which to deploy the cluster", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "ClusterExternalAddr": { + "Description": "The private address of the cluster on the external subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "MemberAExternalAddr": { + "Description": "The private address of member A on the external subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "MemberBExternalAddr": { + "Description": "The private address of member B on the external subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "ClusterInternalAddr": { + "Description": "The private address of the cluster on the internal subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "MemberAInternalAddr": { + "Description": "The private address of member A on the internal subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "MemberBInternalAddr": { + "Description": "The private address of member B on the internal subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "ConstraintDescription": "must be a valid IP address" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "Version": { + "Type": "String", + "Default": "R80.30-PAYG-NGTP", + "AllowedValues": [ + "R77.30-BYOL", + "R77.30-PAYG-NGTP", + "R80.10-BYOL", + "R80.10-PAYG-NGTP", + "R80.10-PAYG-NGTX", + "R80.20-BYOL", + "R80.20-PAYG-NGTP", + "R80.20-PAYG-NGTX", + "R80.30-BYOL", + "R80.30-PAYG-NGTP", + "R80.30-PAYG-NGTX", + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX" + ] + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "NoEcho": "true", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "PredefinedRole": { + "Description": "A predefined IAM role to attach to the cluster profile (optional)", + "Type": "String", + "Default": "" + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "MinLength": "8", + "Type": "String", + "AllowedPattern": "[a-zA-Z0-9]*", + "ConstraintDescription": "At least 8 alpha numeric characters" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). Will be ignored for versions lower than R80.30", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + } + }, + "Conditions": { + "R80.30": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.30" + ] + }, + "R80.40": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.40" + ] + }, + "EnableEncryptedVolume": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "VolumeEncryption" + }, + "" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Condition": "R80.30" + }, + { + "Condition": "R80.40" + } + ] + } + ] + }, + "ProvidedPassHash": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "PasswordHash" + }, + "" + ] + } + ] + }, + "CreateRole": { + "Fn::Equals": [ + { + "Ref": "PredefinedRole" + }, + "" + ] + }, + "EnableInstanceConnect": { + "Fn::Equals": [ + { + "Ref": "EnableInstanceConnect" + }, + "true" + ] + }, + "BlinkConfig": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R77.30" + ] + } + ] + } + }, + "Resources": { + "ClusterReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Properties": {} + }, + "ClusterReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "DependsOn": [ + "MemberAInstance", + "MemberBInstance" + ], + "Properties": { + "Count": "2", + "Handle": { + "Ref": "ClusterReadyHandle" + }, + "Timeout": "1800" + } + }, + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/amis-deprecated.yaml", + "Parameters": { + "Version": { + "Fn::If": [ + "BlinkConfig", + { + "Fn::Join": [ + "-", + [ + { + "Ref": "Version" + }, + "GW" + ] + ] + }, + { + "Ref": "Version" + } + ] + } + } + } + }, + "ClusterRole": { + "Type": "AWS::IAM::Role", + "Condition": "CreateRole", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Path": "/", + "Policies": [ + { + "PolicyName": "Cluster", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ec2:DescribeRouteTables", + "ec2:ReplaceRoute", + "ec2:AssignPrivateIpAddresses", + "ec2:DescribeNetworkInterfaces", + "ec2:CreateRoute" + ], + "Resource": "*" + } + ] + } + } + ] + } + }, + "ClusterInstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Path": "/", + "Roles": [ + { + "Fn::If": [ + "CreateRole", + { + "Ref": "ClusterRole" + }, + { + "Ref": "PredefinedRole" + } + ] + } + ] + } + }, + "InternalRoutingTable": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPC" + } + } + }, + "InternalDefaultRoute": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NetworkInterfaceId": { + "Ref": "MemberAInternalInterface" + }, + "RouteTableId": { + "Ref": "InternalRoutingTable" + } + } + }, + "InternalNetworkRouteAssociation": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "InternalRoutingTable" + }, + "SubnetId": { + "Ref": "InternalSubnet" + } + } + }, + "MemberAExternalInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "External", + "PrivateIpAddresses": [ + { + "PrivateIpAddress": { + "Ref": "MemberAExternalAddr" + }, + "Primary": "true" + }, + { + "PrivateIpAddress": { + "Ref": "ClusterExternalAddr" + }, + "Primary": "false" + } + ], + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SubnetId": { + "Ref": "ExternalSubnet" + } + } + }, + "MemberBExternalInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "External", + "PrivateIpAddresses": [ + { + "PrivateIpAddress": { + "Ref": "MemberBExternalAddr" + }, + "Primary": "true" + } + ], + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SubnetId": { + "Ref": "ExternalSubnet" + } + } + }, + "MemberAInternalInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "Internal", + "PrivateIpAddresses": [ + { + "PrivateIpAddress": { + "Ref": "MemberAInternalAddr" + }, + "Primary": "true" + }, + { + "PrivateIpAddress": { + "Ref": "ClusterInternalAddr" + }, + "Primary": "false" + } + ], + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SourceDestCheck": "false", + "SubnetId": { + "Ref": "InternalSubnet" + } + } + }, + "MemberBInternalInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "Internal", + "PrivateIpAddress": { + "Ref": "MemberBInternalAddr" + }, + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SourceDestCheck": "false", + "SubnetId": { + "Ref": "InternalSubnet" + } + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Permissive security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "IpProtocol": "-1", + "CidrIp": "0.0.0.0/0" + } + ] + } + }, + "ClusterPublicAddress": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc" + } + }, + "MemberAPublicAddress": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc" + } + }, + "MemberBPublicAddress": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc" + } + }, + "MemberAInstance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "AvailabilityZone": { + "Ref": "AvailabilityZone" + }, + "Tags": [ + { + "Key": "Name", + "Value": "Member A" + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "KmsKeyId": { + "Fn::If": [ + "EnableEncryptedVolume", + { + "Ref": "VolumeEncryption" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "NetworkInterfaceId": { + "Ref": "MemberAExternalInterface" + } + }, + { + "DeviceIndex": "1", + "NetworkInterfaceId": { + "Ref": "MemberAInternalInterface" + } + } + ], + "IamInstanceProfile": { + "Ref": "ClusterInstanceProfile" + }, + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + "echo template_name: cluster >> /etc/cloud-version", + "echo template_version: 20211212 >> /etc/cloud-version", + "clish -c 'delete interface eth0 alias eth0:1' -s || true", + { + "Fn::Join": [ + "", + [ + "clish -c 'add interface eth0 alias ", + { + "Ref": "MemberAPublicAddress" + }, + "/32' -s" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Ref": "ClusterReadyHandle" + }, + "'" + ] + ] + }, + "echo \"Generating TOKEN\"", + "TOKEN=`curl_cli -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 3600\"`", + "echo \"Getting instance id\"", + "instance_id=\"$(curl_cli -H \"X-aws-ec2-metadata-token: $TOKEN\" -v http://169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::If": [ + "ProvidedPassHash", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + "echo \"set admin password\"", + "clish -c \"set user admin password-hash $pwd_hash\" -s" + ] + ] + }, + "pwd_hash=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"" + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp1='", + { + "Ref": "NTPPrimary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp2='", + { + "Ref": "NTPSecondary" + }, + "'" + ] + ] + }, + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + { + "Fn::Sub": "clish -c \"set user admin shell ${Shell}\" -s" + }, + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::If": [ + "BlinkConfig", + { + "Fn::Sub": "blink_config -s \"gateway_cluster_member=true&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}&admin_hash='$pwd_hash'\"" + }, + { + "Fn::Sub": "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=true&install_security_managment=false&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}\"" + } + ] + }, + "rc=$?", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"Security Gateway configuration failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Security Gateway configuration complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "echo \"Rebooting...\"", + "shutdown -r now", + "" + ] + ] + } + } + } + }, + "MemberBInstance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "AvailabilityZone": { + "Ref": "AvailabilityZone" + }, + "Tags": [ + { + "Key": "Name", + "Value": "Member B" + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "KmsKeyId": { + "Fn::If": [ + "EnableEncryptedVolume", + { + "Ref": "VolumeEncryption" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "NetworkInterfaceId": { + "Ref": "MemberBExternalInterface" + } + }, + { + "DeviceIndex": "1", + "NetworkInterfaceId": { + "Ref": "MemberBInternalInterface" + } + } + ], + "IamInstanceProfile": { + "Ref": "ClusterInstanceProfile" + }, + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + "echo template_name: cluster >> /etc/cloud-version", + "echo template_version: 20211212 >> /etc/cloud-version", + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Ref": "ClusterReadyHandle" + }, + "'" + ] + ] + }, + "echo \"Generating TOKEN\"", + "TOKEN=`curl_cli -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 3600\"`", + "echo \"Getting instance id\"", + "instance_id=\"$(curl_cli -H \"X-aws-ec2-metadata-token: $TOKEN\" -v http://169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::If": [ + "ProvidedPassHash", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + "echo \"set admin password\"", + "clish -c \"set user admin password-hash $pwd_hash\" -s" + ] + ] + }, + "pwd_hash=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"" + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp1='", + { + "Ref": "NTPPrimary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp2='", + { + "Ref": "NTPSecondary" + }, + "'" + ] + ] + }, + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + { + "Fn::Sub": "clish -c \"set user admin shell ${Shell}\" -s" + }, + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::If": [ + "BlinkConfig", + { + "Fn::Sub": "blink_config -s \"gateway_cluster_member=true&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}&admin_hash='$pwd_hash'\"" + }, + { + "Fn::Sub": "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=true&install_security_managment=false&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}\"" + } + ] + }, + "rc=$?", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"Security Gateway configuration failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Security Gateway configuration complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "echo \"Rebooting...\"", + "shutdown -r now", + "" + ] + ] + } + } + } + }, + "ClusterAddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "DependsOn": "MemberAInstance", + "Properties": { + "NetworkInterfaceId": { + "Ref": "MemberAExternalInterface" + }, + "AllocationId": { + "Fn::GetAtt": [ + "ClusterPublicAddress", + "AllocationId" + ] + }, + "PrivateIpAddress": { + "Ref": "ClusterExternalAddr" + } + } + }, + "MemberAAddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "DependsOn": "MemberAInstance", + "Properties": { + "NetworkInterfaceId": { + "Ref": "MemberAExternalInterface" + }, + "AllocationId": { + "Fn::GetAtt": [ + "MemberAPublicAddress", + "AllocationId" + ] + }, + "PrivateIpAddress": { + "Fn::GetAtt": [ + "MemberAExternalInterface", + "PrimaryPrivateIpAddress" + ] + } + } + }, + "MemberBAddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "DependsOn": "MemberBInstance", + "Properties": { + "NetworkInterfaceId": { + "Ref": "MemberBExternalInterface" + }, + "AllocationId": { + "Fn::GetAtt": [ + "MemberBPublicAddress", + "AllocationId" + ] + }, + "PrivateIpAddress": { + "Fn::GetAtt": [ + "MemberBExternalInterface", + "PrimaryPrivateIpAddress" + ] + } + } + } + }, + "Outputs": { + "ClusterPublicAddress": { + "Description": "The public address of the cluster", + "Value": { + "Ref": "ClusterPublicAddress" + } + }, + "MemberAPublicAddress": { + "Description": "The public address of member A", + "Value": { + "Ref": "MemberAPublicAddress" + } + }, + "MemberASSH": { + "Description": "SSH command to member A", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "MemberAPublicAddress" + } + ] + ] + } + }, + "MemberAURL": { + "Description": "URL to the member A portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "MemberAPublicAddress" + } + ] + ] + } + }, + "MemberBPublicAddress": { + "Description": "The public address of member B", + "Value": { + "Ref": "MemberBPublicAddress" + } + }, + "MemberBSSH": { + "Description": "SSH command to member B", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "MemberBPublicAddress" + } + ] + ] + } + }, + "MemberBURL": { + "Description": "URL to the member B portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "MemberBPublicAddress" + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/cluster-r8030/cluster.json b/deprecated/aws/templates/cluster-r8030/cluster.json new file mode 100644 index 00000000..08869f9c --- /dev/null +++ b/deprecated/aws/templates/cluster-r8030/cluster.json @@ -0,0 +1,515 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploy a Check Point Cluster in a new VPC (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "AvailabilityZone", + "VpcCidr", + "ExternalSubnetCidr", + "InternalSubnetCidr" + ] + }, + { + "Label": { + "default": "Cluster Network Configuration" + }, + "Parameters": [ + "ClusterExternalAddr", + "MemberAExternalAddr", + "MemberBExternalAddr", + "ClusterInternalAddr", + "MemberAInternalAddr", + "MemberBInternalAddr" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "InstanceType", + "KeyName", + "PredefinedRole", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "PasswordHash", + "SICKey", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + } + ], + "ParameterLabels": { + "AvailabilityZone": { + "default": "Availability zone" + }, + "VpcCidr": { + "default": "VPC CIDR" + }, + "ExternalSubnetCidr": { + "default": "External subnet CIDR" + }, + "InternalSubnetCidr": { + "default": "Internal subnet CIDR" + }, + "ClusterExternalAddr": { + "default": "Cluster external address" + }, + "MemberAExternalAddr": { + "default": "Member A external address" + }, + "MemberBExternalAddr": { + "default": "Member B external address" + }, + "ClusterInternalAddr": { + "default": "Cluster internal address" + }, + "MemberAInternalAddr": { + "default": "Member A internal address" + }, + "MemberBInternalAddr": { + "default": "Member B internal address" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "Version": { + "default": "Version & license" + }, + "PredefinedRole": { + "default": "Existing IAM role name" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "SICKey": { + "default": "SIC key" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + } + } + } + }, + "Parameters": { + "InstanceType": { + "Description": "c4 and t2 instance types are supported only up to version R80.10 and c5 are supported only with R80.20 and above", + "Type": "String", + "Default": "c5.xlarge", + "AllowedValues": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.18xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "VpcCidr": { + "Description": "The CIDR block for your VPC", + "Type": "String", + "Default": "10.0.0.0/16" + }, + "AvailabilityZone": { + "Description": "The availability zone in which to deploy the cluster", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "ExternalSubnetCidr": { + "Description": "The external subnet of the cluster", + "Type": "String", + "Default": "10.0.0.0/24" + }, + "ClusterExternalAddr": { + "Description": "The private address of the cluster on the external subnet", + "Type": "String", + "Default": "10.0.0.10" + }, + "MemberAExternalAddr": { + "Description": "The private address of member A on the external subnet", + "Type": "String", + "Default": "10.0.0.20" + }, + "MemberBExternalAddr": { + "Description": "The private address of member B on the external subnet", + "Type": "String", + "Default": "10.0.0.30" + }, + "ClusterInternalAddr": { + "Description": "The private address of the cluster on the internal subnet", + "Type": "String", + "Default": "10.0.1.10" + }, + "MemberAInternalAddr": { + "Description": "The private address of member A on the internal subnet", + "Type": "String", + "Default": "10.0.1.20" + }, + "MemberBInternalAddr": { + "Description": "The private address of member B on the internal subnet", + "Type": "String", + "Default": "10.0.1.30" + }, + "InternalSubnetCidr": { + "Description": "The internal subnet of the cluster", + "Type": "String", + "Default": "10.0.1.0/24" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1" + }, + "Version": { + "Type": "String", + "Default": "R80.30-PAYG-NGTP", + "AllowedValues": [ + "R77.30-BYOL", + "R77.30-PAYG-NGTP", + "R80.10-BYOL", + "R80.10-PAYG-NGTP", + "R80.10-PAYG-NGTX", + "R80.20-BYOL", + "R80.20-PAYG-NGTP", + "R80.20-PAYG-NGTX", + "R80.30-BYOL", + "R80.30-PAYG-NGTP", + "R80.30-PAYG-NGTX", + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX" + ] + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "NoEcho": "true", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "PredefinedRole": { + "Description": "A predefined IAM role to attach to the cluster profile (optional)", + "Type": "String", + "Default": "" + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "MinLength": "8", + "Type": "String", + "AllowedPattern": "[a-zA-Z0-9]*", + "ConstraintDescription": "At least 8 alpha numeric characters" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). Will be ignored for versions lower than R80.30", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + } + }, + "Resources": { + "InfraStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/infrastructure.json", + "Parameters": { + "VpcCidr": { + "Ref": "VpcCidr" + }, + "AvailabilityZone": { + "Ref": "AvailabilityZone" + }, + "ExternalSubnetCidr": { + "Ref": "ExternalSubnetCidr" + }, + "InternalSubnetCidr": { + "Ref": "InternalSubnetCidr" + }, + "ResourcesTagName": { + "Ref": "AWS::StackName" + } + } + } + }, + "ClusterStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/cluster-into-vpc.json", + "Parameters": { + "InstanceType": { + "Ref": "InstanceType" + }, + "VPC": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.VPC" + ] + }, + "ExternalSubnet": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.ExternalSubnet" + ] + }, + "InternalSubnet": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.InternalSubnet" + ] + }, + "AvailabilityZone": { + "Ref": "AvailabilityZone" + }, + "ClusterExternalAddr": { + "Ref": "ClusterExternalAddr" + }, + "MemberAExternalAddr": { + "Ref": "MemberAExternalAddr" + }, + "MemberBExternalAddr": { + "Ref": "MemberBExternalAddr" + }, + "ClusterInternalAddr": { + "Ref": "ClusterInternalAddr" + }, + "MemberAInternalAddr": { + "Ref": "MemberAInternalAddr" + }, + "MemberBInternalAddr": { + "Ref": "MemberBInternalAddr" + }, + "KeyName": { + "Ref": "KeyName" + }, + "Version": { + "Ref": "Version" + }, + "PasswordHash": { + "Ref": "PasswordHash" + }, + "PredefinedRole": { + "Ref": "PredefinedRole" + }, + "EnableInstanceConnect": { + "Ref": "EnableInstanceConnect" + }, + "SICKey": { + "Ref": "SICKey" + }, + "VolumeSize": { + "Ref": "VolumeSize" + }, + "VolumeEncryption": { + "Ref": "VolumeEncryption" + }, + "Shell": { + "Ref": "Shell" + }, + "AllowUploadDownload": { + "Ref": "AllowUploadDownload" + }, + "NTPPrimary": { + "Ref": "NTPPrimary" + }, + "NTPSecondary": { + "Ref": "NTPSecondary" + } + } + } + } + }, + "Outputs": { + "ClusterPublicAddress": { + "Description": "The public address of the cluster", + "Value": { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.ClusterPublicAddress" + ] + } + }, + "MemberAPublicAddress": { + "Description": "The public address of member A", + "Value": { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberAPublicAddress" + ] + } + }, + "MemberASSH": { + "Description": "SSH command to member A", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberAPublicAddress" + ] + } + ] + ] + } + }, + "MemberAURL": { + "Description": "URL to the member A portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberAPublicAddress" + ] + } + ] + ] + } + }, + "MemberBPublicAddress": { + "Description": "The public address of member B", + "Value": { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberBPublicAddress" + ] + } + }, + "MemberBSSH": { + "Description": "SSH command to member B", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberBPublicAddress" + ] + } + ] + ] + } + }, + "MemberBURL": { + "Description": "URL to the member B portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "ClusterStack", + "Outputs.MemberBPublicAddress" + ] + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/gateway-r7730/README.md b/deprecated/aws/templates/gateway-r7730/README.md new file mode 100644 index 00000000..36ce0e36 --- /dev/null +++ b/deprecated/aws/templates/gateway-r7730/README.md @@ -0,0 +1,21 @@ +# R77.30 Security Gateway + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys an externally managed R77.30 Security Gateway into an existing VPC. This template will run the First Time Configuration Wizard automatically and configure the machine as a Security Gateway. + ---
+
+
diff --git a/deprecated/aws/templates/gateway-r7730/gateway-2-nic-existing-vpc.json b/deprecated/aws/templates/gateway-r7730/gateway-2-nic-existing-vpc.json new file mode 100755 index 00000000..d8de1f1d --- /dev/null +++ b/deprecated/aws/templates/gateway-r7730/gateway-2-nic-existing-vpc.json @@ -0,0 +1,486 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Gateway with two NICs and runs the First Time Wizard (20180821)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnet", + "PrivateAddr", + "Subnet2", + "PrivateAddr2", + "HasInternet" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "InstanceType", + "Version", + "KeyName", + "SICKey", + "Shell", + "PasswordHash", + "AllowUploadDownload", + "Name" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnet": { + "default": "External Subnet" + }, + "Subnet2": { + "default": "Internal Subnet" + }, + "PrivateAddr": { + "default": "External private IP address" + }, + "PrivateAddr2": { + "default": "Internal private IP address" + }, + "HasInternet": { + "default": "Allocate an Elastic IP address for the instance" + }, + "InstanceType": { + "default": "Instance type" + }, + "Version": { + "default": "Version" + }, + "KeyName": { + "default": "Key name" + }, + "SICKey": { + "default": "SIC key" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "AllowUploadDownload": { + "default": "Allow upload and download" + }, + "Name": { + "default": "Gateway instance Name" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnet": { + "Description": "The gateway's external subnet", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "Subnet2": { + "Description": "The gateway's internal subnet. Should be in the same AZ as the external subnet", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "PrivateAddr": { + "Description": "IP address in the External Subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$" + }, + "PrivateAddr2": { + "Description": "IP address in the Internal Subnet", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$" + }, + "HasInternet": { + "Description": "Is the VPC connected to the Internet", + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "InstanceType": { + "Description": "EC2 instance type", + "Type": "String", + "Default": "c4.xlarge", + "AllowedValues": [ + "m3.medium", + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName" + }, + "Version": { + "Description": "Security Gateway version", + "Type": "String", + "Default": "BYOL", + "AllowedValues": [ + "BYOL", + "PAYG" + ] + }, + "PasswordHash": { + "Description": "The admin user password hash (hint, use \"openssl passwd -1\")", + "MinLength": "1", + "Type": "String", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "AllowUploadDownload": { + "Description": "Improve product experience by sending data to Check Point. Automatically download Blade Contracts and other important data", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "Default": "", + "Type": "String", + "AllowedPattern": "(|[a-zA-Z0-9]{8,})" + }, + "Shell": { + "Description": "The user admin shell", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "Name": { + "Description": "The name for the instance", + "Type": "String", + "Default": "Check Point SG" + } + }, + "Conditions": { + "HasInternet": { + "Fn::Equals": [ + { + "Ref": "HasInternet" + }, + "true" + ] + } + }, + "Resources": { + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/CloudFormationTemplate/amis.json", + "Parameters": { + "Version": { + "Ref": "Version" + } + } + } + }, + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "HasInternet", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "HasInternet", + "DependsOn": [ + "Instance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "NetworkInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "eth0", + "PrivateIpAddresses": [ + { + "PrivateIpAddress": { + "Ref": "PrivateAddr" + }, + "Primary": "true" + } + ], + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SubnetId": { + "Ref": "Subnet" + } + } + }, + "NetworkInterface2": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Description": "eth1", + "PrivateIpAddress": { + "Ref": "PrivateAddr2" + }, + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "SubnetId": { + "Ref": "Subnet2" + } + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Permissive security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "IpProtocol": "-1", + "CidrIp": "0.0.0.0/0" + } + ] + } + }, + "Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Ref": "Name" + } + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "echo template_name: gateway-2-nic-existing-vpc >> /etc/cloud-version", + "echo template_version: 20180821 >> /etc/cloud-version", + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Fn::If": [ + "HasInternet", + { + "Ref": "ReadyHandle" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + "instance_id=\"$(curl_cli -s -S 169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::Join": [ + "", + [ + "shell='", + { + "Ref": "Shell" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "allow_upload_download='", + { + "Ref": "AllowUploadDownload" + }, + "'" + ] + ] + }, + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + "clish -c \"set user admin shell $shell\" -s", + "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=false&install_security_managment=false&ftw_sic_key='$sic'&upload_info=${allow_upload_download}&download_info=${allow_upload_download}\"", + "rc=$?", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"First time wizard failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Instance Configuration Complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "shutdown -r now", + "" + ] + ] + } + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "NetworkInterfaceId": { + "Ref": "NetworkInterface" + } + }, + { + "DeviceIndex": "1", + "NetworkInterfaceId": { + "Ref": "NetworkInterface2" + } + } + ] + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "HasInternet", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "Condition": "HasInternet", + "Properties": { + "NetworkInterfaceId": { + "Ref": "NetworkInterface" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + }, + "PrivateIpAddress": { + "Fn::GetAtt": [ + "NetworkInterface", + "PrimaryPrivateIpAddress" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Description": "The public address of the gateway", + "Value": { + "Ref": "PublicAddress" + }, + "Condition": "HasInternet" + }, + "SSH": { + "Description": "SSH command", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + }, + "Condition": "HasInternet" + }, + "URL": { + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + }, + "Condition": "HasInternet" + } + } +} diff --git a/deprecated/aws/templates/gateways-r7730/README.md b/deprecated/aws/templates/gateways-r7730/README.md new file mode 100644 index 00000000..4e1ace22 --- /dev/null +++ b/deprecated/aws/templates/gateways-r7730/README.md @@ -0,0 +1,21 @@ +# R77.30 Security Gateways + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Creates a new VPC and deploys two R77.30 Security Gateways in it. Each Security Gateway is deployed in a different Availability Zone. This template will run the First Time Configuration Wizard automatically and configure the machines as Security Gateways. + Refer to sk108281.
+
+
diff --git a/deprecated/aws/templates/gateways-r7730/inter-az-cluster.json b/deprecated/aws/templates/gateways-r7730/inter-az-cluster.json new file mode 100755 index 00000000..6181664c --- /dev/null +++ b/deprecated/aws/templates/gateways-r7730/inter-az-cluster.json @@ -0,0 +1,505 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description" : "Deploy 2 Check Point Gateways in 2 AZs in a VPC (20180821)", + "Metadata" : { + "AWS::CloudFormation::Interface" : { + "ParameterGroups" : [ + { + "Label" : { "default" : "Network Configuration" }, + "Parameters" : [ + "VpcCidr", + "OnPremiseNetworkCIDR" + ] + }, + { + "Label" : { "default" : "1st Availability Zone Configuration" }, + "Parameters" : [ + "AZ1", + "PublicSubnetCidr1", + "ExternalAddress1", + "PrivateSubnetCidr1", + "PrivateAddress1" + ] + }, + { + "Label" : { "default" : "2nd Availability Zone Configuration" }, + "Parameters" : [ + "AZ2", + "PublicSubnetCidr2", + "ExternalAddress2", + "PrivateSubnetCidr2", + "PrivateAddress2" + ] + }, + { + "Label" : { "default" : "Gateway Settings" }, + "Parameters" : [ + "InstanceType", + "KeyName", + "Version", + "SICKey", + "Shell", + "PasswordHash", + "AllowUploadDownload" + ] + } + ], + "ParameterLabels" : { + + "VpcCidr" : { "default" : "VPC CIDR" }, + "OnPremiseNetworkCIDR" : { "default" : "On premise CIDR" }, + + "AZ1" : { "default" : "Availability zone" }, + "PublicSubnetCidr1" : { "default" : "Public subnet CIDR" }, + "ExternalAddress1" : { "default" : "External address" }, + "PrivateSubnetCidr1" : { "default" : "Private subnet CIDR" }, + "PrivateAddress1" : { "default" : "Internal address" }, + + "AZ2" : { "default" : "Availability zone" }, + "PublicSubnetCidr2" : { "default" : "Public subnet CIDR" }, + "ExternalAddress2" : { "default" : "External address" }, + "PrivateSubnetCidr2" : { "default" : "Private subnet CIDR" }, + "PrivateAddress2" : { "default" : "Internal address" }, + + "InstanceType" : { "default" : "Instance type" }, + "KeyName" : { "default" : "Key name" }, + "Version" : { "default" : "Version" }, + "SICKey" : { "default" : "SIC key" }, + "Shell" : { "default" : "Admin shell" }, + "PasswordHash" : { "default" : "Password hash" }, + "AllowUploadDownload": { "default": "Allow upload and download" } + } + } + }, + + "Parameters" : { + "InstanceType" : { + "Description" : "Check Point Security Gateway instance type", + "Type" : "String", + "Default" : "c4.xlarge", + "AllowedValues" : [ "m3.medium","c4.large","c4.xlarge","c4.2xlarge","c4.4xlarge","c4.8xlarge"], + "ConstraintDescription" : "must be a valid EC2 instance type." + }, + "VpcCidr" : { + "Description" : "The CIDR block for your VPC", + "Type": "String", + "Default" : "10.0.0.0/16" + }, + "AZ1" : { + "Description" : "The 1st availability zone in which to deploy", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "AZ2" : { + "Description" : "The 2nd availability zone in which to deploy", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "OnPremiseNetworkCIDR" : { + "Description" : "The on premise network", + "Type": "String", + "Default": "0.0.0.0/0" + }, + "PublicSubnetCidr1" : { + "Description" : "The public subnet of the 1st AZ", + "Type": "String", + "Default": "10.0.0.0/24" + }, + "PublicSubnetCidr2" : { + "Description" : "The public subnet of the 2nd AZ", + "Type": "String", + "Default": "10.0.1.0/24" + }, + "PrivateSubnetCidr1" : { + "Description" : "The private subnet of the 1st AZ", + "Type": "String", + "Default": "10.0.2.0/24" + }, + "PrivateSubnetCidr2" : { + "Description" : "The private subnet of the 2nd AZ", + "Type": "String", + "Default": "10.0.3.0/24" + }, + "ExternalAddress1" : { + "Description" : "The external address of the 1st gateway", + "Type": "String", + "Default": "10.0.0.10" + }, + "ExternalAddress2" : { + "Description" : "The external address of the 2nd gateway", + "Type": "String", + "Default": "10.0.1.10" + }, + "PrivateAddress1" : { + "Description" : "The internal address of the 1st gateway", + "Type": "String", + "Default": "10.0.2.10" + }, + "PrivateAddress2" : { + "Description" : "The internal address of the 2nd gateway", + "Type": "String", + "Default": "10.0.3.10" + }, + "KeyName" : { + "Description" : "SSH Key Pair", + "Type" : "AWS::EC2::KeyPair::KeyName", + "MinLength": "1" + }, + "Version" : { + "Description" : "Security Gateway version", + "Type" : "String", + "Default": "BYOL", + "AllowedValues" : [ "BYOL", "PAYG" ] + }, + "PasswordHash" : { + "Description" : "(optional) The admin user password hash (hint, use \"openssl passwd -1\")", + "Default": "", + "Type" : "String", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey" : { + "Description" : "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho" : "true", + "MinLength": "8", + "Type" : "String", + "AllowedPattern" : "[a-zA-Z0-9]*", + "ConstraintDescription": "At least 8 alpha numeric characters" + }, + "Shell" : { + "Description" : "The user admin shell", + "Type" : "String", + "Default" : "/etc/cli.sh", + "AllowedValues" : [ "/etc/cli.sh", "/bin/bash", "/bin/csh", "/bin/tcsh"] + } + }, + "Resources" : { + "VPC" : { + "Type" : "AWS::EC2::VPC", + "Properties" : { + "CidrBlock" : { "Ref" : "VpcCidr" } + } + }, + "InternetGateway" : { + "Type" : "AWS::EC2::InternetGateway" + }, + "AttachGateway" : { + "Type" : "AWS::EC2::VPCGatewayAttachment", + "Properties" : { + "VpcId" : { "Ref" : "VPC" }, + "InternetGatewayId" : { "Ref" : "InternetGateway" } + } + }, + "PublicSubnet1" : { + "Type" : "AWS::EC2::Subnet", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ1" }, + "CidrBlock" : { "Ref" : "PublicSubnetCidr1" }, + "VpcId" : { "Ref" : "VPC" } + } + }, + "PrivateSubnet1" : { + "Type" : "AWS::EC2::Subnet", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ1" }, + "CidrBlock" : { "Ref" : "PrivateSubnetCidr1" }, + "VpcId" : { "Ref" : "VPC" } + } + }, + "PublicSubnet2" : { + "Type" : "AWS::EC2::Subnet", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ2" }, + "CidrBlock" : { "Ref" : "PublicSubnetCidr2" }, + "VpcId" : { "Ref" : "VPC" } + } + }, + "PrivateSubnet2" : { + "Type" : "AWS::EC2::Subnet", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ2" }, + "CidrBlock" : { "Ref" : "PrivateSubnetCidr2" }, + "VpcId" : { "Ref" : "VPC" } + } + }, + "PublicRoutingTable" : { + "Type" : "AWS::EC2::RouteTable", + "Properties" : { + "VpcId" : { "Ref" : "VPC" } + } + }, + "DefaultRoute" : { + "Type" : "AWS::EC2::Route", + "Properties" : { + "DestinationCidrBlock" : "0.0.0.0/0", + "GatewayId" : { "Ref" : "InternetGateway" }, + "RouteTableId" : { "Ref" : "PublicRoutingTable" } + } + }, + "PublicNetworkRouteAssociation1" : { + "Type" : "AWS::EC2::SubnetRouteTableAssociation", + "Properties" : { + "RouteTableId" : { "Ref" : "PublicRoutingTable" }, + "SubnetId" : { "Ref" : "PublicSubnet1" } + } + }, + "PublicNetworkRouteAssociation2" : { + "Type" : "AWS::EC2::SubnetRouteTableAssociation", + "Properties" : { + "RouteTableId" : { "Ref" : "PublicRoutingTable" }, + "SubnetId" : { "Ref" : "PublicSubnet2" } + } + }, + "AMI" : { + "Type" : "AWS::CloudFormation::Stack", + "Properties" : { + "TemplateURL" : "https://s3.amazonaws.com/CloudFormationTemplate/amis.json", + "Parameters" : { + "Version" : { "Ref" : "Version" } + } + } + }, + "PrivateRoutingTable1" : { + "Type" : "AWS::EC2::RouteTable", + "Properties" : { + "VpcId" : { "Ref" : "VPC" } + } + }, + "PrivateDefaultRoute1" : { + "Type" : "AWS::EC2::Route", + "Properties" : { + "DestinationCidrBlock" : {"Ref" : "OnPremiseNetworkCIDR" }, + "NetworkInterfaceId" : { "Ref" : "PrivateInterface1" }, + "RouteTableId" : { "Ref" : "PrivateRoutingTable1" } + } + }, + "PrivateNetworkRouteAssociation1" : { + "Type" : "AWS::EC2::SubnetRouteTableAssociation", + "Properties" : { + "RouteTableId" : { "Ref" : "PrivateRoutingTable1" }, + "SubnetId" : { "Ref" : "PrivateSubnet1" } + } + }, + "PrivateRoutingTable2" : { + "Type" : "AWS::EC2::RouteTable", + "Properties" : { + "VpcId" : { "Ref" : "VPC" } + } + }, + "PrivateDefaultRoute2" : { + "Type" : "AWS::EC2::Route", + "Properties" : { + "DestinationCidrBlock" : {"Ref" : "OnPremiseNetworkCIDR" }, + "NetworkInterfaceId" : { "Ref" : "PrivateInterface2" }, + "RouteTableId" : { "Ref" : "PrivateRoutingTable2" } + } + }, + "PrivateNetworkRouteAssociation2" : { + "Type" : "AWS::EC2::SubnetRouteTableAssociation", + "Properties" : { + "RouteTableId" : { "Ref" : "PrivateRoutingTable2" }, + "SubnetId" : { "Ref" : "PrivateSubnet2" } + } + }, + "PublicInterface1" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "PrivateIpAddresses": [ + { "PrivateIpAddress" : { "Ref" : "ExternalAddress1" }, "Primary" : "true" } + ], + "SourceDestCheck": "false", + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SubnetId": { "Ref" : "PublicSubnet1" } + } + }, + "PublicInterface2" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "PrivateIpAddresses": [ + { "PrivateIpAddress" : { "Ref" : "ExternalAddress2" }, "Primary" : "true" } + ], + "SourceDestCheck": "false", + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SubnetId": { "Ref" : "PublicSubnet2" } + } + }, + "PrivateInterface1" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "PrivateIpAddress": { "Ref" : "PrivateAddress1"}, + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SourceDestCheck": "false", + "SubnetId": { "Ref" : "PrivateSubnet1" } + } + }, + "PrivateInterface2" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "PrivateIpAddress": { "Ref" : "PrivateAddress2"}, + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SourceDestCheck": "false", + "SubnetId": { "Ref" : "PrivateSubnet2" } + } + }, + "InstanceSecurityGroup" : { + "Type" : "AWS::EC2::SecurityGroup", + "Properties" : { + "GroupDescription" : "Permissive security group", + "VpcId" : { "Ref" : "VPC" }, + "SecurityGroupIngress" : [ { "IpProtocol" : "-1", "CidrIp" : "0.0.0.0/0" } ] + } + }, + "Instance1" : { + "Type" : "AWS::EC2::Instance", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ1" }, + "Tags" : [ + { "Key" : "Name", "Value" : "Security Gateway 1" } + ], + "ImageId" : { "Fn::GetAtt" : [ "AMI", "Outputs.ImageId" ] }, + "InstanceType" : { "Ref" : "InstanceType" }, + "KeyName" : { "Ref" : "KeyName" }, + "NetworkInterfaces" : [ + { "DeviceIndex" : "0", "NetworkInterfaceId" : {"Ref" : "PublicInterface1"} }, + { "DeviceIndex" : "1", "NetworkInterfaceId" : {"Ref" : "PrivateInterface1"} } + ], + "UserData" : { "Fn::Base64" : + { "Fn::Join" : [ "\n", + [ "#!/bin/bash", + "echo template_name: inter-az-cluster >> /etc/cloud-version", + "echo template_version: 20180821 >> /etc/cloud-version", + {"Fn::Join" : [ "", ["pwd_hash='", {"Ref" : "PasswordHash"}, "'"]]}, + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + {"Fn::Join" : [ "", ["sic_key=$(echo '", {"Fn::Base64": {"Ref" : "SICKey"}}, "' | base64 --decode)"]]}, + {"Fn::Join" : [ "", ["shell='", {"Ref" : "Shell"}, "'"]]}, + {"Fn::Join" : [ "", ["allow_upload_download='", {"Ref" : "AllowUploadDownload"}, "'"]]}, + "clish -c \"set user admin shell $shell\" -s", + "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=false&install_security_managment=false&ftw_sic_key=${sic_key}&upload_info=${allow_upload_download}&download_info=${allow_upload_download}\"", + "shutdown -r now", + "" + ] + ] + } + } + } + }, + "Instance2" : { + "Type" : "AWS::EC2::Instance", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AZ2" }, + "Tags" : [ + { "Key" : "Name", "Value" : "Security Gateway 2" } + ], + "ImageId" : { "Fn::GetAtt" : [ "AMI", "Outputs.ImageId" ] }, + "InstanceType" : { "Ref" : "InstanceType" }, + "KeyName" : { "Ref" : "KeyName" }, + "NetworkInterfaces" : [ + { "DeviceIndex" : "0", "NetworkInterfaceId" : {"Ref" : "PublicInterface2"} }, + { "DeviceIndex" : "1", "NetworkInterfaceId" : {"Ref" : "PrivateInterface2"} } + ], + "UserData" : { "Fn::Base64" : + { "Fn::Join" : [ "\n", + [ "#!/bin/bash", + "echo template_name: inter-az-cluster >> /etc/cloud-version", + "echo template_version: 20180821 >> /etc/cloud-version", + {"Fn::Join" : [ "", ["pwd_hash='", {"Ref" : "PasswordHash"}, "'"]]}, + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + {"Fn::Join" : [ "", ["sic_key=$(echo '", {"Fn::Base64": {"Ref" : "SICKey"}}, "' | base64 --decode)"]]}, + {"Fn::Join" : [ "", ["shell='", {"Ref" : "Shell"}, "'"]]}, + {"Fn::Join" : [ "", ["allow_upload_download='", {"Ref" : "AllowUploadDownload"}, "'"]]}, + "clish -c \"set user admin shell $shell\" -s", + "config_system -s \"install_security_gw=true&install_ppak=true&gateway_cluster_member=false&install_security_managment=false&ftw_sic_key=${sic_key}&upload_info=${allow_upload_download}&download_info=${allow_upload_download}\"", + "shutdown -r now", + "" + ] + ] + } + } + } + }, + "PublicAddress1" : { + "Type" : "AWS::EC2::EIP", + "Properties" : { + "Domain" : "vpc" + } + }, + "PublicAddress2" : { + "Type" : "AWS::EC2::EIP", + "Properties" : { + "Domain" : "vpc" + } + }, + "AddressAssoc1" : { + "Type" : "AWS::EC2::EIPAssociation", + "Properties" : { + "NetworkInterfaceId" : { "Ref" : "PublicInterface1" }, + "AllocationId" : { "Fn::GetAtt" : [ "PublicAddress1" , "AllocationId" ] }, + "PrivateIpAddress" : { "Fn::GetAtt" : ["PublicInterface1", "PrimaryPrivateIpAddress" ]} + } + }, + "AddressAssoc2" : { + "Type" : "AWS::EC2::EIPAssociation", + "Properties" : { + "NetworkInterfaceId" : { "Ref" : "PublicInterface2" }, + "AllocationId" : { "Fn::GetAtt" : [ "PublicAddress2" , "AllocationId" ] }, + "PrivateIpAddress" : { "Fn::GetAtt" : ["PublicInterface2", "PrimaryPrivateIpAddress" ]} + } + } + }, + "Outputs" : { + "PublicAddress1" : { + "Description" : "The public address of the 1st gateway", + "Value" : { "Ref" : "PublicAddress1" } + }, + "SSH1" : { + "Description" : "SSH command to the 1st gateway", + "Value" : { "Fn::Join" : [ "", [ "ssh admin@", { "Ref" : "PublicAddress1" }]]} + }, + "URL1" : { + "Description" : "URL to the 1st gateway", + "Value" : { "Fn::Join" : [ "", [ "https://", { "Ref" : "PublicAddress1" }]]} + }, + "RouteTable1" : { + "Description" : "A routing table pointing to the 1st gateway", + "Value" : { "Ref" : "PrivateRoutingTable1" } + }, + "Subnet1" : { + "Description" : "A private subnet behind the 1st gateway", + "Value" : { "Ref" : "PrivateSubnet1" } + }, + "PublicAddress2" : { + "Description" : "The public address of the 2nd gateway", + "Value" : { "Ref" : "PublicAddress2" } + }, + "SSH2" : { + "Description" : "SSH command to the 2nd gateway", + "Value" : { "Fn::Join" : [ "", [ "ssh admin@", { "Ref" : "PublicAddress2" }]]} + }, + "URL2" : { + "Description" : "URL to the 2nd gateway", + "Value" : { "Fn::Join" : [ "", [ "https://", { "Ref" : "PublicAddress2" }]]} + }, + "RouteTable2" : { + "Description" : "A routing table pointing to the 2nd gateway", + "Value" : { "Ref" : "PrivateRoutingTable2" } + }, + "Subnet2" : { + "Description" : "A private subnet behind the 2nd gateway", + "Value" : { "Ref" : "PrivateSubnet2" } + } + } +} diff --git a/deprecated/aws/templates/instance-r7730/README.md b/deprecated/aws/templates/instance-r7730/README.md new file mode 100644 index 00000000..b07628e5 --- /dev/null +++ b/deprecated/aws/templates/instance-r7730/README.md @@ -0,0 +1,21 @@ +# R77.30 Instance + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Creates a new VPC and deploys an R77.30 instance. This template does not run the First Time Configuration Wizard. + Does not run the First Time Configuration Wizard.
+
+
diff --git a/deprecated/aws/templates/instance-r7730/gwinvpc.json b/deprecated/aws/templates/instance-r7730/gwinvpc.json new file mode 100755 index 00000000..071f56a6 --- /dev/null +++ b/deprecated/aws/templates/instance-r7730/gwinvpc.json @@ -0,0 +1,269 @@ +{ + "Description" : "Deploy a Check Point Security Gateway in VPC", + "Metadata" : { + "AWS::CloudFormation::Interface" : { + "ParameterGroups" : [ + { + "Label" : { "default" : "VPC Network Configuration" }, + "Parameters" : [ + "AvailabilityZone", + "VpcCidr", + "ExternalSubnetCidr", + "InternalSubnetCidr" + ] + }, + { + "Label" : { "default" : "Gateway Network Configuration" }, + "Parameters" : [ + "GWExternalPrivateAddr", + "GWInternalPrivateAddr", + "GWExternalSecondaryPrivateAddr" + ] + }, + { + "Label" : { "default" : "Gateway Settings" }, + "Parameters" : [ + "GWInstanceType", + "KeyName", + "Version", + "Shell", + "PasswordHash", + "TagNameFirewall" + ] + } + ], + "ParameterLabels" : { + "VpcCidr" : { "default" : "VPC CIDR" }, + "AvailabilityZone" : { "default" : "Availability zone" }, + "ExternalSubnetCidr" : { "default" : "External subnet CIDR" }, + "InternalSubnetCidr" : { "default" : "Internal subnet CIDR" }, + + "GWExternalPrivateAddr" : { "default" : "Gateway external address" }, + "GWInternalPrivateAddr" : { "default" : "Gateway internal address" }, + "GWExternalSecondaryPrivateAddr" : { "default" : "Gateway secondary external address" }, + + "GWInstanceType" : { "default" : "Instance type" }, + + "KeyName" : { "default" : "Key name" }, + "Version" : { "default" : "Version" }, + + "Shell" : { "default" : "Admin shell" }, + "PasswordHash" : { "default" : "Password hash" }, + "TagNameFirewall" : { "default" : "Tag" } + } + } + }, + + + "Parameters" : { + "GWInstanceType" : { + "Description" : "Check Point Security Gateway instance type", + "Type" : "String", + "Default" : "c4.xlarge", + "AllowedValues" : [ "m3.medium","c4.large","c4.xlarge","c4.2xlarge","c4.4xlarge","c4.8xlarge"], + "ConstraintDescription" : "must be a valid EC2 instance type." + }, + "VpcCidr" : { + "Description" : "The CIDR block for your VPC", + "Type": "String", + "Default" : "10.0.0.0/16" + }, + "AvailabilityZone" : { + "Description" : "The availability zone in which to deploy the gateway", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "ExternalSubnetCidr" : { + "Description" : "The external subnet of the security gateway", + "Type": "String", + "Default": "10.0.0.0/24" + }, + "GWExternalPrivateAddr" : { + "Description" : "The private address of the gateway on the external subnet", + "Type": "String", + "Default": "10.0.0.10" + }, + "GWExternalSecondaryPrivateAddr" : { + "Description" : "A secondary address of the gateway on the external subnet", + "Type": "String", + "Default": "10.0.0.11" + }, + "GWInternalPrivateAddr" : { + "Description" : "The private address of the gateway on the internal subnet", + "Type": "String", + "Default": "10.0.1.10" + }, + "InternalSubnetCidr" : { + "Description" : "The internal subnet of the security gateway", + "Type": "String", + "Default": "10.0.1.0/24" + }, + "KeyName" : { + "Description" : "SSH Key Pair", + "Type" : "AWS::EC2::KeyPair::KeyName", + "MinLength": "1" + }, + "TagNameFirewall" : { + "Description" : "Firewall Name in Console", + "Type" : "String", + "Default" : "Firewall" + }, + "Version" : { + "Description" : "Security Gateway version", + "Type" : "String", + "Default": "BYOL", + "AllowedValues" : [ "BYOL", "PAYG" ] + }, + "PasswordHash" : { + "Description" : "(optional) The admin user password hash (hint, use \"openssl passwd -1\")", + "Default": "", + "Type" : "String", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "Shell" : { + "Description" : "The user admin shell", + "Type" : "String", + "Default" : "/etc/cli.sh", + "AllowedValues" : [ "/etc/cli.sh", "/bin/bash", "/bin/csh", "/bin/tcsh"] + } + }, + "Resources" : { + "AMI" : { + "Type" : "AWS::CloudFormation::Stack", + "Properties" : { + "TemplateURL" : "https://s3.amazonaws.com/CloudFormationTemplate/amis.json", + "Parameters" : { + "Version" : { "Ref" : "Version" } + } + } + }, + "InfraStack" : { + "Type" : "AWS::CloudFormation::Stack", + "Properties" : { + "TemplateURL" : "https://s3.amazonaws.com/CloudFormationTemplate/infrastructure.json", + "Parameters" : { + "VpcCidr" : { "Ref" : "VpcCidr" }, + "AvailabilityZone" : { "Ref" : "AvailabilityZone" }, + "ExternalSubnetCidr" : { "Ref" : "ExternalSubnetCidr" }, + "InternalSubnetCidr" : { "Ref" : "InternalSubnetCidr" }, + "ResourcesTagName" : { "Ref" : "AWS::StackName" } + } + } + }, + "InternalRoutingTable" : { + "Type" : "AWS::EC2::RouteTable", + "Properties" : { + "VpcId" : { "Fn::GetAtt" : [ "InfraStack", "Outputs.VPC" ] } + } + }, + "InternalDefaultRoute" : { + "Type" : "AWS::EC2::Route", + "Properties" : { + "DestinationCidrBlock" : "0.0.0.0/0", + "NetworkInterfaceId" : { "Ref" : "SecurityGatewayInternalInterface" }, + "RouteTableId" : { "Ref" : "InternalRoutingTable" } + } + }, + "InternalNetworkRouteAssociation" : { + "Type" : "AWS::EC2::SubnetRouteTableAssociation", + "Properties" : { + "RouteTableId" : { "Ref" : "InternalRoutingTable" }, + "SubnetId" : { "Fn::GetAtt" : [ "InfraStack", "Outputs.InternalSubnet" ] } + } + }, + "SecurityGatewayExternalInterface" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "Description": "External", + "PrivateIpAddresses": [ + { "PrivateIpAddress" : { "Ref" : "GWExternalPrivateAddr" }, "Primary" : "true" }, + { "PrivateIpAddress" : { "Ref" : "GWExternalSecondaryPrivateAddr" }, "Primary" : "false" } + ], + "SourceDestCheck": "false", + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SubnetId": { "Fn::GetAtt" : [ "InfraStack", "Outputs.ExternalSubnet" ] } + } + }, + "SecurityGatewayInternalInterface" : { + "Type" : "AWS::EC2::NetworkInterface", + "Properties" : { + "Description": "Internal", + "PrivateIpAddress": { "Ref" : "GWInternalPrivateAddr"}, + "GroupSet" : [{ "Ref" : "InstanceSecurityGroup" }], + "SourceDestCheck": "false", + "SubnetId": { "Fn::GetAtt" : [ "InfraStack", "Outputs.InternalSubnet" ] } + } + }, + "InstanceSecurityGroup" : { + "Type" : "AWS::EC2::SecurityGroup", + "Properties" : { + "GroupDescription" : "Permissive security group", + "VpcId" : { "Fn::GetAtt" : [ "InfraStack", "Outputs.VPC" ] }, + "SecurityGroupIngress" : [ { "IpProtocol" : "-1", "CidrIp" : "0.0.0.0/0" } ] + } + }, + "SecurityGatewayInstance" : { + "Type" : "AWS::EC2::Instance", + "Properties" : { + "AvailabilityZone" : { "Ref" : "AvailabilityZone" }, + "Tags" : [ + { "Key" : "Name", "Value" : { "Ref" : "TagNameFirewall" } } + ], + "ImageId" : { "Fn::GetAtt" : [ "AMI", "Outputs.ImageId" ] }, + "InstanceType" : { "Ref" : "GWInstanceType" }, + "KeyName" : { "Ref" : "KeyName" }, + "NetworkInterfaces" : [ + { "DeviceIndex" : "0", "NetworkInterfaceId" : {"Ref" : "SecurityGatewayExternalInterface"} }, + { "DeviceIndex" : "1", "NetworkInterfaceId" : {"Ref" : "SecurityGatewayInternalInterface"} } + ], + "UserData" : { "Fn::Base64" : + { "Fn::Join" : [ "\n", + [ "#!/bin/bash", + "echo template_name: gwinvpc >> /etc/cloud-version", + "echo template_version: 20170621 >> /etc/cloud-version", + {"Fn::Join" : [ "", ["pwd_hash='", {"Ref" : "PasswordHash"}, "'"]]}, + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + {"Fn::Join" : [ "", ["shell='", {"Ref" : "Shell"}, "'"]]}, + "clish -c \"set user admin shell $shell\" -s", + "" + ] + ] + } + } + } + }, + "GatewayPublicAddress" : { + "Type" : "AWS::EC2::EIP", + "Properties" : { + "Domain" : "vpc" + } + }, + "GatewayAddressAssoc" : { + "Type" : "AWS::EC2::EIPAssociation", + "Properties" : { + "NetworkInterfaceId" : { "Ref" : "SecurityGatewayExternalInterface" }, + "AllocationId" : { "Fn::GetAtt" : [ "GatewayPublicAddress" , "AllocationId" ] }, + "PrivateIpAddress" : { "Fn::GetAtt" : ["SecurityGatewayExternalInterface", "PrimaryPrivateIpAddress" ]} + } + } + }, + "Outputs" : { + "GatewayPublicAddress" : { + "Description" : "The public address of your gateway", + "Value" : { "Ref" : "GatewayPublicAddress" } + }, + + "SSH" : { + "Description" : "SSH command", + "Value" : { "Fn::Join" : [ "", [ "ssh admin@", { "Ref" : "GatewayPublicAddress" }]]} + }, + + "URL" : { + "Description" : "URL to the Gateway portal", + "Value" : { "Fn::Join" : [ "", [ "https://", { "Ref" : "GatewayPublicAddress" }]]} + } + } +} \ No newline at end of file diff --git a/deprecated/aws/templates/management-r7730/README.md b/deprecated/aws/templates/management-r7730/README.md new file mode 100644 index 00000000..87ca8284 --- /dev/null +++ b/deprecated/aws/templates/management-r7730/README.md @@ -0,0 +1,21 @@ +# R77.30 Security Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys an R77.30 Security Management Server / Multi-Domain Security Management Server. This template will run the First Time Configuration Wizard automatically and configure the machine as a Security Management server. + User should connect to the machine and configure the Administrator and password for SmartDashboard GUI applications using the "cpconfig" command. The "Password hash" input parameter that the user can provide in the template is only used for the Gaia Portal login.
+
+
diff --git a/deprecated/aws/templates/management-r7730/r7730-management.json b/deprecated/aws/templates/management-r7730/r7730-management.json new file mode 100755 index 00000000..4ac0e7dc --- /dev/null +++ b/deprecated/aws/templates/management-r7730/r7730-management.json @@ -0,0 +1,656 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point R77.30 management server (20180821)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnet" + ] + }, + { + "Label": { + "default": "Check Point management Settings" + }, + "Parameters": [ + "InstanceType", + "KeyName", + "AdminSubnet", + "GatewaysAddresses" + ] + }, + { + "Label": { + "default": "Advanced" + }, + "Parameters": [ + "Primary", + "PasswordHash", + "SICKey", + "Shell", + "Hostname", + "AllocatePublicAddress", + "VolumeSize", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnet": { + "default": "Subnet" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AdminSubnet": { + "default": "Allowed GUI clients" + }, + "GatewaysAddresses": { + "default": "Gateways network" + }, + "Hostname": { + "default": "Hostname" + }, + "AllocatePublicAddress": { + "default": "Allocate an EIP" + }, + "SICKey": { + "default": "SIC key" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "Primary": { + "default": "Primary management" + }, + "VolumeSize": { + "default": "Volume size" + }, + "AllowUploadDownload": { + "default": "Allow upload and download" + }, + "NTPPrimary": { + "default": "Primary NTP" + }, + "NTPSecondary": { + "default": "Secondary NTP" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnet": { + "Description": "Select a subnet in the VPC", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "InstanceType": { + "Description": "EC2 instance type", + "Type": "String", + "Default": "m4.large", + "AllowedValues": [ + "m4.large", + "c3.large", + "c3.xlarge", + "c3.2xlarge", + "c3.4xlarge", + "c3.8xlarge", + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "AdminSubnet": { + "Description": "Allow only web and graphical clients from this network to communicate with the management", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "GatewaysAddresses": { + "Description": "Allow only gateways from this network to communicate with the management", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "PasswordHash": { + "Description": "(optional) The admin user password hash (hint, use \"openssl passwd -1\")", + "Type": "String", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "Hostname": { + "Description": "(optional) The hostname", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string", + "Type": "String" + }, + "AllocatePublicAddress": { + "Description": "Allocate an Elastic IP address for the management server", + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "Mandatory only if deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "Default": "", + "Type": "String", + "AllowedPattern": "(|[a-zA-Z0-9]{8,})", + "ConstraintDescription": "Can be empty if this is a primary management server. Otherwise, at least 8 alpha numeric characters" + }, + "Shell": { + "Description": "The user admin shell", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "Primary": { + "Description": "Determines if this is the primary management server or not", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional) Primary NTP server", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional) Secondary NTP server", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "VolumeSize": { + "Description": "(optional) Size of the root volume", + "Type": "Number", + "MinValue": "50", + "Default": "50" + }, + "AllowUploadDownload": { + "Description": "Improve product experience by sending data to Check Point. Automatically download Blade Contracts and other important data", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + } + }, + "Conditions": { + "HostnameGiven": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "Hostname" + }, + "" + ] + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + { + "Ref": "AllocatePublicAddress" + }, + "true" + ] + } + }, + "Resources": { + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/CloudFormationTemplate/amis.json", + "Parameters": { + "Version": "BYOL" + } + } + }, + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "AllocatePublicAddress", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "AllocatePublicAddress", + "DependsOn": [ + "Instance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Management security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 257, + "ToPort": 257 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18191, + "ToPort": 18191 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18210, + "ToPort": 18210 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18264, + "ToPort": 18264 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 22, + "ToPort": 22 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 443, + "ToPort": 443 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 18190, + "ToPort": 18190 + } + ] + } + }, + "Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Fn::If": [ + "HostnameGiven", + { + "Key": "Name", + "Value": { + "Ref": "Hostname" + } + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "AssociatePublicIpAddress": "false", + "Description": "eth0", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "DeleteOnTermination": "true", + "SubnetId": { + "Ref": "Subnet" + } + } + ], + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "echo template_name: r7730-management >> /etc/cloud-version", + "echo template_version: 20180821 >> /etc/cloud-version", + { + "Fn::Join": [ + "", + [ + "primary='", + { + "Ref": "Primary" + }, + "'" + ] + ] + }, + "secondary=false", + "$primary || secondary=true", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "hname='", + { + "Ref": "Hostname" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Fn::If": [ + "AllocatePublicAddress", + { + "Ref": "ReadyHandle" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + "instance_id=\"$(curl_cli -s -S 169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp1='", + { + "Ref": "NTPPrimary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp2='", + { + "Ref": "NTPSecondary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "shell='", + { + "Ref": "Shell" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "allow_upload_download='", + { + "Ref": "AllowUploadDownload" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "admin_subnet='", + { + "Ref": "AdminSubnet" + }, + "'" + ] + ] + }, + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "if $primary; then", + " sic=notused", + "elif test -z \"$sic\"; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"SIC key must be provided if installing a non primary management server\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " exit 1", + "fi", + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + "test -z \"$hname\" || {", + " echo \"set hostname\"", + " clish -c \"set hostname $hname\" -s", + "}", + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "pass=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"", + "admin_subnet_ip=\"$(echo $admin_subnet | cut -d '/' -f 1)\"", + "admin_subnet_bits=\"$(echo $admin_subnet | cut -d '/' -f 2)\"", + "echo \"set admin shell\"", + "clish -c \"set user admin shell $shell\" -s", + "conf=\"install_security_gw=false\"", + "conf=\"${conf}&install_security_managment=true\"", + "conf=\"${conf}&install_mgmt_primary=$primary\"", + "conf=\"${conf}&install_mgmt_secondary=$secondary\"", + "conf=\"${conf}&mgmt_admin_name=admin\"", + "conf=\"${conf}&mgmt_admin_passwd=$pass\"", + "conf=\"${conf}&mgmt_gui_clients_radio=network\"", + "conf=\"${conf}&mgmt_gui_clients_ip_field=${admin_subnet_ip}\"", + "conf=\"${conf}&mgmt_gui_clients_subnet_field=${admin_subnet_bits}\"", + "conf=\"${conf}&ftw_sic_key=$sic\"", + "conf=\"${conf}&download_info=$allow_upload_download\"", + "conf=\"${conf}&upload_info=$allow_upload_download\"", + "config_system -s \"$conf\"", + "rc=$?", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"First time wizard failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Instance Configuration Complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "" + ] + ] + } + } + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "AllocatePublicAddress", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "Condition": "AllocatePublicAddress", + "Properties": { + "InstanceId": { + "Ref": "Instance" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Condition": "AllocatePublicAddress", + "Description": "The public address of the management server", + "Value": { + "Ref": "PublicAddress" + } + }, + "SSH": { + "Condition": "AllocatePublicAddress", + "Description": "SSH command", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + } + }, + "URL": { + "Condition": "AllocatePublicAddress", + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/management-r80/README.md b/deprecated/aws/templates/management-r80/README.md new file mode 100644 index 00000000..b3203063 --- /dev/null +++ b/deprecated/aws/templates/management-r80/README.md @@ -0,0 +1,21 @@ +# R80 Security Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys an R80 Security Management Server / Multi-Domain Security Management Server. This template will run the First Time Configuration Wizard automatically and configure the machine as a Security Management Server. + The AWS marketplace listing for R80 is available only for customers that are already subscribed. New customers should use R80.10 listing.
+
+
diff --git a/deprecated/aws/templates/management-r80/r80.json b/deprecated/aws/templates/management-r80/r80.json new file mode 100755 index 00000000..b6a64d51 --- /dev/null +++ b/deprecated/aws/templates/management-r80/r80.json @@ -0,0 +1,725 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point R80 management server (20180821)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnet" + ] + }, + { + "Label": { + "default": "Check Point management Settings" + }, + "Parameters": [ + "InstanceType", + "KeyName", + "AdminSubnet", + "GatewaysAddresses", + "PasswordHash" + ] + }, + { + "Label": { + "default": "Advanced" + }, + "Parameters": [ + "Primary", + "SICKey", + "Shell", + "Hostname", + "AllocatePublicAddress", + "VolumeSize", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnet": { + "default": "Subnet" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AdminSubnet": { + "default": "Administrator Addresses" + }, + "GatewaysAddresses": { + "default": "Gateways Addresses" + }, + "Hostname": { + "default": "Hostname" + }, + "AllocatePublicAddress": { + "default": "Allocate an EIP" + }, + "SICKey": { + "default": "SIC key" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "Primary": { + "default": "Primary management" + }, + "VolumeSize": { + "default": "Volume size" + }, + "AllowUploadDownload": { + "default": "Allow upload and download" + }, + "NTPPrimary": { + "default": "Primary NTP" + }, + "NTPSecondary": { + "default": "Secondary NTP" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnet": { + "Description": "Select a subnet in the VPC", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "InstanceType": { + "Description": "EC2 instance type", + "Type": "String", + "Default": "m4.xlarge", + "AllowedValues": [ + "m4.large", + "m4.xlarge", + "m4.2xlarge", + "m4.4xlarge", + "m4.10xlarge", + "m3.large", + "m3.xlarge", + "m3.2xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "AdminSubnet": { + "Description": "Addresses of allowed SmartConsole, WebUI and SSH clients in CIDR notation", + "Type": "String", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "GatewaysAddresses": { + "Description": "Addresses of Check Point gateways in CIDR notation", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "PasswordHash": { + "Description": "The admin user password hash (hint, use \"openssl passwd -1\")", + "MinLength": "1", + "Type": "String", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "Hostname": { + "Description": "(optional) The hostname", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string", + "Type": "String" + }, + "AllocatePublicAddress": { + "Description": "Allocate an Elastic IP address for the management server. Note: make sure the subnet has a route to the internet", + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "Mandatory only if deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "Default": "", + "Type": "String", + "AllowedPattern": "(|[a-zA-Z0-9]{8,})", + "ConstraintDescription": "Can be empty if this is a primary management server. Otherwise, at least 8 alpha numeric characters" + }, + "Shell": { + "Description": "The user admin shell", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "Primary": { + "Description": "Determines if this is the primary management server or not", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional) Primary NTP server", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional) Secondary NTP server", + "Type": "String", + "Default": "1.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "VolumeSize": { + "Description": "(optional) Size of the root volume", + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data from Check Point and improve product by sending data", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + } + }, + "Conditions": { + "HostnameGiven": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "Hostname" + }, + "" + ] + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + { + "Ref": "AllocatePublicAddress" + }, + "true" + ] + } + }, + "Resources": { + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/CloudFormationTemplate/amis.json", + "Parameters": { + "Version": "R80" + } + } + }, + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "AllocatePublicAddress", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "AllocatePublicAddress", + "DependsOn": [ + "Instance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Management security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 257, + "ToPort": 257 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18191, + "ToPort": 18191 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18210, + "ToPort": 18210 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18264, + "ToPort": 18264 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 22, + "ToPort": 22 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 443, + "ToPort": 443 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 18190, + "ToPort": 18190 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 19009, + "ToPort": 19009 + } + ] + } + }, + "CheckPointManagementRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Path": "/", + "Policies": [ + { + "PolicyName": "CheckPointManagement", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ec2:DescribeInstances", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs", + "ec2:DescribeSecurityGroups", + "elasticloadbalancing:DescribeLoadBalancers", + "elasticloadbalancing:DescribeTags", + "elasticloadbalancing:DescribeListeners", + "elasticloadbalancing:DescribeTargetGroups", + "elasticloadbalancing:DescribeRules", + "elasticloadbalancing:DescribeTargetHealth", + "autoscaling:DescribeAutoScalingGroups" + ], + "Resource": "*" + } + ] + } + } + ] + } + }, + "InstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Path": "/", + "Roles": [ + { + "Ref": "CheckPointManagementRole" + } + ] + } + }, + "Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Fn::If": [ + "HostnameGiven", + { + "Key": "Name", + "Value": { + "Ref": "Hostname" + } + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "IamInstanceProfile": { + "Ref": "InstanceProfile" + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "AssociatePublicIpAddress": "false", + "Description": "eth0", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "DeleteOnTermination": "true", + "SubnetId": { + "Ref": "Subnet" + } + } + ], + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "echo template_name: r80 >> /etc/cloud-version", + "echo template_version: 20180821 >> /etc/cloud-version", + { + "Fn::Join": [ + "", + [ + "primary='", + { + "Ref": "Primary" + }, + "'" + ] + ] + }, + "secondary=false", + "$primary || secondary=true", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "hname='", + { + "Ref": "Hostname" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Fn::If": [ + "AllocatePublicAddress", + { + "Ref": "ReadyHandle" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + "instance_id=\"$(curl_cli -s -S 169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "allow_upload_download='", + { + "Ref": "AllowUploadDownload" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp1='", + { + "Ref": "NTPPrimary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp2='", + { + "Ref": "NTPSecondary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "shell='", + { + "Ref": "Shell" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "admin_subnet='", + { + "Ref": "AdminSubnet" + }, + "'" + ] + ] + }, + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "if $primary; then", + " sic=notused", + "elif test -z \"$sic\"; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"SIC key must be provided if installing a non primary management server\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " exit 1", + "fi", + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + "test -z \"$hname\" || {", + " echo \"set hostname\"", + " clish -c \"set hostname $hname\" -s", + "}", + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "admin_subnet_ip=\"$(echo $admin_subnet | cut -d '/' -f 1)\"", + "admin_subnet_bits=\"$(echo $admin_subnet | cut -d '/' -f 2)\"", + "echo \"set admin shell\"", + "clish -c \"set user admin shell $shell\" -s", + "conf=\"install_security_gw=false\"", + "conf=\"${conf}&install_security_managment=true\"", + "conf=\"${conf}&install_mgmt_primary=$primary\"", + "conf=\"${conf}&install_mgmt_secondary=$secondary\"", + "conf=\"${conf}&mgmt_admin_radio=gaia_admin\"", + "conf=\"${conf}&mgmt_gui_clients_radio=network\"", + "conf=\"${conf}&mgmt_gui_clients_ip_field=${admin_subnet_ip}\"", + "conf=\"${conf}&mgmt_gui_clients_subnet_field=${admin_subnet_bits}\"", + "conf=\"${conf}&ftw_sic_key=$sic\"", + "conf=\"${conf}&download_info=$allow_upload_download\"", + "conf=\"${conf}&upload_info=$allow_upload_download\"", + "config_system -s \"$conf\"", + "rc=$?", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"First time wizard failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Instance Configuration Complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "chkconfig --add autoprovision", + "service autoprovision start", + "" + ] + ] + } + } + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "AllocatePublicAddress", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "Condition": "AllocatePublicAddress", + "Properties": { + "InstanceId": { + "Ref": "Instance" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Condition": "AllocatePublicAddress", + "Description": "The public address of the management server", + "Value": { + "Ref": "PublicAddress" + } + }, + "SSH": { + "Condition": "AllocatePublicAddress", + "Description": "SSH command", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + } + }, + "URL": { + "Condition": "AllocatePublicAddress", + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/management-r8030/README.md b/deprecated/aws/templates/management-r8030/README.md new file mode 100644 index 00000000..2d0dc89d --- /dev/null +++ b/deprecated/aws/templates/management-r8030/README.md @@ -0,0 +1,22 @@ + +## Security Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Security Management Server.

For more details, refer to sk130372. +
Deploys a Security Management Server into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/management-r8030/management.json b/deprecated/aws/templates/management-r8030/management.json new file mode 100755 index 00000000..dd926219 --- /dev/null +++ b/deprecated/aws/templates/management-r8030/management.json @@ -0,0 +1,1323 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Management Server (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnet" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "Name", + "InstanceType", + "KeyName", + "AllocatePublicAddress", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "IAM Permissions (ignored when the installation is not Primary Management Server)" + }, + "Parameters": [ + "Permissions", + "PredefinedRole", + "STSRoles" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "PasswordHash" + ] + }, + { + "Label": { + "default": "Security Management Server Settings" + }, + "Parameters": [ + "Hostname", + "Primary", + "SICKey", + "AllowUploadDownload", + "AdminSubnet", + "GatewayManagement", + "GatewaysAddresses", + "NTPPrimary", + "NTPSecondary", + "BootstrapScript" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnet": { + "default": "Subnet" + }, + "Name": { + "default": "Name" + }, + "Version": { + "default": "Version & license" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AdminSubnet": { + "default": "Administrator addresses" + }, + "GatewaysAddresses": { + "default": "Gateways addresses" + }, + "Hostname": { + "default": "Hostname" + }, + "AllocatePublicAddress": { + "default": "Allocate an Elastic IP" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "SICKey": { + "default": "SIC key" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "GatewayManagement": { + "default": "Gateways management" + }, + "Primary": { + "default": "Primary management" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + }, + "STSRoles": { + "default": "STS roles" + }, + "PredefinedRole": { + "default": "Existing IAM role name" + }, + "Permissions": { + "default": "IAM role" + }, + "BootstrapScript": { + "default": "Bootstrap script" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnet": { + "Description": "To access the instance from the internet, make sure the subnet has a route to the internet", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "Version": { + "Type": "String", + "Default": "R80.30-PAYG-MGMT", + "AllowedValues": [ + "R80.10-BYOL", + "R80.10-PAYG-MGMT", + "R80.20-BYOL", + "R80.20-PAYG-MGMT", + "R80.30-BYOL", + "R80.30-PAYG-MGMT", + "R80.40-BYOL", + "R80.40-PAYG-MGMT" + ] + }, + "InstanceType": { + "Description": "m4 and t2 instance types are supported only with version R80.10 and m5 are supported only with R80.20 and above", + "Type": "String", + "Default": "m5.xlarge", + "AllowedValues": [ + "m4.large", + "m4.xlarge", + "m4.2xlarge", + "m4.4xlarge", + "m4.10xlarge", + "m4.16xlarge", + "m5.large", + "m5.xlarge", + "m5.2xlarge", + "m5.4xlarge", + "m5.12xlarge", + "m5.24xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "Name": { + "Default": "Check-Point-Management", + "Type": "String" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "AdminSubnet": { + "Description": "Allow web, SSH, and graphical clients only from this network to communicate with the Management Server", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "GatewaysAddresses": { + "Description": "Allow gateways only from this network to communicate with the Management Server", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*", + "NoEcho": "true" + }, + "GatewayManagement": { + "Description": "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address", + "Type": "String", + "Default": "Locally managed", + "AllowedValues": [ + "Locally managed", + "Over the internet" + ] + }, + "Hostname": { + "Description": "(optional)", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string", + "Type": "String", + "Default": "mgmt-aws" + }, + "AllocatePublicAddress": { + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "SICKey": { + "Description": "Mandatory only if deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "Default": "", + "Type": "String", + "AllowedPattern": "(|[a-zA-Z0-9]{8,})", + "ConstraintDescription": "Can be empty if this is a primary management server. Otherwise, at least 8 alpha numeric characters" + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "Primary": { + "Description": "Determines if this is the primary management server or not", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). Will be ignored for versions lower than R80.30", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "Permissions": { + "Description": "IAM role to attach to the instance profile", + "Type": "String", + "Default": "Create with read permissions", + "AllowedValues": [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions" + ] + }, + "STSRoles": { + "Description": "The IAM role will be able to assume these STS Roles (comma separated list of ARNs, without spaces). Ignored if IAM role is set to 'None' or 'Use existing'", + "Type": "CommaDelimitedList", + "Default": "" + }, + "PredefinedRole": { + "Description": "A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'", + "Type": "String", + "Default": "" + }, + "BootstrapScript": { + "Description": "An optional script with comma separated commands to run on the initial boot", + "Type": "CommaDelimitedList", + "Default": "", + "NoEcho": "true" + } + }, + "Conditions": { + "EnableEncryptedVolume": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "VolumeEncryption" + }, + "" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Condition": "R80.30" + }, + { + "Condition": "R80.40" + } + ] + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + { + "Ref": "AllocatePublicAddress" + }, + "true" + ] + }, + "EnableInstanceConnect": { + "Fn::Equals": [ + { + "Ref": "EnableInstanceConnect" + }, + "true" + ] + }, + "ManageOverInternet": { + "Fn::Equals": [ + { + "Ref": "GatewayManagement" + }, + "Over the internet" + ] + }, + "ManageOverInternetAndAllocatePublicAddress": { + "Fn::And": [ + { + "Condition": "AllocatePublicAddress" + }, + { + "Condition": "ManageOverInternet" + } + ] + }, + "STSRoles": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Fn::Join": [ + ",", + { + "Ref": "STSRoles" + } + ] + }, + "" + ] + } + ] + }, + "CreateRole": { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with assume role permissions (specify an STS role ARN)" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with read permissions" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with read-write permissions" + ] + } + ] + }, + "UsePredefinedRole": { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Use existing (specify an existing IAM role name)" + ] + }, + "UseRole": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "None (configure later)" + ] + } + ] + }, + "AnyAdminSubnet": { + "Fn::Equals": [ + { + "Ref": "AdminSubnet" + }, + "0.0.0.0/0" + ] + }, + "R80.10": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.10" + ] + }, + "R80.20": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.20" + ] + }, + "R80.30": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.30" + ] + }, + "R80.40": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.40" + ] + }, + "NoSIC": { + "Fn::Equals": [ + { + "Ref": "SICKey" + }, + "" + ] + }, + "Primary": { + "Fn::Equals": [ + { + "Ref": "Primary" + }, + "true" + ] + }, + "SecondaryAndNoSIC": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Condition": "Primary" + } + ] + }, + { + "Condition": "NoSIC" + } + ] + }, + "m4t2InstanceType": { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + ".", + { + "Ref": "InstanceType" + } + ] + } + ] + }, + "m4" + ] + }, + { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + ".", + { + "Ref": "InstanceType" + } + ] + } + ] + }, + "t2" + ] + } + ] + }, + "m5InstanceType": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + ".", + { + "Ref": "InstanceType" + } + ] + } + ] + }, + "m5" + ] + }, + "R8020Andm4t2": { + "Fn::And": [ + { + "Condition": "R80.20" + }, + { + "Condition": "m4t2InstanceType" + } + ] + }, + "R8030Andm4t2": { + "Fn::And": [ + { + "Condition": "R80.30" + }, + { + "Condition": "m4t2InstanceType" + } + ] + }, + "R8040Andm4t2": { + "Fn::And": [ + { + "Condition": "R80.30" + }, + { + "Condition": "m4t2InstanceType" + } + ] + }, + "R8010Andm5": { + "Fn::And": [ + { + "Condition": "R80.10" + }, + { + "Condition": "m5InstanceType" + } + ] + }, + "AddMGMTVersionSuffix": { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.20-BYOL" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.30-BYOL" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.40-BYOL" + ] + } + ] + } + }, + "Resources": { + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/amis-deprecated.yaml", + "Parameters": { + "Version": { + "Fn::If": [ + "AddMGMTVersionSuffix", + { + "Fn::Join": [ + "-", + [ + { + "Ref": "Version" + }, + "MGMT" + ] + ] + }, + { + "Ref": "Version" + } + ] + } + } + } + }, + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "AllocatePublicAddress", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "AllocatePublicAddress", + "DependsOn": [ + "Instance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Management security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 257, + "ToPort": 257 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 8211, + "ToPort": 8211 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18191, + "ToPort": 18191 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18192, + "ToPort": 18192 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18210, + "ToPort": 18210 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18211, + "ToPort": 18211 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18221, + "ToPort": 18221 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18264, + "ToPort": 18264 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 22, + "ToPort": 22 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 443, + "ToPort": 443 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 18190, + "ToPort": 18190 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 19009, + "ToPort": 19009 + } + ] + } + }, + "CheckPointManagementRoleStack": { + "Type": "AWS::CloudFormation::Stack", + "Condition": "CreateRole", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml", + "Parameters": { + "Permissions": { + "Ref": "Permissions" + }, + "STSRoles": { + "Fn::Join": [ + ",", + { + "Ref": "STSRoles" + } + ] + } + } + } + }, + "InstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Condition": "UseRole", + "Properties": { + "Path": "/", + "Roles": [ + { + "Fn::If": [ + "CreateRole", + { + "Fn::GetAtt": [ + "CheckPointManagementRoleStack", + "Outputs.CMEIAMRole" + ] + }, + { + "Ref": "PredefinedRole" + } + ] + } + ] + } + }, + "Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Ref": "Name" + } + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "IamInstanceProfile": { + "Fn::If": [ + "UseRole", + { + "Ref": "InstanceProfile" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "AssociatePublicIpAddress": "false", + "Description": "eth0", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "DeleteOnTermination": "true", + "SubnetId": { + "Ref": "Subnet" + } + } + ], + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "KmsKeyId": { + "Fn::If": [ + "EnableEncryptedVolume", + { + "Ref": "VolumeEncryption" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + "echo template_name: management >> /etc/cloud-version", + "echo template_version: 20211212 >> /etc/cloud-version", + { + "Fn::If": [ + "Primary", + { + "Fn::Join": [ + "\n", + [ + "primary=true", + "secondary=false", + "sic=notused" + ] + ] + }, + { + "Fn::Join": [ + "\n", + [ + "primary=false", + "secondary=true", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + } + ] + ] + } + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::Sub": "hname='${Hostname}'" + }, + { + "Fn::Sub": "pwd_hash='${PasswordHash}'" + }, + { + "Fn::Sub": "allow_upload_download='${AllowUploadDownload}'" + }, + { + "Fn::Sub": "ntp1='${NTPPrimary}'" + }, + { + "Fn::Sub": "ntp2='${NTPSecondary}'" + }, + { + "Fn::Sub": "shell='${Shell}'" + }, + { + "Fn::Sub": "admin_subnet='${AdminSubnet}'" + }, + "test -z \"$hname\" || {", + " echo \"set hostname\"", + " clish -c \"set hostname $hname\" -s", + "}", + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + "echo \"set admin shell\"", + "clish -c \"set user admin shell $shell\" -s", + "conf=\"install_security_gw=false\"", + { + "Fn::If": [ + "AnyAdminSubnet", + "conf=\"${conf}&mgmt_gui_clients_radio=any\"", + { + "Fn::Join": [ + "\n", + [ + "admin_subnet_ip=\"$(echo $admin_subnet | cut -d / -f 1)\"", + "admin_subnet_bits=\"$(echo $admin_subnet | cut -d / -f 2)\"", + "conf=\"${conf}&mgmt_gui_clients_radio=network\"", + "conf=\"${conf}&mgmt_gui_clients_ip_field=${admin_subnet_ip}\"", + "conf=\"${conf}&mgmt_gui_clients_subnet_field=${admin_subnet_bits}\"" + ] + ] + } + ] + }, + "conf=\"${conf}&install_security_managment=true\"", + "conf=\"${conf}&install_mgmt_primary=$primary\"", + "conf=\"${conf}&install_mgmt_secondary=$secondary\"", + "conf=\"${conf}&mgmt_admin_radio=gaia_admin\"", + "conf=\"${conf}&ftw_sic_key=$sic\"", + "conf=\"${conf}&download_info=$allow_upload_download\"", + "conf=\"${conf}&upload_info=$allow_upload_download\"", + "config_system -s \"$conf\"", + "rc=$?", + "if test \"$rc\" -eq 0 && $primary ; then", + " until mgmt_cli -r true discard ; do", + " sleep 30", + " done", + "fi", + "chkconfig --add autoprovision", + "service autoprovision start", + { + "Fn::If": [ + "AllocatePublicAddress", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Sub": "wait_handle='${ReadyHandle}'" + }, + "echo \"Generating TOKEN\"", + "TOKEN=`curl_cli -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 3600\"`", + "echo \"Getting instance id\"", + "instance_id=\"$(curl_cli -H \"X-aws-ec2-metadata-token: $TOKEN\" -v http://169.254.169.254/latest/meta-data/instance-id)\"", + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "if test $rc -ne 0; then", + " reason=\"Security Management Server configuration failed\"", + "fi", + { + "Fn::If": [ + "SecondaryAndNoSIC", + "reason=\"SIC key must be provided if installing a secondary Security Management Server\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8040Andm4t2", + "reason=\"m4 and t2 instance types are not supported with R80.40\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8030Andm4t2", + "reason=\"m4 and t2 instance types are not supported with R80.30\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8020Andm4t2", + "reason=\"m4 and t2 instance types are not supported with R80.20\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8010Andm5", + "reason=\"m5 instance types are not supported with R80.10\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + "if test -n \"$reason\"; then", + " message=\"$reason\"", + " status=FAILURE", + "else", + " message=\"Security Management Server configuration completed\"", + " status=SUCCESS", + "fi", + "curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"'$status'\", \"Reason\" : \"'\"$message\"'\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "ManageOverInternetAndAllocatePublicAddress", + { + "Fn::Join": [ + "\n", + [ + "addr=\"$(ip addr show dev eth0 | sed -n -e 's|^ *inet \\([^/]*\\)/.* eth0$|\\1|p')\"", + "pub_addr=\"$(ip addr show dev eth0 | sed -n -e 's|^ *inet \\([^/]*\\)/.* eth0:1$|\\1|p')\"", + "uid=\"$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json | jq -r '.objects[] | select(.ipaddr == \"'\"$addr\"'\") | .uid')\"", + "test -z \"$uid\" || test -z \"$pub_addr\" || mgmt_cli -r true set-generic-object uid \"$uid\" ipaddr \"$pub_addr\"" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::Join": [ + "", + [ + "bootstrap=$(echo '", + { + "Fn::Base64": { + "Fn::Join": [ + "; ", + { + "Ref": "BootstrapScript" + } + ] + } + }, + "' | base64 --decode)" + ] + ] + }, + "eval $bootstrap", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + "" + ] + ] + } + } + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "AllocatePublicAddress", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "DependsOn": "Instance", + "Condition": "AllocatePublicAddress", + "Properties": { + "InstanceId": { + "Ref": "Instance" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Condition": "AllocatePublicAddress", + "Description": "The public address of the management server", + "Value": { + "Ref": "PublicAddress" + } + }, + "SSH": { + "Condition": "AllocatePublicAddress", + "Description": "SSH command", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + } + }, + "URL": { + "Condition": "AllocatePublicAddress", + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/mds-r8030/README.md b/deprecated/aws/templates/mds-r8030/README.md new file mode 100644 index 00000000..d1900d51 --- /dev/null +++ b/deprecated/aws/templates/mds-r8030/README.md @@ -0,0 +1,23 @@ + + +## Multi-Domain Management Server + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Multi-Domain Security Management Server.

For more details, refer to sk143213. +
Deploys a Multi-Domain Security Management Server into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/mds-r8030/mds.json b/deprecated/aws/templates/mds-r8030/mds.json new file mode 100755 index 00000000..dd598c80 --- /dev/null +++ b/deprecated/aws/templates/mds-r8030/mds.json @@ -0,0 +1,1270 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Multi-Domain Server (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "VPC", + "Subnet" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "Name", + "InstanceType", + "KeyName", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "IAM Permissions (ignored when the installation type is not Primary Multi-Domain Server)" + }, + "Parameters": [ + "Permissions", + "PredefinedRole", + "STSRoles" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "PasswordHash" + ] + }, + { + "Label": { + "default": "Security Management Server Settings" + }, + "Parameters": [ + "Hostname", + "InstallationType", + "SICKey", + "AllowUploadDownload", + "AdminSubnet", + "GatewaysAddresses", + "NTPPrimary", + "NTPSecondary", + "BootstrapScript" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "Subnet": { + "default": "Subnet" + }, + "Name": { + "default": "Name" + }, + "Version": { + "default": "Version & license" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AdminSubnet": { + "default": "Administrator addresses" + }, + "GatewaysAddresses": { + "default": "Gateways addresses" + }, + "Hostname": { + "default": "Hostname" + }, + "SICKey": { + "default": "SIC key" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "InstallationType": { + "default": "Installation Type" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + }, + "STSRoles": { + "default": "STS roles" + }, + "PredefinedRole": { + "default": "Existing IAM role name" + }, + "Permissions": { + "default": "IAM role" + }, + "BootstrapScript": { + "default": "Bootstrap script" + } + } + } + }, + "Parameters": { + "VPC": { + "Description": "Select an existing VPC", + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "Subnet": { + "Description": "To access the instance from the internet, make sure the subnet has a route to the internet", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "Version": { + "Type": "String", + "Default": "R80.30-BYOL", + "AllowedValues": [ + "R80.10-BYOL", + "R80.20-BYOL", + "R80.30-BYOL", + "R80.40-BYOL" + ] + }, + "InstanceType": { + "Description": "m4 instance types are supported only with version R80.10 and m5 are supported only with R80.20 and above", + "Type": "String", + "Default": "m5.12xlarge", + "AllowedValues": [ + "m4.4xlarge", + "m4.10xlarge", + "m4.16xlarge", + "m5.4xlarge", + "m5.12xlarge", + "m5.24xlarge" + ], + "ConstraintDescription": "must be a valid EC2 instance type." + }, + "Name": { + "Default": "Check-Point-MDS", + "Type": "String" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "AdminSubnet": { + "Description": "Allow web, SSH, and graphical clients only from this network to communicate with the Management Server", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "GatewaysAddresses": { + "Description": "Allow gateways only from this network to communicate with the Management Server", + "Type": "String", + "Default": "0.0.0.0/0", + "AllowedPattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*", + "NoEcho": "true" + }, + "Hostname": { + "Description": "(optional)", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string", + "Type": "String", + "Default": "" + }, + "SICKey": { + "Description": "Mandatory if deploying a Secondary Multi-Domain Server or Multi-Domain Log Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "Default": "", + "Type": "String", + "AllowedPattern": "(|[a-zA-Z0-9]{8,})", + "ConstraintDescription": "Can be empty if this is a Primary Multi-Domain Server. Otherwise, at least 8 alpha numeric characters" + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "InstallationType": { + "Type": "String", + "Default": "Primary Multi-Domain Server", + "AllowedValues": [ + "Primary Multi-Domain Server", + "Secondary Multi-Domain Server", + "Multi-Domain Log Server" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "Permissions": { + "Description": "IAM role to attach to the instance profile", + "Type": "String", + "Default": "Create with read permissions", + "AllowedValues": [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions" + ] + }, + "STSRoles": { + "Description": "The IAM role will be able to assume these STS Roles (comma separated list of ARNs, without spaces). Ignored if IAM role is set to 'None' or 'Use existing'", + "Type": "CommaDelimitedList", + "Default": "" + }, + "PredefinedRole": { + "Description": "A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'", + "Type": "String", + "Default": "" + }, + "BootstrapScript": { + "Description": "An optional script with comma separated commands to run on the initial boot", + "Type": "CommaDelimitedList", + "Default": "", + "NoEcho": "true" + } + }, + "Conditions": { + "EnableEncryptedVolume": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "VolumeEncryption" + }, + "" + ] + } + ] + }, + { + "Condition": "R80.30" + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + "1", + "0" + ] + }, + "EnableInstanceConnect": { + "Fn::Equals": [ + { + "Ref": "EnableInstanceConnect" + }, + "true" + ] + }, + "STSRoles": { + "Fn::And": [ + { + "Condition": "Primary" + }, + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Fn::Join": [ + ",", + { + "Ref": "STSRoles" + } + ] + }, + "" + ] + } + ] + } + ] + }, + "CreateRole": { + "Fn::And": [ + { + "Fn::Or": [ + { + "Condition": "Primary" + }, + { + "Condition": "Secondary" + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with assume role permissions (specify an STS role ARN)" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with read permissions" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "Create with read-write permissions" + ] + } + ] + } + ] + }, + "UseRole": { + "Fn::And": [ + { + "Fn::Or": [ + { + "Condition": "Primary" + }, + { + "Condition": "Secondary" + } + ] + }, + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "Permissions" + }, + "None (configure later)" + ] + } + ] + } + ] + }, + "AnyAdminSubnet": { + "Fn::Equals": [ + { + "Ref": "AdminSubnet" + }, + "0.0.0.0/0" + ] + }, + "R80.10": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.10" + ] + }, + "R80.20": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.20" + ] + }, + "R80.30": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.30" + ] + }, + "R80.40": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.40" + ] + }, + "NoSIC": { + "Fn::Equals": [ + { + "Ref": "SICKey" + }, + "" + ] + }, + "Primary": { + "Fn::Equals": [ + { + "Ref": "InstallationType" + }, + "Primary Multi-Domain Server" + ] + }, + "Secondary": { + "Fn::Equals": [ + { + "Ref": "InstallationType" + }, + "Secondary Multi-Domain Server" + ] + }, + "LogServer": { + "Fn::Equals": [ + { + "Ref": "InstallationType" + }, + "Multi-Domain Log Server" + ] + }, + "SecondaryAndNoSIC": { + "Fn::And": [ + { + "Condition": "Secondary" + }, + { + "Condition": "NoSIC" + } + ] + }, + "m4InstanceType": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + ".", + { + "Ref": "InstanceType" + } + ] + } + ] + }, + "m4" + ] + }, + "m5InstanceType": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + ".", + { + "Ref": "InstanceType" + } + ] + } + ] + }, + "m5" + ] + }, + "R8020Andm4": { + "Fn::And": [ + { + "Condition": "R80.20" + }, + { + "Condition": "m4InstanceType" + } + ] + }, + "R8030Andm4": { + "Fn::And": [ + { + "Condition": "R80.30" + }, + { + "Condition": "m4InstanceType" + } + ] + }, + "R8010Andm5": { + "Fn::And": [ + { + "Condition": "R80.10" + }, + { + "Condition": "m5InstanceType" + } + ] + }, + "AddMGMTVersionSuffix": { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.20-BYOL" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.30-BYOL" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "Version" + }, + "R80.40-BYOL" + ] + } + ] + } + }, + "Resources": { + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/amis-deprecated.yaml", + "Parameters": { + "Version": { + "Fn::If": [ + "AddMGMTVersionSuffix", + { + "Fn::Join": [ + "-", + [ + { + "Ref": "Version" + }, + "MGMT" + ] + ] + }, + { + "Ref": "Version" + } + ] + } + } + } + }, + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "AllocatePublicAddress", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "AllocatePublicAddress", + "DependsOn": [ + "Instance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Management security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 257, + "ToPort": 257 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 8211, + "ToPort": 8211 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18191, + "ToPort": 18191 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18192, + "ToPort": 18192 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18210, + "ToPort": 18210 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18211, + "ToPort": 18211 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18221, + "ToPort": 18221 + }, + { + "CidrIp": { + "Ref": "GatewaysAddresses" + }, + "IpProtocol": "tcp", + "FromPort": 18264, + "ToPort": 18264 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 22, + "ToPort": 22 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 443, + "ToPort": 443 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 18190, + "ToPort": 18190 + }, + { + "CidrIp": { + "Ref": "AdminSubnet" + }, + "IpProtocol": "tcp", + "FromPort": 19009, + "ToPort": 19009 + } + ] + } + }, + "CheckPointManagementRoleStack": { + "Type": "AWS::CloudFormation::Stack", + "Condition": "CreateRole", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml", + "Parameters": { + "Permissions": { + "Ref": "Permissions" + }, + "STSRoles": { + "Fn::Join": [ + ",", + { + "Ref": "STSRoles" + } + ] + } + } + } + }, + "InstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Condition": "UseRole", + "Properties": { + "Path": "/", + "Roles": [ + { + "Fn::If": [ + "CreateRole", + { + "Fn::GetAtt": [ + "CheckPointManagementRoleStack", + "Outputs.CMEIAMRole" + ] + }, + { + "Ref": "PredefinedRole" + } + ] + } + ] + } + }, + "Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Ref": "Name" + } + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "IamInstanceProfile": { + "Fn::If": [ + "UseRole", + { + "Ref": "InstanceProfile" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "AssociatePublicIpAddress": "false", + "Description": "eth0", + "GroupSet": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "DeleteOnTermination": "true", + "SubnetId": { + "Ref": "Subnet" + } + } + ], + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "KmsKeyId": { + "Fn::If": [ + "EnableEncryptedVolume", + { + "Ref": "VolumeEncryption" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + "echo template_name: mds >> /etc/cloud-version", + "echo template_version: 20211212 >> /etc/cloud-version", + { + "Fn::If": [ + "Primary", + { + "Fn::Join": [ + "\n", + [ + "primary=true", + "secondary=false", + "logServer=false", + "sic=notused" + ] + ] + }, + { + "Fn::If": [ + "Secondary", + { + "Fn::Join": [ + "\n", + [ + "primary=false", + "secondary=true", + "logServer=false", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + } + ] + ] + }, + { + "Fn::Join": [ + "\n", + [ + "primary=false", + "secondary=false", + "logServer=true", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + } + ] + ] + } + ] + } + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::Sub": "hname='${Hostname}'" + }, + { + "Fn::Sub": "pwd_hash='${PasswordHash}'" + }, + { + "Fn::Sub": "allow_upload_download='${AllowUploadDownload}'" + }, + { + "Fn::Sub": "ntp1='${NTPPrimary}'" + }, + { + "Fn::Sub": "ntp2='${NTPSecondary}'" + }, + { + "Fn::Sub": "shell='${Shell}'" + }, + { + "Fn::Sub": "admin_subnet='${AdminSubnet}'" + }, + "test -z \"$hname\" || {", + " echo \"set hostname\"", + " clish -c \"set hostname $hname\" -s", + "}", + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + "test -z \"$pwd_hash\" || {", + " echo \"set admin password\"", + " clish -c \"set user admin password-hash $pwd_hash\" -s", + "}", + "echo \"set admin shell\"", + "clish -c \"set user admin shell $shell\" -s", + "conf=\"install_security_gw=false\"", + { + "Fn::If": [ + "AnyAdminSubnet", + "conf=\"${conf}&mgmt_gui_clients_radio=any\"", + { + "Fn::Join": [ + "\n", + [ + "admin_subnet_ip=\"$(echo $admin_subnet | cut -d / -f 1)\"", + "admin_subnet_bits=\"$(echo $admin_subnet | cut -d / -f 2)\"", + "conf=\"${conf}&mgmt_gui_clients_radio=network\"", + "conf=\"${conf}&mgmt_gui_clients_ip_field=${admin_subnet_ip}\"", + "conf=\"${conf}&mgmt_gui_clients_subnet_field=${admin_subnet_bits}\"" + ] + ] + } + ] + }, + "conf=\"${conf}&install_mds_primary=$primary\"", + "conf=\"${conf}&install_mds_secondary=$secondary\"", + "conf=\"${conf}&install_mlm=$logServer\"", + "conf=\"${conf}&install_mds_interface=eth0\"", + "conf=\"${conf}&mgmt_admin_radio=gaia_admin\"", + "conf=\"${conf}&ftw_sic_key=$sic\"", + "conf=\"${conf}&download_info=$allow_upload_download\"", + "conf=\"${conf}&upload_info=$allow_upload_download\"", + "config_system -s \"$conf\"", + "rc=$?", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + "if test \"$rc\" -eq 0 && $primary ; then", + " until mgmt_cli -r true discard ; do", + " sleep 30", + " done", + "fi", + "chkconfig --add autoprovision", + "service autoprovision start", + { + "Fn::If": [ + "AllocatePublicAddress", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Sub": "wait_handle='${ReadyHandle}'" + }, + "echo \"Generating TOKEN\"", + "TOKEN=`curl_cli -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 3600\"`", + "echo \"Getting instance id\"", + "instance_id=\"$(curl_cli -H \"X-aws-ec2-metadata-token: $TOKEN\" -v http://169.254.169.254/latest/meta-data/instance-id)\"", + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZHBgJeNU6vNo+07LyMjKyuDQYYhtwEnG3MoC5swU2iwoaqBMojDJSwTXJJYlJaZmpOiEJKanJGXn5OfnplarKPgmZesZ2hkYABSxi2siVDmnJNYXKxgpOCcWlSSmZaZnFiSmZ+n4FhakpFflFlSaSAnzmtgYmBmZGlobmxpaBYlzmuMzKWjS5oYFZCDgZGVgbmJkZcBKM7B1MTIyLDd6MS/l4XLWFrX8gim3D/n+/4Es0S7/cLVv22Wzf9weOGtKzfytIMn/FZZYtfyYd6L+DdP1V2+aiyzr773QOvDifXB+vNOsTJOlutPk7Fc7vsralsxi2ra6/L655HHvGaqioS8Vjv+uV7yqkFB//oNblr/177WfHt9/iqW9sVXfnYuNYm/7Tyxyexmms3GHTub/s6xshM4Yf2eLTWtarakhO3/wkAbA734fbblxZti2XIOK4fN0m5VmySznGnzE3ve9RyVTTvMbF/NuWy6eU/mqa9n5r74m9Ir3mCcF+cVO/OkXPuWuVIHruYJmyrH3Z8db/v+2veyQ6/sdlfwyjilZ7Pc+HHtVn73J5cFjKuZGJkXNx41aDxkIAsMW1k+FjEWkf3x2y+euyvf9iU6dM2d6wKH+FZ2PDdonASSV2Zp7DJobG/AqmZhzpIs+kVtEzCB84DcJMzCasDMyPgfLbkzg6KXda59x9yLJ6VCF67J/Pw58tZsxnYp//CVCys5tW5/198kd+Z4XNaN5vaF0997mtqVszlGJO3vi9jBlW7/ZvNdxTT5kyG/is7Y+jjcaFxfPq+5avei419NxPtuCjp8+aOj5StavzwpVk/1MgO3gpRsxk/xHV/2dr/ViLzrK9Yt3nxiU+px3aqlq/YEt+XeDV9y6oeCI3fGhy+/S/aFxVZVfv0p2/pYd+q+r4UTnM/0ys9i4GrXfBmqFMGg/OqxkLNmtDvH3R7HrFS2FU8VVzlumao4dWftRZPVwtfW7rnzyNby7F670oKFEpHMJ5W29M+5Gqd1fem2K1y5P7Y7CLrNkq/kS9rPP/3NA3158SkAHEuNARMEAAA= | base64 -d | gunzip -c | cpopenssl x509 -inform DER >$CPDIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "if test $rc -ne 0; then", + " reason=\"Security Management Server configuration failed\"", + "fi", + { + "Fn::If": [ + "SecondaryAndNoSIC", + "reason=\"SIC key must be provided if installing a secondary Security Management Server\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8030Andm4", + "reason=\"m4 instance types are not supported with R80.30\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8020Andm4", + "reason=\"m4 instance types are not supported with R80.20\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::If": [ + "R8010Andm5", + "reason=\"m5 instance types are not supported with R80.10\"", + { + "Ref": "AWS::NoValue" + } + ] + }, + "if test -n \"$reason\"; then", + " message=\"$reason\"", + " status=FAILURE", + "else", + " message=\"Security Management Server configuration completed\"", + " status=SUCCESS", + "fi", + "curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"'$status'\", \"Reason\" : \"'\"$message\"'\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + { + "Fn::Join": [ + "", + [ + "bootstrap=$(echo '", + { + "Fn::Base64": { + "Fn::Join": [ + "; ", + { + "Ref": "BootstrapScript" + } + ] + } + }, + "' | base64 --decode)" + ] + ] + }, + "eval $bootstrap", + "" + ] + ] + } + } + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "AllocatePublicAddress", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "DependsOn": "Instance", + "Condition": "AllocatePublicAddress", + "Properties": { + "InstanceId": { + "Ref": "Instance" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Condition": "AllocatePublicAddress", + "Description": "The public address of the management server", + "Value": { + "Ref": "PublicAddress" + } + }, + "SSH": { + "Condition": "AllocatePublicAddress", + "Description": "SSH command", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + } + }, + "URL": { + "Condition": "AllocatePublicAddress", + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + } + } + } +} diff --git a/deprecated/aws/templates/single-gw-r8030/README.md b/deprecated/aws/templates/single-gw-r8030/README.md new file mode 100644 index 00000000..9c5c13a1 --- /dev/null +++ b/deprecated/aws/templates/single-gw-r8030/README.md @@ -0,0 +1,25 @@ +## Security Gateway + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configures a Security Gateway.

To deploy the Security Gateway so that it will be automatically provisioned, refer to sk131434. +
Creates a new VPC and deploys a Security Gateway into it.
Deploys a Security Gateway into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/single-gw-r8030/gateway-into-vpc.json b/deprecated/aws/templates/single-gw-r8030/gateway-into-vpc.json new file mode 100644 index 00000000..bab15c99 --- /dev/null +++ b/deprecated/aws/templates/single-gw-r8030/gateway-into-vpc.json @@ -0,0 +1,1000 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Security Gateway into an existing VPC (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "VPC", + "ExternalSubnet", + "InternalSubnet", + "InternalRouteTable", + "ResourcesTagName" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "Name", + "InstanceType", + "KeyName", + "AllocatePublicAddress", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "SICKey", + "PasswordHash" + ] + }, + { + "Label": { + "default": "Advanced Settings" + }, + "Parameters": [ + "Hostname", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + }, + { + "Label": { + "default": "Automatic Provisioning with Security Management Server Settings (optional)" + }, + "Parameters": [ + "ControlGatewayOverPrivateOrPublicAddress", + "ManagementServer", + "ConfigurationTemplate" + ] + } + ], + "ParameterLabels": { + "VPC": { + "default": "VPC" + }, + "ExternalSubnet": { + "default": "External subnet" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "default": "Gateway address" + }, + "ManagementServer": { + "default": "Management Server" + }, + "ConfigurationTemplate": { + "default": "Configuration template" + }, + "InternalSubnet": { + "default": "Internal subnet" + }, + "InternalRouteTable": { + "default": "Internal route table" + }, + "ResourcesTagName": { + "default": "Resources prefix tag" + }, + "Version": { + "default": "Version & license" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AllocatePublicAddress": { + "default": "Allocate an Elastic IP" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "Hostname": { + "default": "Hostname" + }, + "SICKey": { + "default": "SIC key" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + } + } + } + }, + "Parameters": { + "VPC": { + "Type": "AWS::EC2::VPC::Id", + "MinLength": "1" + }, + "ExternalSubnet": { + "Description": "The external subnet of the Security Gateway", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "InternalSubnet": { + "Description": "The internal subnet of the Security Gateway", + "Type": "AWS::EC2::Subnet::Id", + "MinLength": "1" + }, + "InternalRouteTable": { + "Description": "Set 0.0.0.0/0 route to the Security Gateway instance in this route table (e.g. rtb-12a34567) (optional)", + "Type": "String" + }, + "ResourcesTagName": { + "Description": "(optional)", + "Type": "String" + }, + "Name": { + "Type": "String", + "Default": "Check-Point-Gateway" + }, + "Version": { + "Type": "String", + "Default": "R80.30-PAYG-NGTP", + "AllowedValues": [ + "R80.10-BYOL", + "R80.10-PAYG-NGTP", + "R80.10-PAYG-NGTX", + "R80.20-BYOL", + "R80.20-PAYG-NGTP", + "R80.20-PAYG-NGTX", + "R80.30-BYOL", + "R80.30-PAYG-NGTP", + "R80.30-PAYG-NGTX", + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX" + ] + }, + "InstanceType": { + "Description": "c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and above", + "Type": "String", + "Default": "c5.xlarge", + "AllowedValues": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.18xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "Must be a valid EC2 instance type" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "Description": "Determines if the Security Gateway is provisioned using its private or public address", + "Default": "private", + "Type": "String", + "AllowedValues": [ + "private", + "public" + ] + }, + "ManagementServer": { + "Description": "The name that represents the Security Management Server in the automatic provisioning configuration", + "Type": "String" + }, + "ConfigurationTemplate": { + "Description": "A name of a Security Gateway configuration template in the automatic provisioning configuration", + "Type": "String" + }, + "AllocatePublicAddress": { + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "NoEcho": "true", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "Hostname": { + "Description": "(optional)", + "Type": "String", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string" + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "MinLength": "8", + "Type": "String", + "AllowedPattern": "[a-zA-Z0-9]*" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). Will be ignored for versions lower than R80.30", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + } + }, + "Conditions": { + "R80.30": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.30" + ] + }, + "R80.40": { + "Fn::Equals": [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Ref": "Version" + } + ] + } + ] + }, + "R80.40" + ] + }, + "EnableEncryptedVolume": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "VolumeEncryption" + }, + "" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Condition": "R80.30" + }, + { + "Condition": "R80.40" + } + ] + } + ] + }, + "ResourcesTagNameGiven": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "ResourcesTagName" + }, + "" + ] + } + ] + }, + "ProvidedManagementParameters": { + "Fn::And": [ + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "ManagementServer" + }, + "" + ] + } + ] + }, + { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "ConfigurationTemplate" + }, + "" + ] + } + ] + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + { + "Ref": "AllocatePublicAddress" + }, + "true" + ] + }, + "EnableInstanceConnect": { + "Fn::Equals": [ + { + "Ref": "EnableInstanceConnect" + }, + "true" + ] + }, + "RouteTableIdExist": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "InternalRouteTable" + }, + "" + ] + } + ] + }, + "ProvidedPassHash": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "PasswordHash" + }, + "" + ] + } + ] + } + }, + "Resources": { + "ReadyHandle": { + "Type": "AWS::CloudFormation::WaitConditionHandle", + "Condition": "AllocatePublicAddress", + "Properties": {} + }, + "ReadyCondition": { + "Type": "AWS::CloudFormation::WaitCondition", + "Condition": "AllocatePublicAddress", + "DependsOn": [ + "ChkpInstance" + ], + "Properties": { + "Handle": { + "Ref": "ReadyHandle" + }, + "Timeout": "3600" + } + }, + "AMI": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/amis-deprecated.yaml", + "Parameters": { + "Version": { + "Fn::Join": [ + "-", + [ + { + "Ref": "Version" + }, + "GW" + ] + ] + } + } + } + }, + "ExternalNetworkInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Fn::Join": [ + "_", + [ + { + "Fn::If": [ + "ResourcesTagNameGiven", + { + "Ref": "ResourcesTagName" + }, + { + "Ref": "AWS::StackName" + } + ] + }, + "ExternalNetworkInterface" + ] + ] + } + } + ], + "Description": "eth0", + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "PermissiveSecurityGroup" + } + ], + "SubnetId": { + "Ref": "ExternalSubnet" + } + } + }, + "InternalNetworkInterface": { + "Type": "AWS::EC2::NetworkInterface", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Fn::Join": [ + "_", + [ + { + "Fn::If": [ + "ResourcesTagNameGiven", + { + "Ref": "ResourcesTagName" + }, + { + "Ref": "AWS::StackName" + } + ] + }, + "InternalNetworkInterface" + ] + ] + } + } + ], + "Description": "eth1", + "SourceDestCheck": "false", + "GroupSet": [ + { + "Ref": "PermissiveSecurityGroup" + } + ], + "SubnetId": { + "Ref": "InternalSubnet" + } + } + }, + "PermissiveSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Fn::Join": [ + "_", + [ + { + "Fn::If": [ + "ResourcesTagNameGiven", + { + "Ref": "ResourcesTagName" + }, + { + "Ref": "AWS::StackName" + } + ] + }, + "PermissiveSecurityGroup" + ] + ] + } + } + ], + "GroupDescription": "Permissive security group", + "VpcId": { + "Ref": "VPC" + }, + "SecurityGroupIngress": [ + { + "IpProtocol": "-1", + "CidrIp": "0.0.0.0/0" + } + ] + } + }, + "InternalDefaultRoute": { + "Type": "AWS::EC2::Route", + "Condition": "RouteTableIdExist", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NetworkInterfaceId": { + "Ref": "InternalNetworkInterface" + }, + "RouteTableId": { + "Ref": "InternalRouteTable" + } + } + }, + "ChkpInstance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": { + "Ref": "Name" + } + }, + { + "Fn::If": [ + "ProvidedManagementParameters", + { + "Key": "x-chkp-tags", + "Value": { + "Fn::Join": [ + ":", + [ + { + "Fn::Join": [ + "=", + [ + "management", + { + "Ref": "ManagementServer" + } + ] + ] + }, + { + "Fn::Join": [ + "=", + [ + "template", + { + "Ref": "ConfigurationTemplate" + } + ] + ] + }, + { + "Fn::Join": [ + "=", + [ + "ip-address", + { + "Ref": "ControlGatewayOverPrivateOrPublicAddress" + } + ] + ] + } + ] + ] + } + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "ImageId": { + "Fn::GetAtt": [ + "AMI", + "Outputs.ImageId" + ] + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/xvda", + "Ebs": { + "Encrypted": { + "Fn::If": [ + "EnableEncryptedVolume", + "true", + "false" + ] + }, + "KmsKeyId": { + "Fn::If": [ + "EnableEncryptedVolume", + { + "Ref": "VolumeEncryption" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "VolumeType": "gp2", + "VolumeSize": { + "Ref": "VolumeSize" + } + } + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "\n", + [ + "#!/bin/bash", + "logfile=/var/log/aws-user-data.log", + "> ${logfile}", + "exec 1>>${logfile} 2>>${logfile}", + { + "Fn::If": [ + "ProvidedPassHash", + { + "Fn::Join": [ + "\n", + [ + { + "Fn::Join": [ + "", + [ + "pwd_hash='", + { + "Ref": "PasswordHash" + }, + "'" + ] + ] + }, + "echo \"set admin password\"", + "clish -c \"set user admin password-hash $pwd_hash\" -s" + ] + ] + }, + "pwd_hash=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"" + ] + }, + { + "Fn::Join": [ + "", + [ + "hname='", + { + "Ref": "Hostname" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "wait_handle='", + { + "Fn::If": [ + "AllocatePublicAddress", + { + "Ref": "ReadyHandle" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "enable_eic='", + { + "Fn::If": [ + "EnableInstanceConnect", + { + "Ref": "EnableInstanceConnect" + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "'" + ] + ] + }, + "echo \"Generating TOKEN\"", + "TOKEN=`curl_cli -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 3600\"`", + "echo \"Getting instance id\"", + "instance_id=\"$(curl_cli -H \"X-aws-ec2-metadata-token: $TOKEN\" -v http://169.254.169.254/latest/meta-data/instance-id)\"", + { + "Fn::Join": [ + "", + [ + "ntp1='", + { + "Ref": "NTPPrimary" + }, + "'" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "ntp2='", + { + "Ref": "NTPSecondary" + }, + "'" + ] + ] + }, + "echo \"Updating cloud-version file\"", + "template=\"gateway\"", + "echo \"template_name: ${template}\" >> /etc/cloud-version", + "echo \"template_version: 20211212\" >> /etc/cloud-version", + "echo \"set admin shell\"", + { + "Fn::Sub": "clish -c \"set user admin shell ${Shell}\" -s" + }, + "printf H4sIAEQeOVoCAzNoYuE3aGL6voCZiZGJiZH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DIR/tmp/wait-handle.crt", + "cat $CPDIR/conf/ca-bundle.crt >>$CPDIR/tmp/wait-handle.crt", + "test -z \"$hname\" || {", + " echo \"set hostname\"", + " clish -c \"set hostname $hname\" -s", + "}", + "test -z \"$ntp1\" || {", + " echo \"set primary NTP server\"", + " clish -c \"set ntp server primary $ntp1 version 4\" -s", + " test -z \"$ntp2\" || {", + " echo \"set secondary NTP server\"", + " clish -c \"set ntp server secondary $ntp2 version 4\" -s", + " }", + " clish -c \"set ntp active on\" -s", + "}", + { + "Fn::Join": [ + "", + [ + "sic=$(echo '", + { + "Fn::Base64": { + "Ref": "SICKey" + } + }, + "' | base64 --decode)" + ] + ] + }, + { + "Fn::Sub": "blink_config -s \"gateway_cluster_member=false&ftw_sic_key='$sic'&upload_info=${AllowUploadDownload}&download_info=${AllowUploadDownload}&admin_hash='$pwd_hash'\"" + }, + "rc=$?", + "test -z \"$enable_eic\" || {", + "echo \"enabling ec2 instance connect\"", + "if [ -d \"/etc/ec2-instance-connect\" ]; then", + " ec2-instance-connect-config on", + "else", + " echo \"Could not enable eic, not supported in versions R80.30 and below\"", + "fi", + "}", + "if test -n \"$wait_handle\"; then", + " if test $rc -ne 0; then", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"FAILURE\", \"Reason\" : \"Security Gateway configuration failed\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"None\"}' \"$wait_handle\"", + " else", + " curl_cli -s -S --cacert $CPDIR/tmp/wait-handle.crt -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\", \"Reason\" : \"Security Gateway Configuration Complete\", \"UniqueId\" : \"'$instance_id'\", \"Data\" : \"Configuration completed.\"}' \"$wait_handle\"", + " fi", + "fi", + "" + ] + ] + } + }, + "KeyName": { + "Ref": "KeyName" + }, + "NetworkInterfaces": [ + { + "DeviceIndex": "0", + "NetworkInterfaceId": { + "Ref": "ExternalNetworkInterface" + } + }, + { + "DeviceIndex": "1", + "NetworkInterfaceId": { + "Ref": "InternalNetworkInterface" + } + } + ] + } + }, + "PublicAddress": { + "Type": "AWS::EC2::EIP", + "Condition": "AllocatePublicAddress", + "Properties": { + "Domain": "vpc" + } + }, + "AddressAssoc": { + "Type": "AWS::EC2::EIPAssociation", + "Condition": "AllocatePublicAddress", + "DependsOn": "ChkpInstance", + "Properties": { + "NetworkInterfaceId": { + "Ref": "ExternalNetworkInterface" + }, + "AllocationId": { + "Fn::GetAtt": [ + "PublicAddress", + "AllocationId" + ] + }, + "PrivateIpAddress": { + "Fn::GetAtt": [ + "ExternalNetworkInterface", + "PrimaryPrivateIpAddress" + ] + } + } + } + }, + "Outputs": { + "PublicAddress": { + "Description": "The public address of the Check Point instance", + "Value": { + "Ref": "PublicAddress" + }, + "Condition": "AllocatePublicAddress" + }, + "SSH": { + "Description": "SSH command to the Check Point instance", + "Value": { + "Fn::Join": [ + "", + [ + "ssh admin@", + { + "Ref": "PublicAddress" + } + ] + ] + }, + "Condition": "AllocatePublicAddress" + }, + "URL": { + "Description": "URL to the portal", + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PublicAddress" + } + ] + ] + }, + "Condition": "AllocatePublicAddress" + }, + "ManagementName": { + "Description": "The name that represents the Security Management Server", + "Value": { + "Ref": "ManagementServer" + } + }, + "ConfigurationTemplateName": { + "Description": "The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name", + "Value": { + "Ref": "ConfigurationTemplate" + } + } + } +} diff --git a/deprecated/aws/templates/single-gw-r8030/gateway.json b/deprecated/aws/templates/single-gw-r8030/gateway.json new file mode 100644 index 00000000..1e5863d3 --- /dev/null +++ b/deprecated/aws/templates/single-gw-r8030/gateway.json @@ -0,0 +1,543 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Deploys a Check Point Security Gateway into a new VPC (20211212)", + "Metadata": { + "AWS::CloudFormation::Interface": { + "ParameterGroups": [ + { + "Label": { + "default": "VPC Network Configuration" + }, + "Parameters": [ + "AvailabilityZone", + "VpcCidr", + "ExternalSubnetCidr", + "InternalSubnetCidr", + "ResourcesTagName" + ] + }, + { + "Label": { + "default": "EC2 Instance Configuration" + }, + "Parameters": [ + "Name", + "InstanceType", + "KeyName", + "AllocatePublicAddress", + "VolumeSize", + "VolumeEncryption", + "EnableInstanceConnect" + ] + }, + { + "Label": { + "default": "Check Point Settings" + }, + "Parameters": [ + "Version", + "Shell", + "SICKey", + "PasswordHash" + ] + }, + { + "Label": { + "default": "Advanced Settings" + }, + "Parameters": [ + "Hostname", + "AllowUploadDownload", + "NTPPrimary", + "NTPSecondary" + ] + }, + { + "Label": { + "default": "Automatic Provisioning with Security Management Server Settings (optional)" + }, + "Parameters": [ + "ControlGatewayOverPrivateOrPublicAddress", + "ManagementServer", + "ConfigurationTemplate" + ] + } + ], + "ParameterLabels": { + "AvailabilityZone": { + "default": "Availability zone" + }, + "VpcCidr": { + "default": "VPC CIDR" + }, + "ExternalSubnetCidr": { + "default": "External subnet CIDR" + }, + "InternalSubnetCidr": { + "default": "Internal subnet CIDR" + }, + "ResourcesTagName": { + "default": "Resources prefix tag" + }, + "Name": { + "default": "Name" + }, + "Version": { + "default": "Version & license" + }, + "InstanceType": { + "default": "Instance type" + }, + "KeyName": { + "default": "Key name" + }, + "AllocatePublicAddress": { + "default": "Allocate an Elastic IP" + }, + "EnableInstanceConnect": { + "default": "Enable AWS Instance Connect" + }, + "Shell": { + "default": "Admin shell" + }, + "PasswordHash": { + "default": "Password hash" + }, + "Hostname": { + "default": "Hostname" + }, + "SICKey": { + "default": "SIC key" + }, + "VolumeSize": { + "default": "Root volume size (GB)" + }, + "VolumeEncryption": { + "default": "Volume encryption KMS key identifier" + }, + "AllowUploadDownload": { + "default": "Allow upload & download" + }, + "NTPPrimary": { + "default": "Primary NTP server" + }, + "NTPSecondary": { + "default": "Secondary NTP server" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "default": "Gateway address" + }, + "ManagementServer": { + "default": "Management Server" + }, + "ConfigurationTemplate": { + "default": "Configuration template" + } + } + } + }, + "Parameters": { + "AvailabilityZone": { + "Description": "The availability zone in which to deploy the instance", + "Type": "AWS::EC2::AvailabilityZone::Name", + "MinLength": "1" + }, + "VpcCidr": { + "Description": "The CIDR block for your VPC", + "Type": "String", + "Default": "10.0.0.0/16", + "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28" + }, + "ExternalSubnetCidr": { + "Description": "The external subnet of the Security Gateway", + "Type": "String", + "Default": "10.0.0.0/24" + }, + "InternalSubnetCidr": { + "Description": "The internal subnet of the Security Gateway", + "Type": "String", + "Default": "10.0.1.0/24" + }, + "ResourcesTagName": { + "Description": "(optional)", + "Type": "String" + }, + "Name": { + "Type": "String", + "Default": "Check-Point-Gateway" + }, + "Version": { + "Type": "String", + "Default": "R80.30-PAYG-NGTP", + "AllowedValues": [ + "R80.10-BYOL", + "R80.10-PAYG-NGTP", + "R80.10-PAYG-NGTX", + "R80.20-BYOL", + "R80.20-PAYG-NGTP", + "R80.20-PAYG-NGTX", + "R80.30-BYOL", + "R80.30-PAYG-NGTP", + "R80.30-PAYG-NGTX", + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX" + ] + }, + "InstanceType": { + "Description": "c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and above", + "Type": "String", + "Default": "c5.xlarge", + "AllowedValues": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.18xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "t2.xlarge", + "t2.2xlarge" + ], + "ConstraintDescription": "Must be a valid EC2 instance type" + }, + "KeyName": { + "Description": "The EC2 Key Pair to allow SSH access to the instance", + "Type": "AWS::EC2::KeyPair::KeyName", + "MinLength": "1", + "ConstraintDescription": "must be the name of an existing EC2 KeyPair." + }, + "AllocatePublicAddress": { + "Default": "true", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "EnableInstanceConnect": { + "Description": "Ec2 Instance Connect is not supported with versions prior to R80.40", + "Default": "false", + "Type": "String", + "AllowedValues": [ + "true", + "false" + ] + }, + "Shell": { + "Description": "Change the admin shell to enable advanced command line configuration", + "Type": "String", + "Default": "/etc/cli.sh", + "AllowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + }, + "PasswordHash": { + "Description": "Admin user's password hash (use command \"openssl passwd -1 PASSWORD\" to get the PASSWORD's hash) (optional)", + "NoEcho": "true", + "Type": "String", + "Default": "", + "AllowedPattern": "[\\$\\./a-zA-Z0-9]*" + }, + "Hostname": { + "Description": "(optional)", + "Type": "String", + "AllowedPattern": "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$", + "ConstraintDescription": "A valid hostname label or an empty string" + }, + "SICKey": { + "Description": "The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters", + "NoEcho": "true", + "MinLength": "8", + "Type": "String", + "AllowedPattern": "[a-zA-Z0-9]*" + }, + "VolumeSize": { + "Type": "Number", + "MinValue": "100", + "Default": "100" + }, + "VolumeEncryption": { + "Description": "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs'). Will be ignored for versions lower than R80.30", + "Type": "String", + "Default": "alias/aws/ebs" + }, + "AllowUploadDownload": { + "Description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ] + }, + "NTPPrimary": { + "Description": "(optional)", + "Type": "String", + "Default": "169.254.169.123", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "NTPSecondary": { + "Description": "(optional)", + "Type": "String", + "Default": "0.pool.ntp.org", + "AllowedPattern": "[\\.a-zA-Z0-9\\-]*" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "Description": "Determines if the Security Gateway is provisioned using its private or public address", + "Default": "private", + "Type": "String", + "AllowedValues": [ + "private", + "public" + ] + }, + "ManagementServer": { + "Description": "The name that represents the Security Management Server in the automatic provisioning configuration", + "Type": "String" + }, + "ConfigurationTemplate": { + "Description": "A name of a Security Gateway configuration template in the automatic provisioning configuration", + "Type": "String" + } + }, + "Conditions": { + "ResourcesTagNameGiven": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "ResourcesTagName" + }, + "" + ] + } + ] + }, + "AllocatePublicAddress": { + "Fn::Equals": [ + { + "Ref": "AllocatePublicAddress" + }, + "true" + ] + } + }, + "Resources": { + "InfraStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/utils/infrastructure.json", + "Parameters": { + "VpcCidr": { + "Ref": "VpcCidr" + }, + "AvailabilityZone": { + "Ref": "AvailabilityZone" + }, + "ExternalSubnetCidr": { + "Ref": "ExternalSubnetCidr" + }, + "InternalSubnetCidr": { + "Ref": "InternalSubnetCidr" + }, + "ResourcesTagName": { + "Ref": "ResourcesTagName" + } + } + } + }, + "InternalRoutingTable": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.VPC" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": { + "Fn::Join": [ + "_", + [ + { + "Fn::If": [ + "ResourcesTagNameGiven", + { + "Ref": "ResourcesTagName" + }, + { + "Ref": "AWS::StackName" + } + ] + }, + "InternalRoutingTable" + ] + ] + } + } + ] + } + }, + "InternalNetworkRouteAssociation": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "InternalRoutingTable" + }, + "SubnetId": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.InternalSubnet" + ] + } + } + }, + "ChkpProductStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://cgi-cfts.s3.amazonaws.com/deprecated/gateway/gateway-into-vpc.json", + "Parameters": { + "VPC": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.VPC" + ] + }, + "ExternalSubnet": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.ExternalSubnet" + ] + }, + "InternalSubnet": { + "Fn::GetAtt": [ + "InfraStack", + "Outputs.InternalSubnet" + ] + }, + "InternalRouteTable": { + "Ref": "InternalRoutingTable" + }, + "ResourcesTagName": { + "Ref": "ResourcesTagName" + }, + "Name": { + "Ref": "Name" + }, + "Version": { + "Ref": "Version" + }, + "InstanceType": { + "Ref": "InstanceType" + }, + "KeyName": { + "Ref": "KeyName" + }, + "AllocatePublicAddress": { + "Ref": "AllocatePublicAddress" + }, + "EnableInstanceConnect": { + "Ref": "EnableInstanceConnect" + }, + "Shell": { + "Ref": "Shell" + }, + "PasswordHash": { + "Ref": "PasswordHash" + }, + "Hostname": { + "Ref": "Hostname" + }, + "SICKey": { + "Ref": "SICKey" + }, + "VolumeSize": { + "Ref": "VolumeSize" + }, + "VolumeEncryption": { + "Ref": "VolumeEncryption" + }, + "AllowUploadDownload": { + "Ref": "AllowUploadDownload" + }, + "NTPPrimary": { + "Ref": "NTPPrimary" + }, + "NTPSecondary": { + "Ref": "NTPSecondary" + }, + "ManagementServer": { + "Ref": "ManagementServer" + }, + "ConfigurationTemplate": { + "Ref": "ConfigurationTemplate" + }, + "ControlGatewayOverPrivateOrPublicAddress": { + "Ref": "ControlGatewayOverPrivateOrPublicAddress" + } + } + } + } + }, + "Outputs": { + "CheckPointInstancePublicAddress": { + "Description": "The public address of the Check Point instance", + "Value": { + "Fn::GetAtt": [ + "ChkpProductStack", + "Outputs.PublicAddress" + ] + }, + "Condition": "AllocatePublicAddress" + }, + "CheckPointInstanceSSH": { + "Description": "SSH command to the Check Point instance", + "Value": { + "Fn::GetAtt": [ + "ChkpProductStack", + "Outputs.SSH" + ] + }, + "Condition": "AllocatePublicAddress" + }, + "CheckPointInstanceURL": { + "Description": "URL to the portal", + "Value": { + "Fn::GetAtt": [ + "ChkpProductStack", + "Outputs.URL" + ] + }, + "Condition": "AllocatePublicAddress" + }, + "ManagementName": { + "Description": "The name that represents the Security Management Server", + "Value": { + "Ref": "ManagementServer" + } + }, + "ConfigurationTemplateName": { + "Description": "The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name", + "Value": { + "Ref": "ConfigurationTemplate" + } + } + } +} diff --git a/deprecated/aws/templates/tgw-asg-r8030/README.md b/deprecated/aws/templates/tgw-asg-r8030/README.md new file mode 100644 index 00000000..bb77fa72 --- /dev/null +++ b/deprecated/aws/templates/tgw-asg-r8030/README.md @@ -0,0 +1,25 @@ +## Transit Gateway Auto Scaling Group + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys and configured the Security Gateways as an AWS Auto Scaling group configured for Transit Gateway.

For more details, refer to AWS Transit Gateway R80.10 and above Deployment Guide. +
Creates a new VPC and deploys an Auto Scaling group of Security Gateways configured for Transit Gateway into it, and an optional, preconfigured Security Management Server to manage them.
Deploys an Auto Scaling group of Security Gateways configured for Transit Gateway into an existing VPC, and an optional, preconfigured Security Management Server to manage them.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg-master.yaml b/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg-master.yaml new file mode 100755 index 00000000..edda053f --- /dev/null +++ b/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg-master.yaml @@ -0,0 +1,471 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VpcCidr + - AvailabilityZones + - NumberOfAZs + - PublicSubnetCidrA + - PublicSubnetCidrB + - PublicSubnetCidrC + - PublicSubnetCidrD + - Label: + default: General Settings + Parameters: + - KeyPairName + - EnableInstanceConnect + - AllowUploadDownload + - VolumeEncryption + - Shell + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - Name + - GatewaysInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewaysLicense + - GatewaysPasswordHash + - GatewaysSIC + - ASN + - AdminEmail + - EnableCloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementLicense + - ManagementPermissions + - PredefinedRole + - ManagementPasswordHash + - GatewaysBlades + - AdminAddressCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Automatic Provisioning with Security Management Server Settings + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + VpcCidr: + default: VPC CIDR + NumberOfAZs: + default: Number of AZs + AvailabilityZones: + default: Availability Zones + PublicSubnetCidrA: + default: Public Subnet 1 + PublicSubnetCidrB: + default: Public Subnet 2 + PublicSubnetCidrC: + default: Public Subnet 3 + PublicSubnetCidrD: + default: Public Subnet 4 + ManagementDeploy: + default: Deploy Management Server + ManagementInstanceType: + default: Instance type + ManagementLicense: + default: Version & license + ManagementPermissions: + default: IAM role + PredefinedRole: + default: Existing IAM role name + KeyPairName: + default: Key name + EnableInstanceConnect: + default: Enable AWS Instance Connect + ManagementPasswordHash: + default: Password hash + AdminAddressCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses + GatewayManagement: + default: Manage Gateways + GatewaysInstanceType: + default: Instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + AdminEmail: + default: Email address + GatewaysBlades: + default: Default Blades + GatewaysLicense: + default: Version & license + GatewaysPasswordHash: + default: Password hash + GatewaysSIC: + default: SIC key + EnableCloudWatch: + default: CloudWatch metrics + ASN: + default: BGP ASN + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + Name: + default: Name + Shell: + default: Admin shell + AllowUploadDownload: + default: Allow upload & download + VolumeEncryption: + default: Enable environment volume encryption +Parameters: + VpcCidr: + Description: CIDR block for the VPC + Type: String + AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}) + Default: 10.0.0.0/16 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + AvailabilityZones: + Description: List of Availability Zones (AZs) to use for the subnets in the VPC. Select at least two + Type: List + MinLength: 1 + NumberOfAZs: + Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter + Type: String + Default: 2 + AllowedValues: + - 2 + - 3 + - 4 + PublicSubnetCidrA: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. If you choose to deploy a Security Management Server it will be deployed in this subnet + Type: String + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + Default: 10.0.0.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PublicSubnetCidrB: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone + Type: String + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + Default: 10.0.2.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PublicSubnetCidrC: + Description: CIDR block for public subnet 3 located in the 3rd Availability Zone + Type: String + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + Default: 10.0.4.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PublicSubnetCidrD: + Description: CIDR block for public subnet 4 located in the 4th Availability Zone + Type: String + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + Default: 10.0.6.0/24 + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + ManagementDeploy: + Description: Select 'No' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + ManagementInstanceType: + Type: String + Default: m5.xlarge + AllowedValues: + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.12xlarge + - m5.24xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementLicense: + Type: String + Default: R80.30-PAYG-MGMT + AllowedValues: + - R80.20-BYOL + - R80.20-PAYG-MGMT + - R80.30-BYOL + - R80.30-PAYG-MGMT + - R80.40-BYOL + - R80.40-PAYG-MGMT + ManagementPermissions: + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + PredefinedRole: + Type: String + Default: "" + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40 + Type: String + Default: 'false' + AllowedValues: + - 'true' + - 'false' + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + AdminAddressCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server + Type: String + Default: 0.0.0.0/0 + AllowedPattern: ^(([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))?$ + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server + Type: String + Default: 10.0.0.0/16 + AllowedPattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysInstanceType: + Type: String + Default: c5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways + Default: 2 + Type: Number + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways + Default: 5 + Type: Number + MinValue: 1 + AdminEmail: + Description: Notifications about scaling events will be sent to this email address (optional) + Type: String + Default: '' + AllowedPattern: (|([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)) + ConstraintDescription: Must be a valid email address + GatewaysBlades: + Description: Turn on/off the Identity Awareness, CloudGuard Controller, Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later) + Type: String + AllowedValues: + - 'On' + - 'Off' + Default: 'On' + GatewaysLicense: + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + GatewaysPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysSIC: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: true + MinLength: 8 + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long + EnableCloudWatch: + Description: Report Check Point specific CloudWatch metrics + Type: String + AllowedValues: + - true + - false + Default: false + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address + Default: private + Type: String + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration + Type: String + Default: management-server + MinLength: '1' + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration + Type: String + Default: TGW-ASG-configuration + MinLength: '1' + Name: + Description: (optional) + Type: String + Default: Check-Point-Gateway + Shell: + Description: Change the admin shell to enable advanced command line configuration + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + VolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' +Conditions: + 3AZs: !Or + - !Equals + - !Ref NumberOfAZs + - 3 + - !Equals + - !Ref NumberOfAZs + - 4 + 4AZs: !Equals + - !Ref NumberOfAZs + - 4 + DeployManagement: !Equals + - !Ref ManagementDeploy + - 'Yes' +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + VPCCIDR: !Ref VpcCidr + AvailabilityZones: !Join + - ',' + - !Ref AvailabilityZones + NumberOfAZs: !Ref NumberOfAZs + PublicSubnet1CIDR: !Ref PublicSubnetCidrA + PublicSubnet2CIDR: !Ref PublicSubnetCidrB + PublicSubnet3CIDR: !Ref PublicSubnetCidrC + PublicSubnet4CIDR: !Ref PublicSubnetCidrD + CreatePrivateSubnets: false + MainStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/autoscale/checkpoint-tgw-asg.yaml + Parameters: + VPC: !GetAtt + - VPCStack + - Outputs.VPCID + AdminEmail: !Ref AdminEmail + KeyPairName: !Ref KeyPairName + EnableInstanceConnect: !Ref EnableInstanceConnect + ManagementDeploy: !Ref ManagementDeploy + ManagementPermissions: !Ref ManagementPermissions + PredefinedRole: !Ref PredefinedRole + Subnets: !Join + - ',' + - - !GetAtt + - VPCStack + - Outputs.PublicSubnet1ID + - !GetAtt + - VPCStack + - Outputs.PublicSubnet2ID + - !If + - 3AZs + - !GetAtt + - VPCStack + - Outputs.PublicSubnet3ID + - !Ref AWS::NoValue + - !If + - 4AZs + - !GetAtt + - VPCStack + - Outputs.PublicSubnet4ID + - !Ref AWS::NoValue + GatewaysInstanceType: !Ref GatewaysInstanceType + GatewaysMinSize: !Ref GatewaysMinSize + GatewaysMaxSize: !Ref GatewaysMaxSize + GatewaysBlades: !Ref GatewaysBlades + GatewaysLicense: !Ref GatewaysLicense + GatewaysPasswordHash: !Ref GatewaysPasswordHash + GatewaysSIC: !Ref GatewaysSIC + EnableCloudWatch: !Ref EnableCloudWatch + AllowUploadDownload: !Ref AllowUploadDownload + VolumeEncryption: !Ref VolumeEncryption + ManagementInstanceType: !Ref ManagementInstanceType + ManagementLicense: !Ref ManagementLicense + ManagementPasswordHash: !Ref ManagementPasswordHash + AdminAddressCIDR: !Ref AdminAddressCIDR + GatewaysAddresses: !Ref GatewaysAddresses + GatewayManagement: !Ref GatewayManagement + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + Shell: !Ref Shell + Name: !Ref Name + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ASN: !Ref ASN +Outputs: + ManagementName: + Description: The name that represents the Security Management Server + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name + Value: !GetAtt + - MainStack + - Outputs.ControllerName + ManagementPublicAddress: + Description: The public address of the management servers + Value: !GetAtt + - MainStack + - Outputs.ManagementPublicAddress + Condition: DeployManagement diff --git a/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg.yaml b/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg.yaml new file mode 100755 index 00000000..2083d9d8 --- /dev/null +++ b/deprecated/aws/templates/tgw-asg-r8030/checkpoint-tgw-asg.yaml @@ -0,0 +1,488 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VPC + - Subnets + - Label: + default: General Settings + Parameters: + - KeyPairName + - EnableInstanceConnect + - AllowUploadDownload + - VolumeEncryption + - Shell + - Label: + default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration + Parameters: + - Name + - GatewaysInstanceType + - GatewaysMinSize + - GatewaysMaxSize + - GatewaysLicense + - GatewaysPasswordHash + - GatewaysSIC + - ASN + - AdminEmail + - EnableCloudWatch + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementInstanceType + - ManagementLicense + - ManagementPermissions + - PredefinedRole + - ManagementPasswordHash + - GatewaysBlades + - AdminAddressCIDR + - GatewayManagement + - GatewaysAddresses + - Label: + default: Automatic Provisioning with Security Management Server Settings + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + VPC: + default: VPC + AdminEmail: + default: Email address + KeyPairName: + default: Key name + EnableInstanceConnect: + default: Enable AWS Instance Connect + ManagementDeploy: + default: Deploy Management Server + Subnets: + default: Subnets + GatewaysInstanceType: + default: Instance type + GatewaysMinSize: + default: Minimum group size + GatewaysMaxSize: + default: Maximum group size + GatewaysLicense: + default: Version & license + GatewaysPasswordHash: + default: Password hash + GatewaysSIC: + default: SIC key + EnableCloudWatch: + default: CloudWatch metrics + ASN: + default: BGP ASN + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template + Name: + default: Name + Shell: + default: Admin shell + AllowUploadDownload: + default: Allow upload & download + VolumeEncryption: + default: Enable environment volume encryption + ManagementInstanceType: + default: Instance type + ManagementLicense: + default: Version & license + ManagementPermissions: + default: IAM role + PredefinedRole: + default: Existing IAM role name + ManagementPasswordHash: + default: Password hash + AdminAddressCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses + GatewayManagement: + default: Manage Gateways + GatewaysBlades: + default: Default Blades +Parameters: + VPC: + Description: Select an existing VPC + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: You must select a VPC + Subnets: + Description: Select at least 2 external subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet + Type: List + MinLength: '1' + AdminEmail: + Description: Notifications about scaling events will be sent to this email address (optional) + Type: String + Default: '' + AllowedPattern: (|([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)) + ConstraintDescription: Must be a valid email address + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack + Type: AWS::EC2::KeyPair::KeyName + MinLength: 1 + ConstraintDescription: Must be the name of an existing EC2 KeyPair + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40 + Type: String + Default: 'false' + AllowedValues: + - 'true' + - 'false' + ManagementDeploy: + Description: Select 'No' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + GatewaysInstanceType: + Type: String + Default: c5.xlarge + AllowedValues: + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - c5n.large + - c5n.xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.18xlarge + ConstraintDescription: Must be a valid EC2 instance type + GatewaysMinSize: + Description: The minimal number of Security Gateways + Default: 2 + Type: Number + MinValue: 1 + GatewaysMaxSize: + Description: The maximal number of Security Gateways + Default: 5 + Type: Number + MinValue: 1 + GatewaysLicense: + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + - R80.40-BYOL + - R80.40-PAYG-NGTP + - R80.40-PAYG-NGTX + GatewaysPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + GatewaysSIC: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: true + MinLength: 8 + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long + EnableCloudWatch: + Description: Report Check Point specific CloudWatch metrics + Type: String + AllowedValues: + - true + - false + Default: false + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address + Default: private + Type: String + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration + Type: String + Default: management-server + MinLength: '1' + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration + Type: String + Default: TGW-ASG-configuration + MinLength: '1' + Name: + Description: (optional) + Type: String + Default: Check-Point-Gateway + Shell: + Description: Change the admin shell to enable advanced command line configuration + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + VolumeEncryption: + Description: Encrypt Environment instances volume with default AWS KMS key. Will be ignored for versions lower than R80.30 + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' + ManagementInstanceType: + Type: String + Default: m5.xlarge + AllowedValues: + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.12xlarge + - m5.24xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementLicense: + Type: String + Default: R80.30-PAYG-MGMT + AllowedValues: + - R80.20-BYOL + - R80.20-PAYG-MGMT + - R80.30-BYOL + - R80.30-PAYG-MGMT + - R80.40-BYOL + - R80.40-PAYG-MGMT + ManagementPermissions: + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + PredefinedRole: + Type: String + Default: "" + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + AdminAddressCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server + Type: String + Default: 0.0.0.0/0 + AllowedPattern: ^(([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))?$ + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server + Type: String + AllowedPattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + Default: 0.0.0.0/0 + GatewayManagement: + Description: Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address + Type: String + Default: Locally managed + AllowedValues: + - Locally managed + - Over the internet + GatewaysBlades: + Description: Turn on/off the Identity Awareness, CloudGuard Controller, Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) + Type: String + AllowedValues: + - 'On' + - 'Off' + Default: 'On' +Conditions: + GatewaysR80.30: !Equals + - !Select + - 0 + - !Split + - '-' + - !Ref GatewaysLicense + - 'R80.30' + ManagementR80.30: !Equals + - !Select + - 0 + - !Split + - '-' + - !Ref ManagementLicense + - 'R80.30' + GatewaysR80.40: !Equals + - !Select + - 0 + - !Split + - '-' + - !Ref GatewaysLicense + - 'R80.40' + ManagementR80.40: !Equals + - !Select + - 0 + - !Split + - '-' + - !Ref ManagementLicense + - 'R80.40' + EncVolEnv: !Or + - !And + - !Condition GatewaysR80.30 + - !Condition ManagementR80.30 + - !And + - !Condition GatewaysR80.40 + - !Condition ManagementR80.30 + - !And + - !Condition GatewaysR80.30 + - !Condition ManagementR80.40 + - !And + - !Condition GatewaysR80.40 + - !Condition ManagementR80.40 + EnableVolumeEncryption: !And + - !Equals + - !Ref VolumeEncryption + - 'true' + - !Condition EncVolEnv + EnableInstanceConnect: !Equals + - !Ref EnableInstanceConnect + - 'true' + EnableBlades: !Equals + - !Ref GatewaysBlades + - 'On' + DeployManagement: !Equals + - !Ref ManagementDeploy + - 'Yes' + AllowUploadDownload: !Equals + - !Ref AllowUploadDownload + - 'Yes' +Resources: + ManagementStack: + Type: AWS::CloudFormation::Stack + Condition: DeployManagement + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/management/management.json + Parameters: + VPC: !Ref VPC + Subnet: !Select + - 0 + - !Ref Subnets + Version: !Ref ManagementLicense + InstanceType: !Ref ManagementInstanceType + Name: !Ref ManagementServer + Permissions: !Ref ManagementPermissions + PredefinedRole: !Ref PredefinedRole + EnableInstanceConnect: !Ref EnableInstanceConnect + KeyName: !Ref KeyPairName + PasswordHash: !Ref ManagementPasswordHash + VolumeEncryption: !If + - EnableVolumeEncryption + - 'alias/aws/ebs' + - '' + BootstrapScript: !Sub + - | + sed -i '/template_name/c\template_name: tgw-asg' /etc/cloud-version ; + if test -d /opt/CPcme/menu/additions ; then + /opt/CPcme/menu/additions/config-community.sh tgw-community ; + else + /etc/fw/scripts/autoprovision/config-community.sh tgw-community ; + fi ; + mgmt_cli -r true add access-layer name "Inline" ; + mgmt_cli -r true add access-rule layer Network position 1 name "tgw-community VPN Traffic Rule" vpn.directional.1.from tgw-community vpn.directional.1.to tgw-community vpn.directional.2.from tgw-community vpn.directional.2.to External_clear action "Apply Layer" inline-layer "Inline" ; + mgmt_cli -r true add nat-rule package standard position bottom install-on "Policy Targets" original-source All_Internet translated-source All_Internet method hide ; + autoprov_cfg -f init AWS -mn ${ManagementServer} -tn ${ConfigurationTemplate} -cn tgw-controller -po Standard -otp ${GatewaysSIC} -r ${AWS::Region} -ver ${version} -iam -dt TGW ; + autoprov_cfg -f set controller AWS -cn tgw-controller -sg -sv -com tgw-community ; + autoprov_cfg -f set template -tn ${ConfigurationTemplate} -vpn -vd "" -con tgw-community ; + enable_blades=${GatewaysBlades} ; + if [ "$enable_blades" == "On" ] ; then + autoprov-cfg -f set template -tn ${ConfigurationTemplate} -ia -ips -appi -av -ab ; + if test -d /opt/CPsuite-R80.30 ; then + /opt/CPvsec-R80.30/bin/vsec on ; + elif test -d /opt/CPsuite-R80.20 ; then + /opt/CPvsec-R80.20/bin/vsec on ; + else + /opt/CPvsec-R80/bin/vsec on ; + fi ; + fi + - version: !Select + - 0 + - !Split + - '-' + - !Ref GatewaysLicense + AdminSubnet: !Ref AdminAddressCIDR + GatewaysAddresses: !Ref GatewaysAddresses + GatewayManagement: !Ref GatewayManagement + Shell: !Ref Shell + AllowUploadDownload: !If + - AllowUploadDownload + - 'true' + - 'false' + AllocatePublicAddress: true + Hostname: mgmt-aws + SecurityGatewaysStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/autoscale/autoscale.json + Parameters: + VPC: !Ref VPC + Subnets: !Join + - ',' + - !Ref Subnets + MinSize: !Ref GatewaysMinSize + MaxSize: !Ref GatewaysMaxSize + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + Name: !Ref Name + InstanceType: !Ref GatewaysInstanceType + AdminEmail: !Ref AdminEmail + KeyName: !Ref KeyPairName + EnableInstanceConnect: !Ref EnableInstanceConnect + PasswordHash: !Ref GatewaysPasswordHash + SICKey: !Ref GatewaysSIC + Shell: !Ref Shell + License: !Ref GatewaysLicense + AllowUploadDownload: !If + - AllowUploadDownload + - 'true' + - 'false' + VolumeEncryption: !Ref VolumeEncryption + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + EnableCloudWatch: !Ref EnableCloudWatch + BootstrapScript: !Sub + | + sed -i '/template_name/c\template_name: autoscale-tgw' /etc/cloud-version ; + clish -c "set as ${ASN}" -s ; +Outputs: + ManagementName: + Description: The name that represents the Security Management Server + Value: !Ref ManagementServer + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name + Value: !Ref ConfigurationTemplate + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name + Value: tgw-controller + ManagementPublicAddress: + Description: The public address of the management servers + Value: !GetAtt ManagementStack.Outputs.PublicAddress + Condition: DeployManagement diff --git a/deprecated/aws/templates/transit-vpc-r8030/README.md b/deprecated/aws/templates/transit-vpc-r8030/README.md new file mode 100644 index 00000000..ea177968 --- /dev/null +++ b/deprecated/aws/templates/transit-vpc-r8030/README.md @@ -0,0 +1,34 @@ + +## Security Transit VPC + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionNotesDirect Launch
+ Deploys two Security Gateways, each in a different Availability Zone, configured for Transit VPC.

For more details, refer to Transit VPC for AWS Deployment Guide . +
Creates a new VPC and deploys two Check Point Gateways for a Transit VPC hub into it, and an optional, preconfigured Security Management Server to manage them.
Deploys two Check Point Gateways for a Transit VPC hub into an existing VPC, and an optional, preconfigured Security Management Server to manage them.
Creates a new VPC and deploys two Security Gateways into it.
Deploys two Security Gateways into an existing VPC.
+
+
\ No newline at end of file diff --git a/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit-master.yaml b/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit-master.yaml new file mode 100755 index 00000000..8aca1f28 --- /dev/null +++ b/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit-master.yaml @@ -0,0 +1,354 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy Check Point Gateways for a transit VPC hub (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: General Settings + Parameters: + - VpcCidr + - AvailabilityZones + - PublicSubnetCidrA + - PublicSubnetCidrB + - PrivateSubnetCidrA + - PrivateSubnetCidrB + - KeyPairName + - Tag + - AllowUploadDownload + - Label: + default: Check Point CloudGuard IaaS Transit Security Gateways Configuration + Parameters: + - GatewaysInstanceType + - ASN + - GatewaysLicense + - GatewaysPasswordHash + - GatewaysSIC + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementAction + - ManagementInstanceType + - ManagementLicense + - EnableInstanceConnect + - ManagementPermissions + - PredefinedRole + - ManagementPasswordHash + - GatewaysBlades + - AdminAddressCIDR + - GatewaysAddresses + ParameterLabels: + VpcCidr: + default: VPC CIDR + AvailabilityZones: + default: Availability Zones + PublicSubnetCidrA: + default: Public subnet 1 + PublicSubnetCidrB: + default: Public subnet 2 + PrivateSubnetCidrA: + default: Private subnet 1 + PrivateSubnetCidrB: + default: Private subnet 2 + KeyPairName: + default: Key name + Tag: + default: Transit tag + AllowUploadDownload: + default: Allow upload & download + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewaysInstanceType: + default: Instance type + ASN: + default: BGP ASN + GatewaysLicense: + default: Version & license + GatewaysPasswordHash: + default: Password hash + GatewaysSIC: + default: SIC key + ManagementDeploy: + default: Deploy Management Server + ManagementAction: + default: Default VPN access + ManagementInstanceType: + default: Instance type + ManagementLicense: + default: Version & license + ManagementPermissions: + default: IAM role + PredefinedRole: + default: Existing IAM role name + ManagementPasswordHash: + default: Password hash + GatewaysBlades: + default: Default Blades + AdminAddressCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses +Parameters: + VpcCidr: + Description: CIDR block for the VPC + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.0.0/16' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved) + Type: List + MinLength: 1 + PublicSubnetCidrA: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone. If you choose to deploy a Security Management Server it will be deployed in this subnet + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.0.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PublicSubnetCidrB: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.2.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PrivateSubnetCidrA: + Description: CIDR block for private subnet 1 located in the 1st Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.1.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PrivateSubnetCidrB: + Description: CIDR block for private subnet 2 located in the 2nd Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.3.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack + Type: AWS::EC2::KeyPair::KeyName + MinLength: '1' + Tag: + Description: The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each environment + Type: String + Default: Transit + AllowedPattern: "^[a-zA-Z0-9-]*$" + MinLength: 1 + MaxLength: 12 + ConstraintDescription: The tag must be up to 12 alphanumeric character + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' + GatewaysInstanceType: + Description: c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and R80.30 + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c4.2xlarge + - c4.4xlarge + - c4.8xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - t2.xlarge + - t2.2xlarge + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + GatewaysLicense: + Description: The license to install on the Security Gateways + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-NGTP + - R80.10-PAYG-NGTX + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + GatewaysPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Default: '' + Type: String + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40 + Type: String + Default: 'false' + AllowedValues: + - 'true' + - 'false' + GatewaysSIC: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: 'true' + MinLength: '8' + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long + ManagementDeploy: + Description: Select 'No' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + ManagementAction: + Description: If the Spoke VPCs are trusted, select 'accept' to allow all traffic between the Spoke VPCs + Type: String + Default: 'accept' + AllowedValues: + - 'drop' + - 'accept' + ManagementInstanceType: + Description: m4 and t2 instance types are supported only with version R80.10 and m5 are supported only with R80.20 and above + Type: String + Default: m5.xlarge + AllowedValues: + - m4.large + - m4.xlarge + - m4.2xlarge + - m4.4xlarge + - m4.10xlarge + - m4.16xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.12xlarge + - m5.24xlarge + - t2.xlarge + - t2.2xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementLicense: + Type: String + Default: R80.30-PAYG-MGMT + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-MGMT + - R80.20-BYOL + - R80.20-PAYG-MGMT + - R80.30-BYOL + - R80.30-PAYG-MGMT + - R80.40-BYOL + - R80.40-PAYG-MGMT + ManagementPermissions: + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + PredefinedRole: + Type: String + Default: "" + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: "[\\$\\./a-zA-Z0-9]*" + NoEcho: true + GatewaysBlades: + Description: Turn on/off the Intrusion Prevention System, URL filtering, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later) + Type: String + AllowedValues: + - 'On' + - 'Off' + Default: 'On' + AdminAddressCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server + Type: String + AllowedPattern: "^(([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))?$" + Default: 0.0.0.0/0 + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server + Type: String + Default: 10.0.0.0/16 +Conditions: + DeployManagement: !Equals [!Ref ManagementDeploy, 'Yes'] +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + VPCCIDR: !Ref VpcCidr + AvailabilityZones: !Join + - ',' + - !Ref AvailabilityZones + NumberOfAZs: 2 + PublicSubnet1CIDR: !Ref PublicSubnetCidrA + PublicSubnet2CIDR: !Ref PublicSubnetCidrB + PrivateSubnet1CIDR: !Ref PrivateSubnetCidrA + PrivateSubnet2CIDR: !Ref PrivateSubnetCidrB + TransitStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/checkpoint-transit.yaml + Parameters: + ManagementDeploy: !Ref ManagementDeploy + ManagementPermissions: !Ref ManagementPermissions + PredefinedRole: !Ref PredefinedRole + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + GatewaysInstanceType: !Ref GatewaysInstanceType + KeyPairName: !Ref KeyPairName + EnableInstanceConnect: !Ref EnableInstanceConnect + ASN: !Ref ASN + GatewaysLicense: !Ref GatewaysLicense + GatewaysSIC: !Ref GatewaysSIC + Tag: !Ref Tag + GatewaysPasswordHash: !Ref GatewaysPasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + GatewaysAddresses: !Ref GatewaysAddresses + ManagementInstanceType: !Ref ManagementInstanceType + ManagementLicense: !Ref ManagementLicense + ManagementPasswordHash: !Ref ManagementPasswordHash + GatewaysBlades: !Ref GatewaysBlades + AdminAddressCIDR: !Ref AdminAddressCIDR + ManagementAction: !Ref ManagementAction +Outputs: + PublicAddressA: + Description: The public address of the 1st gateway + Value: !GetAtt TransitStack.Outputs.PublicAddressA + PublicAddressB: + Description: The public address of the 2nd gateway + Value: !GetAtt TransitStack.Outputs.PublicAddressB + ManagementPublicAddress: + Description: The public address of the management servers + Value: !GetAtt TransitStack.Outputs.ManagementPublicAddress + Condition: DeployManagement + SpokeTag: + Description: The tag to put on the spoke VPC + Value: !Sub 'Key: x-chkp-vpn | value: ${Tag}-management/${Tag}-community' + ManagementName: + Description: The name that represents the Security Management Server + Value: !Sub ${Tag}-management + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name + Value: !Sub ${Tag}-template + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name + Value: !Sub ${Tag}-controller + CommunityName: + Description: The name of the VPN community created in the Security Management Server + Value: !Sub ${Tag}-community diff --git a/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit.yaml b/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit.yaml new file mode 100755 index 00000000..2a481149 --- /dev/null +++ b/deprecated/aws/templates/transit-vpc-r8030/checkpoint-transit.yaml @@ -0,0 +1,361 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy Check Point Gateways for a transit VPC hub (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: General Settings + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - KeyPairName + - Tag + - AllowUploadDownload + - Label: + default: Check Point CloudGuard IaaS Transit Security Gateways Configuration + Parameters: + - GatewaysInstanceType + - ASN + - GatewaysLicense + - GatewaysPasswordHash + - GatewaysSIC + - Label: + default: Check Point CloudGuard IaaS Security Management Server Configuration + Parameters: + - ManagementDeploy + - ManagementAction + - ManagementInstanceType + - ManagementLicense + - EnableInstanceConnect + - ManagementPermissions + - PredefinedRole + - ManagementPasswordHash + - GatewaysBlades + - AdminAddressCIDR + - GatewaysAddresses + ParameterLabels: + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + KeyPairName: + default: Key name + Tag: + default: Transit tag + AllowUploadDownload: + default: Allow upload & download + EnableInstanceConnect: + default: Enable AWS Instance Connect + GatewaysInstanceType: + default: Instance type + ASN: + default: BGP ASN + GatewaysLicense: + default: Version & license + GatewaysPasswordHash: + default: Password hash + GatewaysSIC: + default: SIC key + ManagementDeploy: + default: Deploy Management Server + ManagementAction: + default: Default VPN access + ManagementInstanceType: + default: Instance type + ManagementLicense: + default: Version & license + ManagementPermissions: + default: IAM role + PredefinedRole: + default: Existing IAM role name + ManagementPasswordHash: + default: Password hash + GatewaysBlades: + default: Default Blades + AdminAddressCIDR: + default: Administrator addresses + GatewaysAddresses: + default: Gateways addresses +Parameters: + VPC: + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: you must select a VPC. + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway. If you choose to deploy a Security Management Server it will be deployed in this subnet + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the instances created by this stack + Type: AWS::EC2::KeyPair::KeyName + MinLength: '1' + Tag: + Description: The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each environment + Type: String + Default: Transit + AllowedPattern: "^[a-zA-Z0-9-]*$" + MinLength: 1 + MaxLength: 12 + ConstraintDescription: The tag must be up to 12 alphanumeric character + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' + GatewaysInstanceType: + Description: c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and R80.30 + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c4.2xlarge + - c4.4xlarge + - c4.8xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - t2.xlarge + - t2.2xlarge + ConstraintDescription: must be a valid EC2 instance type. + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + GatewaysLicense: + Description: The license to install on the Security Gateways + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-NGTP + - R80.10-PAYG-NGTX + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + GatewaysPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Default: '' + Type: String + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + EnableInstanceConnect: + Description: Ec2 Instance Connect is not supported with versions prior to R80.40 + Type: String + Default: 'false' + AllowedValues: + - 'true' + - 'false' + GatewaysSIC: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: 'true' + MinLength: '8' + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: Secure Internal Communication activation key should contain only alpha numeric characters and be at least 8 characters long + ManagementDeploy: + Description: Select 'No' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section + Type: String + Default: 'Yes' + AllowedValues: + - 'Yes' + - 'No' + ManagementAction: + Description: If the Spoke VPCs are trusted, select 'accept' to allow all traffic between the Spoke VPCs + Type: String + Default: 'accept' + AllowedValues: + - 'drop' + - 'accept' + ManagementInstanceType: + Description: m4 and t2 instance types are supported only with version R80.10 and m5 are supported only with R80.20 and above + Type: String + Default: m5.xlarge + AllowedValues: + - m4.large + - m4.xlarge + - m4.2xlarge + - m4.4xlarge + - m4.10xlarge + - m4.16xlarge + - m5.large + - m5.xlarge + - m5.2xlarge + - m5.4xlarge + - m5.12xlarge + - m5.24xlarge + - t2.xlarge + - t2.2xlarge + ConstraintDescription: Must be a valid EC2 instance type + ManagementLicense: + Type: String + Default: R80.30-PAYG-MGMT + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-MGMT + - R80.20-BYOL + - R80.20-PAYG-MGMT + - R80.30-BYOL + - R80.30-PAYG-MGMT + - R80.40-BYOL + - R80.40-PAYG-MGMT + ManagementPermissions: + Type: String + Default: Create with read permissions + AllowedValues: + - None (configure later) + - Use existing (specify an existing IAM role name) + - Create with assume role permissions (specify an STS role ARN) + - Create with read permissions + - Create with read-write permissions + PredefinedRole: + Type: String + Default: "" + Description: A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' + ManagementPasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Type: String + Default: '' + AllowedPattern: "[\\$\\./a-zA-Z0-9]*" + NoEcho: true + GatewaysBlades: + Description: Turn on/off the Intrusion Prevention System, URL filtering, Application Control, Anti-Virus and Anti-Bot Blades (these and additional Blades can be manually turned on or off later) + Type: String + AllowedValues: + - 'On' + - 'Off' + Default: 'On' + AdminAddressCIDR: + Description: Allow web, SSH, and graphical clients only from this network to communicate with the Security Management Server + Type: String + AllowedPattern: "^(([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))?$" + Default: 0.0.0.0/0 + GatewaysAddresses: + Description: Allow gateways only from this network to communicate with the Security Management Server + Type: String + Default: 10.0.0.0/16 +Conditions: + DeployManagement: !Equals [!Ref ManagementDeploy, 'Yes'] + EnableBlades: !Equals [!Ref GatewaysBlades, 'On'] + UseCME: !Or [!Equals [!Select [0, !Split [-, !Ref ManagementLicense]], R80.30], !Equals [!Select [0, !Split [-, !Ref ManagementLicense]], R80.40]] +Resources: + Transit: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/transit.yaml + Parameters: + GatewayName: !Sub ${Tag}-transit-gateway + InstanceType: !Ref GatewaysInstanceType + KeyPairName: !Ref KeyPairName + VPC: !Ref VPC + PublicSubnetA: !Ref PublicSubnetA + PrivateSubnetA: !Ref PrivateSubnetA + PublicSubnetB: !Ref PublicSubnetB + PrivateSubnetB: !Ref PrivateSubnetB + License: !Ref GatewaysLicense + ASN: !Ref ASN + ControlGatewayOverPrivateOrPublicAddress: private + ManagementServer: !Sub ${Tag}-management + ConfigurationTemplate: !Sub ${Tag}-template + PasswordHash: !Ref GatewaysPasswordHash + SICKey: !Ref GatewaysSIC + AllowUploadDownload: !Ref AllowUploadDownload + ManagementStack: + Type: AWS::CloudFormation::Stack + Condition: DeployManagement + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/management/management.json + Parameters: + VPC: !Ref VPC + Subnet: !Ref PublicSubnetA + Version: !Ref ManagementLicense + InstanceType: !Ref ManagementInstanceType + Name: !Sub ${Tag}-Management + Permissions: !Ref ManagementPermissions + PredefinedRole: !Ref PredefinedRole + Hostname: !Sub ${Tag}-Management + KeyName: !Ref KeyPairName + PasswordHash: !Ref ManagementPasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + EnableInstanceConnect: !Ref EnableInstanceConnect + BootstrapScript: !Join + - ',' + - - "sed -i '/template_name/c\template_name: transit-management' /etc/cloud-version" + - !If + - UseCME + - !Sub '/opt/CPcme/menu/additions/config-community.sh ${Tag}-community' + - !Sub '/etc/fw/scripts/autoprovision/config-community.sh ${Tag}-community' + - !Sub 'mgmt_cli -r true add access-rule layer "Network" position 1 name "${Tag}-community VPN Traffic Rule" vpn.directional.1.from ${Tag}-community vpn.directional.1.to ${Tag}-community vpn.directional.2.from ${Tag}-community vpn.directional.2.to Internal_clear vpn.directional.3.from Internal_clear vpn.directional.3.to ${Tag}-community action ${ManagementAction}' + - !Sub + - 'autoprov_cfg -f init AWS -mn ${Tag}-management -tn ${Tag}-template -cn ${Tag}-controller -po Standard -otp ${GatewaysSIC} -r ${AWS::Region} -ver ${version} -iam' + - version: !Select + - 0 + - !Split + - '-' + - !Ref GatewaysLicense + - !Sub 'autoprov_cfg -f set controller AWS -cn ${Tag}-controller -sg -sv -com ${Tag}-community' + - !Sub 'autoprov_cfg -f set template -tn ${Tag}-template -vpn -vd "" -con ${Tag}-community' + - !If + - EnableBlades + - !Sub autoprov-cfg -f set template -tn ${Tag}-template -ips -appi -av -ab + - !Ref AWS::NoValue + AdminSubnet: !Ref AdminAddressCIDR + GatewaysAddresses: !Ref GatewaysAddresses +Outputs: + PublicAddressA: + Description: The public address of the 1st gateway + Value: !GetAtt Transit.Outputs.PublicAddressA + PublicAddressB: + Description: The public address of the 2nd gateway + Value: !GetAtt Transit.Outputs.PublicAddressB + ManagementPublicAddress: + Description: The public address of the management servers + Value: !GetAtt ManagementStack.Outputs.PublicAddress + Condition: DeployManagement + SpokeTag: + Description: The tag to put on the spoke VPC + Value: !Sub 'Key: x-chkp-vpn | value: ${Tag}-management/${Tag}-community' + ManagementName: + Description: The name that represents the Security Management Server + Value: !Sub ${Tag}-management + ConfigurationTemplateName: + Description: The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name + Value: !Sub ${Tag}-template + ControllerName: + Description: The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name + Value: !Sub ${Tag}-controller + CommunityName: + Description: The name of the VPN community created in the Security Management Server + Value: !Sub ${Tag}-community diff --git a/deprecated/aws/templates/transit-vpc-r8030/transit-master.yaml b/deprecated/aws/templates/transit-vpc-r8030/transit-master.yaml new file mode 100755 index 00000000..fa243895 --- /dev/null +++ b/deprecated/aws/templates/transit-vpc-r8030/transit-master.yaml @@ -0,0 +1,241 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy Check Point Gateways for a transit VPC hub (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VpcCidr + - AvailabilityZones + - PublicSubnetCidrA + - PublicSubnetCidrB + - PrivateSubnetCidrA + - PrivateSubnetCidrB + - Label: + default: EC2 Instances Configuration + Parameters: + - GatewayName + - InstanceType + - KeyPairName + - Label: + default: Check Point Settings + Parameters: + - ASN + - License + - SICKey + - Shell + - PasswordHash + - AllowUploadDownload + - Label: + default: Automatic Provisioning with Security Management Server Settings (optional) + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + AvailabilityZones: + default: Availability Zones + VpcCidr: + default: VPC CIDR + PublicSubnetCidrA: + default: Public subnet 1 CIDR + PublicSubnetCidrB: + default: Public subnet 2 CIDR + PrivateSubnetCidrA: + default: Private subnet 1 CIDR + PrivateSubnetCidrB: + default: Private subnet 2 CIDR + ASN: + default: BGP ASN + GatewayName: + default: Gateway Name + InstanceType: + default: Instance type + KeyPairName: + default: Key name + License: + default: Version & license + SICKey: + default: SIC key + Shell: + default: Admin shell + PasswordHash: + default: Password hash + AllowUploadDownload: + default: Allow upload & download + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + VpcCidr: + Description: CIDR block for the VPC + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.0.0/16' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + AvailabilityZones: + Description: The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved) + Type: List + MinLength: 1 + PublicSubnetCidrA: + Description: CIDR block for public subnet 1 located in the 1st Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.0.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PublicSubnetCidrB: + Description: CIDR block for public subnet 2 located in the 2nd Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.2.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PrivateSubnetCidrA: + Description: CIDR block for private subnet 1 located in the 1st Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.1.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + PrivateSubnetCidrB: + Description: CIDR block for private subnet 2 located in the 2nd Availability Zone + Type: String + AllowedPattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + Default: '10.0.3.0/24' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 + GatewayName: + Description: The value for the name tag of the gateway instance + Type: String + Default: transit-gateway + InstanceType: + Description: c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and R80.30 + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c4.2xlarge + - c4.4xlarge + - c4.8xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - t2.xlarge + - t2.2xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways + Type: AWS::EC2::KeyPair::KeyName + MinLength: '1' + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + License: + Description: The license to install on the Security Gateways + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-NGTP + - R80.10-PAYG-NGTX + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + SICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: 'true' + MinLength: '8' + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: At least 8 alpha numeric characters + Shell: + Description: Change the admin shell to enable advanced command line configuration + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + PasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Default: '' + Type: String + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address + Default: public + Type: String + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration + Type: String + Default: '' + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration + Type: String + Default: '' +Resources: + VPCStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + Parameters: + VPCCIDR: !Ref VpcCidr + AvailabilityZones: !Join + - ',' + - !Ref AvailabilityZones + NumberOfAZs: 2 + PublicSubnet1CIDR: !Ref PublicSubnetCidrA + PublicSubnet2CIDR: !Ref PublicSubnetCidrB + PrivateSubnet1CIDR: !Ref PrivateSubnetCidrA + PrivateSubnet2CIDR: !Ref PrivateSubnetCidrB + TransitStack: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/transit.yaml + Parameters: + VPC: !GetAtt VPCStack.Outputs.VPCID + PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID + PublicSubnetB: !GetAtt VPCStack.Outputs.PublicSubnet2ID + PrivateSubnetA: !GetAtt VPCStack.Outputs.PrivateSubnet1ID + PrivateSubnetB: !GetAtt VPCStack.Outputs.PrivateSubnet2ID + GatewayName: !Ref GatewayName + InstanceType: !Ref InstanceType + KeyPairName: !Ref KeyPairName + ASN: !Ref ASN + License: !Ref License + SICKey: !Ref SICKey + Shell: !Ref Shell + PasswordHash: !Ref PasswordHash + AllowUploadDownload: !Ref AllowUploadDownload + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate +Outputs: + PublicAddressA: + Description: The public address of the 1st gateway + Value: !GetAtt TransitStack.Outputs.PublicAddressA + PublicAddressB: + Description: The public address of the 2nd gateway + Value: !GetAtt TransitStack.Outputs.PublicAddressB diff --git a/deprecated/aws/templates/transit-vpc-r8030/transit.yaml b/deprecated/aws/templates/transit-vpc-r8030/transit.yaml new file mode 100755 index 00000000..ef775adf --- /dev/null +++ b/deprecated/aws/templates/transit-vpc-r8030/transit.yaml @@ -0,0 +1,230 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Deploy Check Point Gateways for a transit VPC hub (20211212) +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: Network Configuration + Parameters: + - VPC + - PublicSubnetA + - PublicSubnetB + - PrivateSubnetA + - PrivateSubnetB + - Label: + default: EC2 Instances Configuration + Parameters: + - GatewayName + - InstanceType + - KeyPairName + - Label: + default: Check Point Settings + Parameters: + - ASN + - License + - SICKey + - Shell + - PasswordHash + - AllowUploadDownload + - Label: + default: Automatic Provisioning with Security Management Server Settings (optional) + Parameters: + - ControlGatewayOverPrivateOrPublicAddress + - ManagementServer + - ConfigurationTemplate + ParameterLabels: + PublicSubnetA: + default: Public subnet 1 + PublicSubnetB: + default: Public subnet 2 + PrivateSubnetA: + default: Private subnet 1 + PrivateSubnetB: + default: Private subnet 2 + ASN: + default: BGP ASN + GatewayName: + default: Gateway Name + InstanceType: + default: Instance type + KeyPairName: + default: Key name + License: + default: Version & license + SICKey: + default: SIC key + Shell: + default: Admin shell + PasswordHash: + default: Password hash + AllowUploadDownload: + default: Allow upload & download + ControlGatewayOverPrivateOrPublicAddress: + default: Gateways addresses + ManagementServer: + default: Management Server + ConfigurationTemplate: + default: Configuration template +Parameters: + VPC: + Type: AWS::EC2::VPC::Id + MinLength: 1 + ConstraintDescription: you must select a VPC. + PublicSubnetA: + Description: Select a public subnet for the first Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the first Security Gateway + PublicSubnetB: + Description: Select a public subnet for the second Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a public subnet for the second Security Gateway + PrivateSubnetA: + Description: Select a private subnet for the first Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the first Security Gateway + PrivateSubnetB: + Description: Select a private subnet for the second Security Gateway + Type: AWS::EC2::Subnet::Id + MinLength: 1 + ConstraintDescription: you must select a private subnet for the second Security Gateway + GatewayName: + Description: The value for the name tag of the gateway instance + Type: String + Default: transit-gateway + InstanceType: + Description: c4 and t2 instance types are supported only with version R80.10 and c5 are supported only with R80.20 and R80.30 + Type: String + Default: c5.xlarge + AllowedValues: + - c4.large + - c4.xlarge + - c4.2xlarge + - c4.4xlarge + - c4.8xlarge + - c5.large + - c5.xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.18xlarge + - t2.xlarge + - t2.2xlarge + ConstraintDescription: must be a valid EC2 instance type. + KeyPairName: + Description: The EC2 Key Pair to allow SSH access to the Security Gateways + Type: AWS::EC2::KeyPair::KeyName + MinLength: '1' + ASN: + Description: The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways + Type: String + AllowedPattern: '[0-9]*' + Default: 65000 + License: + Description: The license to install on the Security Gateways + Type: String + Default: R80.30-PAYG-NGTP + AllowedValues: + - R80.10-BYOL + - R80.10-PAYG-NGTP + - R80.10-PAYG-NGTX + - R80.20-BYOL + - R80.20-PAYG-NGTP + - R80.20-PAYG-NGTX + - R80.30-BYOL + - R80.30-PAYG-NGTP + - R80.30-PAYG-NGTX + SICKey: + Description: The Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters + NoEcho: 'true' + MinLength: '8' + Type: String + AllowedPattern: '[a-zA-Z0-9]*' + ConstraintDescription: At least 8 alpha numeric characters + Shell: + Description: Change the admin shell to enable advanced command line configuration + Type: String + Default: /etc/cli.sh + AllowedValues: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + PasswordHash: + Description: Admin user's password hash (use command "openssl passwd -1 PASSWORD" to get the PASSWORD's hash) (optional) + Default: '' + Type: String + AllowedPattern: '[\$\./a-zA-Z0-9]*' + NoEcho: true + AllowUploadDownload: + Description: Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point + Type: String + Default: 'true' + AllowedValues: + - 'true' + - 'false' + ControlGatewayOverPrivateOrPublicAddress: + Description: Determines if the gateways are provisioned using their private or public address + Default: public + Type: String + AllowedValues: + - private + - public + ManagementServer: + Description: The name that represents the Security Management Server in the automatic provisioning configuration + Type: String + Default: '' + ConfigurationTemplate: + Description: A name of a gateway configuration template in the automatic provisioning configuration + Type: String + Default: '' +Resources: + GatewayA: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/transit-gateway.yaml + Parameters: + GatewayName: !Ref GatewayName + InstanceType: !Ref InstanceType + KeyPairName: !Ref KeyPairName + VPC: !Ref VPC + PublicSubnetId: !Ref PublicSubnetA + PrivateSubnetId: !Ref PrivateSubnetA + License: !Ref License + ASN: !Ref ASN + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + PasswordHash: !Ref PasswordHash + Shell: !Ref Shell + SICKey: !Ref SICKey + AllowUploadDownload: !Ref AllowUploadDownload + GatewayB: + Type: AWS::CloudFormation::Stack + Properties: + TemplateURL: https://cgi-cfts.s3.amazonaws.com/deprecated/cluster/transit-gateway.yaml + Parameters: + GatewayName: !Ref GatewayName + InstanceType: !Ref InstanceType + KeyPairName: !Ref KeyPairName + VPC: !Ref VPC + PublicSubnetId: !Ref PublicSubnetB + PrivateSubnetId: !Ref PrivateSubnetB + License: !Ref License + ASN: !Ref ASN + ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress + ManagementServer: !Ref ManagementServer + ConfigurationTemplate: !Ref ConfigurationTemplate + PasswordHash: !Ref PasswordHash + Shell: !Ref Shell + SICKey: !Ref SICKey + AllowUploadDownload: !Ref AllowUploadDownload +Outputs: + PublicAddressA: + Description: The public address of the 1st gateway + Value: !GetAtt GatewayA.Outputs.PublicAddress + PublicAddressB: + Description: The public address of the 2nd gateway + Value: !GetAtt GatewayB.Outputs.PublicAddress diff --git a/deprecated/azure/misc/azure_ha_test_python2.py b/deprecated/azure/misc/azure_ha_test_python2.py new file mode 100644 index 00000000..86d9bef5 --- /dev/null +++ b/deprecated/azure/misc/azure_ha_test_python2.py @@ -0,0 +1,414 @@ +#!/usr/bin/env python +import contextlib +import json +import os +import re +import socket +import subprocess +import sys +import traceback +import urlparse +import collections +import rest + +ARM_VERSIONS = { + 'stack': collections.OrderedDict([ + ('resources', '?api-version=2017-10-01'), + ]), + 'ha': collections.OrderedDict([ + ('resources', '?api-version=2018-01-01'), + ])} + +os.environ['AZURE_NO_DOT'] = 'true' + +azure = None +templateName = None + +conf = {} + + +def set_arm_versions(): + global ARM_VERSIONS + log('Setting api versions for "%s" solution\n' % templateName) + if templateName == 'stack-ha': + ARM_VERSIONS = ARM_VERSIONS['stack'] + log('Stack ARM versions are: %s\n' % json.dumps(ARM_VERSIONS, + indent=2)) + return + ARM_VERSIONS = ARM_VERSIONS['ha'] + log('ARM versions are: %s\n' % json.dumps(ARM_VERSIONS, indent=2)) + + +def is_azure(): + return os.path.isfile('/etc/in-azure') + + +def log(msg): + sys.stderr.write(msg) + + +def test_rw(rid, allow_not_found=False): + components = rid.split('/') + log('Id : %s\n' % rid) + log('Subscription : %s\n' % components[2]) + log('Resource group: %s\n' % components[4]) + log('Type : %s/%s\n' % (components[6], components[7])) + log('Name : %s\n' % components[8]) + try: + obj = azure.arm('GET', rid + ARM_VERSIONS['resources'])[1] + except rest.RequestException as e: + if allow_not_found and e.code == 404: + return None + log('Attempting to read - [%s]\n' % e.reason) + raise + log('Attempting to read - [OK]\n') + + log('Attempting to write ') + try: + azure.arm('PUT', rid, json.dumps(obj)) + except rest.RequestException as e: + log('- [%s]\n' % e.reason) + raise + log('- [OK]\n') + return obj + + +def get_vm_primary_nic(vm): + nis = vm['properties']['networkProfile']['networkInterfaces'] + if len(nis) == 1: + ni = nis[0] + else: + for ni in nis: + if ni['properties'].get('primary'): + break + return azure.arm('GET', ni['id'])[1] + + +def test_cluster_ip(): + cluster_ip_id = (conf['baseId'] + + 'Microsoft.Network/publicIPAddresses/' + + conf['clusterName']) + + test_rw(cluster_ip_id, allow_not_found=True) + + +def test_load_balancer(): + load_balancer_nm = conf.get('lbName', '') + if not load_balancer_nm: + log('An external load balancer name is not configured.\n') + return None + + load_balancer_id = (conf['baseId'] + + 'Microsoft.Network/loadBalancers/' + + load_balancer_nm) + test_rw(load_balancer_id, allow_not_found=True) + + +def vnet_rg(): + local_vm = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + + conf['hostname'])[1] + my_nic = get_vm_primary_nic(local_vm) + subnet_id = my_nic['properties']['ipConfigurations'][0][ + 'properties']['subnet']['id'] + return '/'.join(subnet_id.split('/')[:5]) + + +def get_route_table_ids_for_vnet(vnet): + route_table_ids = set() + for subnet in vnet['properties'].get('subnets', []): + if subnet['properties'].get('routeTable'): + route_table_ids.add(subnet['properties']['routeTable']['id']) + return route_table_ids + + +def get_vnet_id(): + vnet_id = conf.get('vnetId') + if vnet_id: + return vnet_id + me = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + conf['hostname'])[1] + my_nic = get_vm_primary_nic(me) + subnet_id = my_nic['properties']['ipConfigurations'][0][ + 'properties']['subnet']['id'] + vnet_id = '/'.join(subnet_id.split('/')[:-2]) + conf['vnetId'] = vnet_id + return vnet_id + + +def get_route_table_ids_for_peering(vnet): + route_table_ids = set() + + for peering in vnet['properties'].get('virtualNetworkPeerings', []): + vnet_id = peering['properties']['remoteVirtualNetwork']['id'] + state = peering['properties']['peeringState'] + if state != 'Connected': + log('peered vnet %s in state %s ignored' % (vnet_id, state)) + continue + try: + vnet = azure.arm('GET', vnet_id)[1] + except: + log('\nFailed to retrieve peered network %s' % vnet_id) + log('\n%s' % traceback.format_exc()) + continue + route_table_ids |= get_route_table_ids_for_vnet(vnet) + + return route_table_ids + + +def get_route_table_ids(): + route_table_ids = set() + + vnet_id = get_vnet_id() + vnet = azure.arm('GET', vnet_id)[1] + + route_table_ids |= get_route_table_ids_for_vnet(vnet) + route_table_ids |= get_route_table_ids_for_peering(vnet) + + return route_table_ids + + +def interfaces_test_rw(interface_id): + interface = test_rw(interface_id['id']) + if not interface['properties'].get('enableIPForwarding'): + raise Exception( + 'IP forwarding is not enabled on Interface %s' % + interface['name']) + + +def test_cluster_parameters(): + path = "/var/opt/fw.boot/modules/fwkern.conf" + text1 = "fwha_dead_timeout_multiplier=200" + text2 = "fwha_if_problem_tolerance=200" + flags = dict.fromkeys(["fwkern_timeout_multiplier", + "fwkern_problem_tolerance", + "output_timeout_multiplier", + "output_problem_tolerance"], + False) + error = 'ClusterXL kernel parameters are not optimized for Azure. ' \ + 'See sk122218 for more information.' + + with open(path) as f: + for line in f: + if text1 in line: + flags['fwkern_timeout_multiplier'] = True + if text2 in line: + flags['fwkern_problem_tolerance'] = True + + command = ['fw', 'ctl', 'get', 'int', 'fwha_dead_timeout_multiplier'] + proc = subprocess.Popen( + command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + + if out.strip() == 'fwha_dead_timeout_multiplier = 200': + flags['output_timeout_multiplier'] = True + + command = ['fw', 'ctl', 'get', 'int', 'fwha_if_problem_tolerance'] + proc = subprocess.Popen( + command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + + if out.strip() == 'fwha_if_problem_tolerance = 200': + flags['output_problem_tolerance'] = True + + if not all(value is True for value in flags.values()): + raise Exception(error) + + +def test(): + global conf + + if not is_azure(): + raise Exception('This does not look like an Azure environment\n') + + with open('/etc/in-azure', 'r') as content_file: + content = content_file.read() + + image_version = content.split('.')[:2][0] + log('Image version is: %s\n' % image_version) + + take_number = int(image_version.split('-')[1]) + branch = image_version.split('-')[0] + + if branch == "gey_hvm": + raise Exception('The version of this GAIA is not supported\n') + + log('Reading configuration file...\n') + if take_number <= 13 and branch == "ogu": + confpath = os.environ['FWDIR'] + '/conf/azure-ha.json' + try: + with open(confpath) as f: + conf = json.load(f) + except: + raise Exception( + 'Failed to read configuration file: %s\n' % confpath) + + else: + command = [os.environ['FWDIR'] + '/bin/azure-ha-conf', '--dump'] + proc = subprocess.Popen( + command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + rc = proc.wait() + if rc: + log('\nfailed to run %s: %s\n%s' % (command, rc, err)) + raise Exception('Failed to load configuration file\n') + conf = json.loads(out) + + for k in ['clusterName', 'resourceGroup', 'subscriptionId']: + if not conf.get(k): + raise Exception( + 'The attribute %s is missing in the configuration' % k) + + proxy = conf.get('proxy', '') + os.environ['https_proxy'] = proxy + os.environ['http_proxy'] = proxy + + credentials = conf.get('credentials') + if credentials: + pass + elif conf.get('password') and conf.get('userName'): + credentials = { + 'username': conf['userName'], + 'password': conf['password']} + else: + raise Exception('Missing credentials') + + environment = conf.get('environment') + + global azure, templateName + azure = rest.Azure(credentials=credentials, + subscription=conf['subscriptionId'], + max_time=20, + environment=environment) + + templateName = conf.get('templateName', '').lower() + set_arm_versions() + + conf['hostname'] = conf.get('hostname', socket.gethostname()) + cluster_name = conf['clusterName'].lower() + if conf['hostname'] not in {cluster_name + '1', cluster_name + '2'}: + raise Exception('The hostname %s should be either \'%s\' or \'%s\'' % ( + conf['hostname'], cluster_name + '1', cluster_name + '2')) + + if 'peername' not in conf: + if conf['hostname'].endswith('1'): + conf['peername'] = conf['hostname'][:-1] + '2' + else: + conf['peername'] = conf['hostname'][:-1] + '1' + + conf['rg_id'] = ('/subscriptions/' + conf['subscriptionId'] + + '/resourcegroups/' + conf['resourceGroup']) + + conf['baseId'] = conf['rg_id'] + '/providers/' + + log('Testing if DNS is configured...\n') + try: + dns = subprocess.check_output( + ['/bin/clish', '-c', 'show dns primary']).strip() + except: + traceback.print_exc() + raise + match = re.search(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', dns) + if not match: + raise Exception('Primary DNS server is not configured\n') + log(' - Primary DNS server is: %s\n' % match.group(1)) + + log('Testing if DNS is working...\n') + if proxy: + host = urlparse.urlparse(proxy).hostname + if host is None: + raise Exception('Failed to get hostname from proxy: %s\n' % proxy) + + port = urlparse.urlparse(proxy).port + if not port: + if urlparse.urlparse(proxy).scheme == 'https': + port = 443 + else: + port = 80 + else: + host = azure.environment.login + port = 443 + try: + socket.gethostbyname(host) + log(' - DNS resolving test was successful\n') + except: + raise Exception('Failed to resolve %s\n' % host) + + log('Testing connectivity to %s:%d...\n' % (host, port)) + with contextlib.closing( + socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: + s.settimeout(3) + if s.connect_ex((host, port)): + raise Exception('Unable to connect to %s:%d\n' % (host, port)) + + log('Testing ClusterXL parameters...\n') + test_cluster_parameters() + + log('Testing cluster interface configuration...\n') + try: + cphaconf = json.loads( + subprocess.check_output(['cphaconf', 'aws_mode'])) + except: + raise Exception('''You do not seem to have a valid cluster +configuration +''') + + log('Testing credentials...\n') + with azure.get_token() as token: + token # Do nothing and keep pyflakes happy + + if 'username' in credentials: + log('Testing whether the user credentials can expire...\n') + password_policies = azure.graph('GET', '/me')[1]['passwordPolicies'] + if 'DisablePasswordExpiration' not in password_policies: + raise Exception('The credentials might expire') + + log('Getting information about the environment...\n') + for vmname in [conf['hostname'], conf['peername']]: + log('Getting information about the VM %s...\n' % vmname) + vm = azure.arm('GET', conf['baseId'] + + 'microsoft.compute/virtualmachines/' + vmname)[1] + if templateName != 'stack-ha': + for interface_id in vm['properties'][ + 'networkProfile']['networkInterfaces']: + if templateName == 'ha': + rid = interface_id['id'] + interface_name = rid.split('/')[8] + if interface_name.find('eth0') != -1: + interfaces_test_rw(interface_id) + else: + interfaces_test_rw(interface_id) + + if templateName != 'ha': + log('Testing authorization on routing tables...\n') + for route_table in get_route_table_ids(): + test_rw(route_table) + if templateName != 'stack-ha': + log('Testing Azure load balancer...\n') + test_load_balancer() + + if templateName != 'stack-ha': + log('Testing cluster public IP address...\n') + test_cluster_ip() + + log('Verifying Azure interface configuration...\n') + for interface in cphaconf['ifs']: + log('- Interface %s: local IP address = %s, peer IP address = %s\n' % ( + interface['name'], interface['ipaddr'], + interface['other_member_if_ip'])) + + log('\nAll tests were successful!\n') + + +def main(): + try: + test() + except: + log('Error:\n' + str(sys.exc_info()[1]) + '\n') + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/deprecated/azure/templates/R7730/cluster-r7730/README.MD b/deprecated/azure/templates/R7730/cluster-r7730/README.MD new file mode 100644 index 00000000..645bfdc2 --- /dev/null +++ b/deprecated/azure/templates/R7730/cluster-r7730/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*Base Url*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/cluster-r7730 + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R7730/cluster-r7730/createUiDefinition.json b/deprecated/azure/templates/R7730/cluster-r7730/createUiDefinition.json new file mode 100644 index 00000000..f02935d6 --- /dev/null +++ b/deprecated/azure/templates/R7730/cluster-r7730/createUiDefinition.json @@ -0,0 +1,348 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "clusterNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Name", + "toolTip": "The name of the cluster.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster settings", + "subLabel": { + "preValidation": "Configure Cluster settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R77.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R77.30", + "value": "R77.30" + } + ] + } + }, + { + "name": "R7730Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[equals(steps('chkp').cloudGuardVersion, 'R77.30')]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + } + ] + } + }, + { + "name": "R7730vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R77.30'), contains(steps('chkp').R7730Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R7730vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R77.30'), contains(steps('chkp').R7730Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R7730vmSizeUiBYOL, 'DS'), contains(steps('chkp').R7730vmSizeUiNGTP, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R7730Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterNameUi')]", + "vmSize": "[coalesce(steps('chkp').R7730vmSizeUiBYOL, steps('chkp').R7730vmSizeUiNGTP)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} diff --git a/deprecated/azure/templates/R7730/cluster-r7730/mainTemplate.json b/deprecated/azure/templates/R7730/cluster-r7730/mainTemplate.json new file mode 100644 index 00000000..c8370390 --- /dev/null +++ b/deprecated/azure/templates/R7730/cluster-r7730/mainTemplate.json @@ -0,0 +1,684 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + } + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R77.30 - Bring Your Own License", + "R77.30 - Pay As You Go (NGTP)" + ], + "defaultValue": "R77.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Cluster" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "role": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Role" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "baseUrl": { + "type": "string", + "metadata": { + "artifactsBaseUrl": "" + }, + "defaultValue": "https://s3-us-west-2.amazonaws.com/azure.templates/marketplace-cluster" + } + }, + "variables": { + "templateName": "cluster", + "templateVersion": "", + "location": "[parameters('location')]", + "offers": { + "R77.30 - Bring Your Own License": "BYOL", + "R77.30 - Pay As You Go (NGTP)": "NGTP" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R77.30 - Bring Your Own License": "R7730", + "R77.30 - Pay As You Go (NGTP)": "R7730" + }, + "isBlink": "[equals(variables('osVersion'), 'R8010')]", + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2016-06-01", + "authorizationApiVersion": "2017-05-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR7730": 50, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/bin/bash\\n', '\\n', 'LOG_FILE=/var/log/custom-data.log\\n', 'exec >>$LOG_FILE 2>&1\\n', '\\n', '# description: echo instance metadata\\n', '# args :\\n', '# optional: string contatining api version date.\\n', '# default is to \\\"2017-08-01\\\".\\n', '# usage :\\n', '# getInstanceMetadata \\\"2017-12-01\\\"\\n', 'function getInstanceMetadata {\\n', ' # get instance metadata using Azure Instance Metadata service:\\n', ' if test -z \\\"$#\\\" ; then\\n', ' api_version=\\\"$1\\\"\\n', ' else\\n', ' api_version=\\\"2017-08-01\\\"\\n', ' fi\\n', ' metadata=\\\"$(get-cloud-data.sh \\\"metadata/instance/?api-version=$api_version\\\" | jq \\\".\\\")\\\"\\n', '\\n', '\\n', ' echo \\\"$metadata\\\"\\n', ' log-data \\\"Instance metadata retrieved using api version: $api_version\\\" >&2\\n', '}\\n', '\\n', '# description: echo $@ to std output wrapped with date and additional data\\n', '# args :\\n', '# add \\\"-w\\\" before the content to log warning message.\\n', '# add \\\"-e\\\" before the content to log error message.\\n', '# default is to log info message.\\n', '# usage :\\n', '# log-data \\\"-w\\\" \\\"my message\\\"\\n', 'function log-data {\\n', ' test -z \\\"$1\\\" && echo \\\"$(date +\\\"%F %T\\\") CUSTOM-DATA [INFO]\\\" || {\\n', ' if [[ \\\"$1\\\" == \\\"-w\\\" ]] ; then\\n', ' prefix=\\\"[WARNING] \\\"\\n', ' shift\\n', ' elif [[ \\\"$1\\\" == \\\"-e\\\" ]] ; then\\n', ' prefix=\\\"[ERROR] \\\"\\n', ' shift\\n', ' else\\n', ' prefix=\\\"[INFO] \\\"\\n', ' fi\\n', ' for i in \\\"$@\\\"; do\\n', ' echo -e \\\"$(date +\\\"%F %T\\\") CUSTOM-DATA $prefix$i\\\"\\n', ' shift\\n', ' done\\n', ' }\\n', '}\\n', '\\n', '# description: wrapper to command to enable retries\\n', '# args :\\n', '# To specify return codes:\\n', '# \\\"-rc\\\" followed by string of numbers seperated by a space: \\\"int1 int2\\\".\\n', '# default is \\\"0\\\".\\n', '# To specify maximum duration for retries:\\n', '# \\\"-md\\\" followed by a number: 5.\\n', '# default is 8.\\n', '# To specift sleep time between retries:\\n', '# \\\"-st\\\" followed by a number: 1.\\n', '# default is 2.\\n', '# usage :\\n', '# runcmd -rc \\\"19 0 3\\\" \\\"-md\\\" 6 \\\"-st\\\" 1 my-command\\n', 'function runcmd {\\n', ' expected_returnval=()\\n', ' if [ \\\"$1\\\" == \\\"-rc\\\" ] ; then\\n', ' shift\\n', ' for val in $1\\n', ' do\\n', ' expected_returnval[\\\"$val\\\"]=\\\"1\\\"\\n', ' done\\n', ' shift\\n', ' else\\n', ' expected_returnval[\\\"0\\\"]=\\\"1\\\"\\n', ' fi\\n', ' if [ \\\"$1\\\" == \\\"-md\\\" ] ; then\\n', ' shift\\n', ' MAX_DURATION=$1\\n', ' shift\\n', ' else\\n', ' MAX_DURATION=8\\n', ' fi\\n', ' if [ \\\"$1\\\" == \\\"-st\\\" ] ; then\\n', ' shift\\n', ' SLEEP_TIME=$1\\n', ' shift\\n', ' else\\n', ' SLEEP_TIME=2\\n', ' fi\\n', ' cmd=\\\"$@\\\"\\n', ' log-data \\\"Executing $cmd\\\" \\\" Allowed return values : $(echo ${!expected_returnval[@]})\\\" \\\" Maximum retries duration : $MAX_DURATION\\\" \\\" Sleep time between retries: $SLEEP_TIME\\\" >&2\\n', '\\n', '\\n', '\\n', ' SECONDS=0\\n', ' while [ \\\"$SECONDS\\\" -lt \\\"$MAX_DURATION\\\" ] ; do\\n', ' returnmsg=\\\"$(\\\"$@\\\" 2>&1)\\\"\\n', ' returnval=\\\"$?\\\"\\n', ' if [[ ${expected_returnval[$returnval]} ]] ; then\\n', ' log-data \\\"Success executing: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\\" >&2\\n', ' return 0\\n', ' fi\\n', ' log-data \\\"-w\\\" \\\"Retrying to execute command: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\\" >&2\\n', ' sleep \\\"$SLEEP_TIME\\\"\\n', ' done\\n', ' log-data \\\"-e\\\" \\\"Failed to execute command: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval) (expected: $expected_returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\n', '\\\\\\\\tTotal run time: $SECONDS [seconds]\\\" >&2\\n', ' return 1\\n', '}\\n', '\\n', 'log-data \\\"Start of custom-data.sh\\\"\\n', 'log-data \\\"Time Zone: $(date +\\\"%Z %:z\\\")\\\"\\n', 'log-data \\\"Instance metadata at beginning: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', 'log-data \\\"Contents of $FWDIR/boot/modules/fwkern.conf at beginning: \\\\\\\\n$(cat \\\"$FWDIR/boot/modules/fwkern.conf\\\")\\\"\\n', '\\n', 'installationType=\\\"', variables('installationType'), '\\\"', '\\n', 'allowUploadDownload=\\\"', variables('allowUploadDownload'), '\\\"', '\\n', 'osVersion=\\\"', variables('osVersion'), '\\\"', '\\n', 'templateName=\\\"', variables('templateName'), '\\\"', '\\n', 'isBlink=\\\"', variables('isBlink'), '\\\"', '\\n', 'templateVersion=\\\"', variables('templateVersion'), '\\\"', '\\n', '\\n', 'if [ -z \\\"${isBlink}\\\" ]; then\\n', ' isBlink=\\\"False\\\"\\n', 'fi\\n', '\\n', 'log-data \\\"isBlink val: $isBlink\\\"\\n', '\\n', 'log-data \\\"templateName: $templateName\\\" \\\"templateVersion: $templateVersion\\\" \\\"installationType: $installationType\\\" \\\"osVersion: $osVersion\\\"\\n', '\\n', '\\n', '\\n', '\\n', 'echo \\\"template_name: $templateName\\\" >> /etc/cloud-version\\n', 'echo \\\"template_version: $templateVersion\\\" >> /etc/cloud-version\\n', '\\n', 'log-data \\\"Executing bootstrap script:\\\"\\n', 'bootstrap=\\\"$(dirname \\\"$0\\\")/bootstrap\\\"\\n', 'cat <<<\\\"', variables('bootstrapScript64'), '\\\" | tr -d \\\"\\\\n\\\" | base64 -d >\\\"$bootstrap\\\"', '\\n', 'dos2unix \\\"$bootstrap\\\"\\n', 'chmod +x \\\"$bootstrap\\\"\\n', 'cp \\\"$bootstrap\\\" \\\"/var/log/custom-data-bootstrap\\\"\\n', '\\\"$bootstrap\\\"\\n', '\\n', 'function has_iam {\\n', ' local url\\n', ' local out\\n', ' url=\\\"http://169.254.169.254/metadata/identity/oauth2/token\\\"\\n', ' url=\\\"$url?api-version=2018-02-01&resource=https://no-such-domain/\\\"\\n', ' for i in 1 2 3 ; do\\n', ' out=\\\"$(curl_cli --header metadata:true --url \\\"$url\\\" --max-time 10)\\\"\\n', ' if test \\\"$(echo \\\"$out\\\" | jq -r .error)\\\" = \\\"invalid_resource\\\" ; then\\n', ' echo true\\n', ' return\\n', ' fi\\n', ' if test \\\"$(echo \\\"$out\\\" | jq -r .error_description)\\\" = \\\"Identity not found\\\" ; then\\n', '\\n', ' break\\n', ' fi\\n', ' done\\n', ' echo false\\n', '}\\n', '\\n', '# description: create file $FWDIR/conf/azure-ha.json\\n', '# args : no args\\n', '# usage : cluster\\n', 'function cluster {\\n', ' log-data \\\"Cluster - Executing cluster function\\\"\\n', ' subscriptionId=\\\"', subscription().subscriptionId, '\\\"', '\\n', ' tenantId=\\\"', subscription().tenantId, '\\\"', '\\n', ' resourceGroup=\\\"', resourceGroup().name, '\\\"', '\\n', ' virtualNetwork=\\\"', parameters('virtualNetworkName'), '\\\"', '\\n', ' clusterName=\\\"', parameters('vmName'), '\\\"', '\\n', ' lbName=\\\"frontend-lb\\\"\\n', ' location=\\\"', variables('location'), '\\\"', '\\n', ' has_iam=false\\n', '\\n', ' case \\\"$location\\\" in\\n', ' us*)\\n', ' environment=\\\"AzureUSGovernment\\\"\\n', ' ;;\\n', ' china*)\\n', ' environment=\\\"AzureChinaCloud\\\"\\n', ' ;;\\n', ' germany*)\\n', ' environment=\\\"AzureGermanCloud\\\"\\n', ' ;;\\n', ' *)\\n', ' environment=\\\"AzureCloud\\\"\\n', ' has_iam=\\\"$(has_iam)\\\"\\n', ' ;;\\n', ' esac\\n', '\\n', ' cat <\\\"$FWDIR/conf/azure-ha.json\\\"\\n', '{\\n', ' \\\"subscriptionId\\\": \\\"$subscriptionId\\\",\\n', ' \\\"location\\\": \\\"$location\\\",\\n', ' \\\"environment\\\": \\\"$environment\\\",\\n', ' \\\"resourceGroup\\\": \\\"$resourceGroup\\\",\\n', 'EOF\\n', ' if $has_iam ; then\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"credentials\\\": \\\"IAM\\\",\\n', ' \\\"tenant\\\": \\\"$tenantId\\\",\\n', 'EOF\\n', ' else\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"credentials\\\": {\\n', ' \\\"tenant\\\": \\\"$tenantId\\\",\\n', ' \\\"grant_type\\\": \\\"client_credentials\\\",\\n', ' \\\"client_id\\\": \\\"\\\",\\n', ' \\\"client_secret\\\": \\\"\\\"\\n', ' },\\n', 'EOF\\n', ' fi\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"proxy\\\": \\\"\\\",\\n', ' \\\"virtualNetwork\\\": \\\"$virtualNetwork\\\",\\n', ' \\\"clusterName\\\": \\\"$clusterName\\\",\\n', ' \\\"templateName\\\": \\\"$templateName\\\",\\n', 'EOF\\n', '\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"clusterNetworkInterfaces\\\": {\\n', ' \\\"eth0\\\": [\\\"', variables('externalPrivateAddresses')[2], '\\\", \\\"$clusterName\\\"]', '\\n', ' },\\n', 'EOF\\n', '\\n', '\\n', '\\n', '\\n', '\\n', '\\n', '\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"lbName\\\": \\\"$lbName\\\",\\n', 'EOF\\n', '\\n', '\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"debug\\\": false\\n', '}\\n', 'EOF\\n', '\\n', ' log-data \\\"Cluster - Write cluster values to $FWDIR/conf/azure-ha.json\\\"\\n', ' log-data \\\"File content: \\\\\\\\n$(cat \\\"$FWDIR/conf/azure-ha.json\\\")\\\"\\n', '}\\n', '\\n', '# description:\\n', '# check if an alias exists on VM, in case there is no alias,\\n', '# try to retrieve it from instance metadata & add it\\n', '# args : no args.\\n', '# usage : pub_addr=\\\"$(checkPublicAddress)\\\"\\n', 'function checkPublicAddress {\\n', ' log-data \\\"Executing checkPublicAddress function\\\" >&2\\n', ' ipaddr=\\\"$(ip addr show dev eth0)\\\"\\n', ' pub_addr=\\\"$(echo \\\"$ipaddr\\\" | sed -n -e \\\"s|^ *inet \\\\\\\\([^/]*\\\\\\\\)/.* eth0:1\\\\$|\\\\\\\\1|p\\\")\\\"\\n', '\\n', ' log-data \\\"At start - \\\" \\\"ip addr show dev eth0: \\\\\\\\n$ipaddr\\\" \\\"pub_addr: $pub_addr\\\" >&2\\n', ' if test -z \\\"$pub_addr\\\" ; then\\n', ' log-data \\\"Trying to set alias for public ip address\\\" >&2\\n', ' pub_addr=\\\"$(get-cloud-data.sh \\\"metadata/instance/network/interface?api-version=2017-04-02\\\" | jq -r \\\".[].ipv4.ipAddress[].publicIpAddress\\\" | grep --max-count 1 .)\\\"\\n', '\\n', '\\n', '\\n', ' log-data \\\"Public Address from instance metadata: $pub_addr\\\" >&2\\n', ' test -z \\\"$pub_addr\\\" || {\\n', ' runcmd -rc \\\"1 0\\\" clish -c \\\"lock database override\\\" >&2\\n', ' runcmd clish -s -c \\\"add interface eth0 alias $pub_addr/32\\\" >&2\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"Setting alias for eth0 completed successfuly\\\" >&2\\n', ' else\\n', ' log-data \\\"Failed to set alias for eth0\\\" >&2\\n', ' fi\\n', ' }\\n', ' fi\\n', ' log-data \\\"Interfaces at end: \\\\\\\\n$(ifconfig)\\\" >&2\\n', ' test -z \\\"$pub_addr\\\" || echo \\\"$pub_addr\\\"\\n', '}\\n', '\\n', 'case \\\"$installationType\\\" in\\n', 'gateway)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=false\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' ;;\\n', 'cluster)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=true\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' cluster\\n', ' ;;\\n', 'vmss)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=false\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' ;;\\n', 'management)\\n', ' installSecurityGateway=false\\n', ' installSecurityManagement=true\\n', ' sicKey=notused\\n', ' ;;\\n', 'custom)\\n', ' pub_addr=\\\"$(checkPublicAddress)\\\"\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' exit 0\\n', ' ;;\\n', 'standalone | *)\\n', ' installSecurityGateway=true\\n', ' installSecurityManagement=true\\n', ' gateway_cluster_member=false\\n', ' sicKey=notused\\n', ' ;;\\n', 'esac\\n', '\\n', 'log-data \\\"installSecurityGateway: $installSecurityGateway\\\" \\\"gateway_cluster_member: $gateway_cluster_member\\\" \\\"installSecurityManagement: $installSecurityManagement\\\"\\n', '\\n', '\\n', '\\n', 'if [ \\\"$isBlink\\\" == \\\"True\\\" ]; then\\n', ' if \\\"$installSecurityManagement\\\"; then\\n', ' conf=\\\"mgmt_admin_radio=gaia_admin\\\"\\n', ' else\\n', ' conf=\\\"gateway_cluster_member=$gateway_cluster_member\\\"\\n', ' fi\\n', ' conf=\\\"${conf}&download_info=$allowUploadDownload\\\"\\n', ' conf=\\\"${conf}&upload_info=$allowUploadDownload\\\"\\n', ' log-data \\\"conf: $conf\\\"\\n', '\\n', ' conf=\\\"${conf}&ftw_sic_key=$sicKey\\\"\\n', '\\n', ' log-data \\\"Running blink config\\\"\\n', ' blink_config -s \\\"$conf\\\"\\n', 'else\\n', ' conf=\\\"install_security_gw=$installSecurityGateway\\\"\\n', ' if \\\"$installSecurityGateway\\\"; then\\n', ' conf=\\\"${conf}&install_ppak=true\\\"\\n', ' conf=\\\"${conf}&gateway_cluster_member=$gateway_cluster_member\\\"\\n', ' fi\\n', ' conf=\\\"${conf}&install_security_managment=$installSecurityManagement\\\"\\n', ' if \\\"$installSecurityManagement\\\"; then\\n', ' if [ \\\"R7730\\\" == \\\"$osVersion\\\" ]; then\\n', ' managementAdminPassword=\\\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\\\"\\n', ' conf=\\\"${conf}&mgmt_admin_name=admin\\\"\\n', ' conf=\\\"${conf}&mgmt_admin_passwd=${managementAdminPassword}\\\"\\n', ' else\\n', ' conf=\\\"${conf}&mgmt_admin_radio=gaia_admin\\\"\\n', ' fi\\n', '\\n', ' managementGUIClientNetwork=\\\"', variables('managementGUIClientNetwork'), '\\\"', '\\n', ' conf=\\\"${conf}&install_mgmt_primary=true\\\"\\n', '\\n', ' if [ \\\"0.0.0.0/0\\\" = \\\"$managementGUIClientNetwork\\\" ]; then\\n', ' conf=\\\"${conf}&mgmt_gui_clients_radio=any\\\"\\n', ' else\\n', ' conf=\\\"${conf}&mgmt_gui_clients_radio=network\\\"\\n', ' ManagementGUIClientBase=\\\"$(echo \\\"$managementGUIClientNetwork\\\" | cut -d / -f 1)\\\"\\n', ' ManagementGUIClientMaskLength=\\\"$(echo \\\"$managementGUIClientNetwork\\\" | cut -d / -f 2)\\\"\\n', ' conf=\\\"${conf}&mgmt_gui_clients_ip_field=$ManagementGUIClientBase\\\"\\n', ' conf=\\\"${conf}&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength\\\"\\n', ' fi\\n', ' fi\\n', '\\n', ' conf=\\\"${conf}&download_info=$allowUploadDownload\\\"\\n', ' conf=\\\"${conf}&upload_info=$allowUploadDownload\\\"\\n', ' log-data \\\"conf: $conf\\\"\\n', ' # add sicKey value after loging the rest of conf parameters in order not to save the SIC key.\\n', ' conf=\\\"${conf}&ftw_sic_key=$sicKey\\\"\\n', '\\n', ' #since DA process is running parallel to FTW and may cause to problems like SIM (TaskId=72815)\\n', ' #the DA is being stoped before FTW is running, and restart again after FTW is finished.\\n', ' log-data \\\"Stop DA process: $(/opt/CPda/bin/dastop)\\\"\\n', '\\n', ' log-data \\\"Running first time wizard\\\"\\n', ' config_system -s \\\"$conf\\\"\\n', '\\n', ' log-data \\\"Start DA process: $(/opt/CPda/bin/dastart)\\\"\\n', 'fi\\n', '\\n', 'pub_addr=\\\"$(checkPublicAddress)\\\"\\n', 'log-data \\\"VM public address is: $pub_addr\\\"\\n', '\\n', '# set the main IP of the management object in SmartConsole to be the public IP:\\n', 'if [ \\\"$installationType\\\" = \\\"management\\\" ] && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' until mgmt_cli -r true discard ; do\\n', ' sleep 30\\n', ' done\\n', ' addr=\\\"$(ip addr show dev eth0 | sed -n -e \\\"s|^ *inet \\\\\\\\([^/]*\\\\\\\\)/.* eth0\\\\$|\\\\\\\\1|p\\\")\\\"\\n', '\\n', ' uid=\\\"$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json | jq -r \\\".objects[] | select(.ipaddr == \\\\\\\"$addr\\\\\\\") | .uid\\\")\\\"\\n', '\\n', '\\n', '\\n', ' test -z \\\"$uid\\\" || test -z \\\"$pub_addr\\\" || mgmt_cli -r true set-generic-object uid \\\"$uid\\\" ipaddr \\\"$pub_addr\\\"\\n', '\\n', ' log-data \\\"Management - Set management object in SmartConsole IP address to $pub_addr\\\"\\n', 'fi\\n', 'if \\\"$installSecurityManagement\\\" && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' chkconfig --add autoprovision\\n', ' log-data \\\"Add autoprovision service to chkconfig\\\"\\n', 'fi\\n', '\\n', 'if [ \\\"$installationType\\\" = \\\"vmss\\\" ] || [ \\\"$installationType\\\" = \\\"cluster\\\" ]; then\\n', ' # add dynamic objects to represent the GWs external NICs in management:\\n', ' dynamic_object_names=\\\"$(dynamic_objects -l | awk \\\"/object/{print \\\\$4}\\\")\\\"\\n', ' log-data \\\"dynamic object names before are: $dynamic_object_names\\\"\\n', ' ExtAddr=\\\"$(ip addr show dev eth0 | awk \\\"/inet/{print \\\\$2; exit}\\\" | cut -d / -f 1)\\\"\\n', ' runcmd -rc \\\"19 0 3\\\" dynamic_objects -n LocalGatewayExternal -r \\\"$ExtAddr\\\" \\\"$ExtAddr\\\" -a\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"Created dynamic object for eth0\\\"\\n', ' else\\n', ' log-data \\\"Failed to create dynamic object for eth0\\\"\\n', ' fi\\n', ' log-data \\\"Set dynamic objects: (Ext: $ExtAddr) \\\\\\\\n$(dynamic_objects -l)\\\"\\n', '\\n', ' # Disable anti-spoofing feature in SecureXL for unknown connections.\\n', ' # To prevent anti-spoofing on eth1 to drop the health probe queries.\\n', ' if [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' if [ -f /opt/CPshared/5.0/tmp/.CPprofile.sh ]; then\\n', ' log-data \\\"/opt/CPshared/5.0/tmp/.CPprofile.sh exists and is a regular file.\\\"\\n', ' . /opt/CPshared/5.0/tmp/.CPprofile.sh\\n', ' log-data \\\"add sim_anti_spoofing_enabled=0 to $PPKDIR/boot/modules/simkern.conf\\\"\\n', ' echo \\\"sim_anti_spoofing_enabled=0\\\" >> \\\"$PPKDIR/boot/modules/simkern.conf\\\"\\n', ' log-data \\\"\\\\$PPKDIR/boot/modules/simkern.conf: \\\\\\\\n$(cat $PPKDIR/boot/modules/simkern.conf)\\\"\\n', ' fi\\n', ' fi\\n', 'fi\\n', '\\n', 'if [ \\\"$installationType\\\" == \\\"vmss\\\" ]; then\\n', ' # add dynamic objects to represent the GWs internal NICs in management:\\n', ' IntAddr=\\\"$(ip addr show dev eth1 | awk \\\"/inet/{print \\\\$2; exit}\\\" | cut -d / -f 1)\\\"\\n', ' runcmd -rc \\\"19 0 3\\\" dynamic_objects -n LocalGatewayInternal -r \\\"$IntAddr\\\" \\\"$IntAddr\\\" -a\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"VMSS - created dynamic object for eth1\\\"\\n', ' else\\n', ' log-data \\\"VMSS - failed to create dynamic object for eth1\\\"\\n', ' fi\\n', ' log-data \\\"VMSS - Set dynamic objects: (Int: $IntAddr) \\\\\\\\n$(dynamic_objects -l)\\\"\\n', '\\n', ' # add static route for all vnet but Frontend to use eth1:\\n', ' subnet2Prefix=\\\"$(getInstanceMetadata | jq -r \\\".network.interface[1].ipv4.subnet[].address\\\")\\\"\\n', ' firstThreeOctats=\\\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 1,2,3)\\\"\\n', ' forthOctats=\\\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 4)\\\"\\n', ' forthOctats=\\\"$(( forthOctats + 1 ))\\\"\\n', ' router=\\\"$firstThreeOctats.$forthOctats\\\"\\n', ' log-data \\\"Vnet CIDR: $vnet\\\" \\\"Internal subnet CIDR: $subnet2Prefix\\\" \\\"Internal subnet gateway: $router\\\"\\n', ' vnets=(\\\"$vnet\\\" \\\"10.0.0.0/8\\\" \\\"172.16.0.0/12\\\" \\\"192.168.0.0/16\\\")\\n', ' runcmd -rc \\\"1 0\\\" clish -c \\\"lock database override\\\" >&2\\n', ' for vnet in \\\"${vnets[@]}\\\"; do\\n', ' runcmd clish -s -c \\\"set static-route $vnet nexthop gateway address $router on\\\"\\n', ' if [ \\\"$?\\\" == \\\"0\\\" ] ; then\\n', ' log-data \\\"Set static-route for vnet: $vnet to router: $router\\\"\\n', ' else\\n', ' log-data \\\"Failed to set static-route for vnet: $vnet to router: $router\\\"\\n', ' fi\\n', ' done\\n', 'fi\\n', '\\n', 'log-data \\\"VM static routes: \\\\\\\\n$(route)\\\"\\n', 'log-data \\\"Contents of $FWDIR/boot/modules/fwkern.conf at end: \\\\\\\\n$(cat \\\"$FWDIR/boot/modules/fwkern.conf\\\")\\\"\\n', '\\n', 'if \\\"$installSecurityGateway\\\"; then\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' if [ \\\"$isBlink\\\" == \\\"False\\\" ] || [ \\\"$installationType\\\" == \\\"cluster\\\" ]; then\\n', ' log-data \\\"VM is shuting down\\\"\\n', ' shutdown -r now\\n', ' fi\\n', 'else\\n', ' if \\\"$installSecurityManagement\\\" && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' service autoprovision start\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' log-data \\\"Start service autoprovision\\\"\\n', ' fi\\n', 'fi\\n')]", + "imageOfferR7730": "check-point-r77-10", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "lbId": "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "lbName": "frontend-lb", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), concat('/subscriptions/',subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[if(empty(variables('roleDefinitionId')), json('null'), json('{\"type\": \"SystemAssigned\"}'))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('Subnet1StartAddress'), '.')[0],'.', split(parameters('Subnet1StartAddress'), '.')[1],'.', split(parameters('Subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('Subnet1StartAddress'), '.')[0],'.', split(parameters('Subnet1StartAddress'), '.')[1],'.', split(parameters('Subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet1StartAddress'), '.')[3]),2)))]" + ], + "Subnet2PrivateAddresses": [ + "[parameters('Subnet2StartAddress')]", + "[concat(split(parameters('Subnet2StartAddress'), '.')[0],'.', split(parameters('Subnet2StartAddress'), '.')[1],'.', split(parameters('Subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('Subnet2StartAddress'), '.')[0],'.', split(parameters('Subnet2StartAddress'), '.')[1],'.', split(parameters('Subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet2StartAddress'), '.')[3]),2)))]" + ], + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('vmName'))]", + "publicIPAddressIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]"], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[concat(parameters('baseUrl'), '/vnet-', parameters('vnetNewOrExisting'), '.json')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "cluster" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-02f0149c-45d1-561e-bd46-1121af3376e0", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressIds')[0]]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressIds')[0]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressIds')[1]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "copy": { + "name": "nic2Copy", + "count": "[variables('count')]" + }, + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('Subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + }, + { + "condition": "[not(empty(variables('roleDefinitionId')))]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(concat('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), variables('computeApiVersion'), 'Full').identity.principalId]" + } + } + ], + "outputs": { + "ClusterIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "ClusterFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[1]).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R7730/cluster-r7730/vnet-existing.json b/deprecated/azure/templates/R7730/cluster-r7730/vnet-existing.json new file mode 100644 index 00000000..c48485e9 --- /dev/null +++ b/deprecated/azure/templates/R7730/cluster-r7730/vnet-existing.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Web" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/cluster-r7730/vnet-new.json b/deprecated/azure/templates/R7730/cluster-r7730/vnet-new.json new file mode 100644 index 00000000..68adc232 --- /dev/null +++ b/deprecated/azure/templates/R7730/cluster-r7730/vnet-new.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/mgmt-r7730/README.MD b/deprecated/azure/templates/R7730/mgmt-r7730/README.MD new file mode 100644 index 00000000..e85d7ee1 --- /dev/null +++ b/deprecated/azure/templates/R7730/mgmt-r7730/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*Base Url*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/mgmt-r7730 + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R7730/mgmt-r7730/createUiDefinition.json b/deprecated/azure/templates/R7730/mgmt-r7730/createUiDefinition.json new file mode 100644 index 00000000..50a96c0a --- /dev/null +++ b/deprecated/azure/templates/R7730/mgmt-r7730/createUiDefinition.json @@ -0,0 +1,281 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Security Management Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R77.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R77.30", + "value": "R77.30" + } + ] + } + }, + { + "name": "R7730vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[equals(steps('chkp').cloudGuardVersion, 'R77.30')]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_D3", + "Standard_DS3" + ], + "constraints": { + "excludedSizes": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Standard_A0", + "Standard_A1", + "Standard_A1_v2", + "Standard_A2", + "Standard_A5", + "Standard_D1", + "Standard_D1_v2", + "Standard_DS1", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "visible": "[not(equals(steps('chkp').cloudGuardVersion, 'R80.20'))]", + "defaultValue": "Management", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Management", + "value": "management" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[or(equals(steps('chkp').installationType, 'management'), equals(steps('chkp').cloudGuardVersion, 'R80.20'))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R80.20'), not(equals(steps('chkp').installationType, 'custom')))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Amount of additional disk space (in GB), Initial disk size is 50 GB for R77.30", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[and(not(equals(substring(location(), 0, 2), 'us')), or(contains(steps('chkp').R7730vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiMGMT5, 'DS'), contains(steps('chkp').R8020vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8020vmSizeUiMGMT5, 'DS')))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R7730vmSizeUiBYOL, steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiMGMT5, steps('chkp').R8020vmSizeUiBYOL, steps('chkp').R8020vmSizeUiMGMT5)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]" + } + } +} + diff --git a/deprecated/azure/templates/R7730/mgmt-r7730/mainTemplate.json b/deprecated/azure/templates/R7730/mgmt-r7730/mainTemplate.json new file mode 100644 index 00000000..ff33f6d6 --- /dev/null +++ b/deprecated/azure/templates/R7730/mgmt-r7730/mainTemplate.json @@ -0,0 +1,553 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R77.30 - Bring Your Own License" + ], + "defaultValue": "R77.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point vSEC" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "management", + "allowedValues": [ + "management", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "baseUrl": { + "type": "string", + "metadata": { + "artifactsBaseUrl": "" + }, + "defaultValue": "https://s3-us-west-2.amazonaws.com/azure.templates/marketplace-management" + } + }, + "variables": { + "templateName": "management", + "templateVersion": "20181107", + "location": "[parameters('location')]", + "offers": { + "R77.30 - Bring Your Own License": "BYOL" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R77.30 - Bring Your Own License": "R7730" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "installationType": "[if(equals(variables('osVersion'), 'R8020'), 'management', parameters('installationType'))]", + "isBlink": "[bool('false')]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2016-06-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR7730": 50, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/bin/bash\n', '\n', 'LOG_FILE=/var/log/custom-data.log\n', 'exec >>$LOG_FILE 2>&1\n', '\n', '# description: echo instance metadata\n', '# args :\n', '# optional: string contatining api version date.\n', '# default is to \"2017-08-01\".\n', '# usage :\n', '# getInstanceMetadata \"2017-12-01\"\n', 'function getInstanceMetadata {\n', ' # get instance metadata using Azure Instance Metadata service:\n', ' if test -z \"$#\" ; then\n', ' api_version=\"$1\"\n', ' else\n', ' api_version=\"2017-08-01\"\n', ' fi\n', ' metadata=\"$(get-cloud-data.sh \"metadata/instance/?api-version=$api_version\" | jq \".\")\"\n', '\n', '\n', ' echo \"$metadata\"\n', ' log-data \"Instance metadata retrieved using api version: $api_version\" >&2\n', '}\n', '\n', '# description: echo $@ to std output wrapped with date and additional data\n', '# args :\n', '# add \"-w\" before the content to log warning message.\n', '# add \"-e\" before the content to log error message.\n', '# default is to log info message.\n', '# usage :\n', '# log-data \"-w\" \"my message\"\n', 'function log-data {\n', ' test -z \"$1\" && echo \"$(date +\"%F %T\") CUSTOM-DATA [INFO]\" || {\n', ' if [[ \"$1\" == \"-w\" ]] ; then\n', ' prefix=\"[WARNING] \"\n', ' shift\n', ' elif [[ \"$1\" == \"-e\" ]] ; then\n', ' prefix=\"[ERROR] \"\n', ' shift\n', ' else\n', ' prefix=\"[INFO] \"\n', ' fi\n', ' for i in \"$@\"; do\n', ' echo -e \"$(date +\"%F %T\") CUSTOM-DATA $prefix$i\"\n', ' shift\n', ' done\n', ' }\n', '}\n', '\n', '# description: wrapper to command to enable retries\n', '# args :\n', '# To specify return codes:\n', '# \"-rc\" followed by string of numbers seperated by a space: \"int1 int2\".\n', '# default is \"0\".\n', '# To specify maximum duration for retries:\n', '# \"-md\" followed by a number: 5.\n', '# default is 8.\n', '# To specift sleep time between retries:\n', '# \"-st\" followed by a number: 1.\n', '# default is 2.\n', '# usage :\n', '# runcmd -rc \"19 0 3\" \"-md\" 6 \"-st\" 1 my-command\n', 'function runcmd {\n', ' expected_returnval=()\n', ' if [ \"$1\" == \"-rc\" ] ; then\n', ' shift\n', ' for val in $1\n', ' do\n', ' expected_returnval[\"$val\"]=\"1\"\n', ' done\n', ' shift\n', ' else\n', ' expected_returnval[\"0\"]=\"1\"\n', ' fi\n', ' if [ \"$1\" == \"-md\" ] ; then\n', ' shift\n', ' MAX_DURATION=$1\n', ' shift\n', ' else\n', ' MAX_DURATION=8\n', ' fi\n', ' if [ \"$1\" == \"-st\" ] ; then\n', ' shift\n', ' SLEEP_TIME=$1\n', ' shift\n', ' else\n', ' SLEEP_TIME=2\n', ' fi\n', ' cmd=\"$@\"\n', ' log-data \"Executing $cmd\" \" Allowed return values : $(echo ${!expected_returnval[@]})\" \" Maximum retries duration : $MAX_DURATION\" \" Sleep time between retries: $SLEEP_TIME\" >&2\n', '\n', '\n', '\n', ' SECONDS=0\n', ' while [ \"$SECONDS\" -lt \"$MAX_DURATION\" ] ; do\n', ' returnmsg=\"$(\"$@\" 2>&1)\"\n', ' returnval=\"$?\"\n', ' if [[ ${expected_returnval[$returnval]} ]] ; then\n', ' log-data \"Success executing: $cmd\n', '\\\\tReturn Value : $(echo $returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\" >&2\n', ' return 0\n', ' fi\n', ' log-data \"-w\" \"Retrying to execute command: $cmd\n', '\\\\tReturn Value : $(echo $returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\" >&2\n', ' sleep \"$SLEEP_TIME\"\n', ' done\n', ' log-data \"-e\" \"Failed to execute command: $cmd\n', '\\\\tReturn Value : $(echo $returnval) (expected: $expected_returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\n', '\\\\tTotal run time: $SECONDS [seconds]\" >&2\n', ' return 1\n', '}\n', '\n', 'log-data \"Start of custom-data.sh\"\n', 'log-data \"Time Zone: $(date +\"%Z %:z\")\"\n', 'log-data \"Instance metadata at beginning: \\\\n$(getInstanceMetadata)\"\n', 'log-data \"Contents of $FWDIR/boot/modules/fwkern.conf at beginning: \\\\n$(cat \"$FWDIR/boot/modules/fwkern.conf\")\"\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', '\n', 'if [ -z \"${isBlink}\" ]; then\n', ' isBlink=\"False\"\n', 'fi\n', '\n', 'log-data \"isBlink val: $isBlink\"\n', '\n', 'log-data \"templateName: $templateName\" \"templateVersion: $templateVersion\" \"installationType: $installationType\" \"osVersion: $osVersion\"\n', '\n', '\n', '\n', '\n', 'echo \"template_name: $templateName\" >> /etc/cloud-version\n', 'echo \"template_version: $templateVersion\" >> /etc/cloud-version\n', '\n', 'log-data \"Executing bootstrap script:\"\n', 'bootstrap=\"$(dirname \"$0\")/bootstrap\"\n', 'cat <<<\"', variables('bootstrapScript64'), '\" | tr -d \"\\n\" | base64 -d >\"$bootstrap\"', '\n', 'dos2unix \"$bootstrap\"\n', 'chmod +x \"$bootstrap\"\n', 'cp \"$bootstrap\" \"/var/log/custom-data-bootstrap\"\n', '\"$bootstrap\"\n', '\n', 'function has_iam {\n', ' local url\n', ' local out\n', ' url=\"http://169.254.169.254/metadata/identity/oauth2/token\"\n', ' url=\"$url?api-version=2018-02-01&resource=https://no-such-domain/\"\n', ' for i in 1 2 3 ; do\n', ' out=\"$(curl_cli --header metadata:true --url \"$url\" --max-time 10)\"\n', ' if test \"$(echo \"$out\" | jq -r .error)\" = \"invalid_resource\" ; then\n', ' echo true\n', ' return\n', ' fi\n', ' if test \"$(echo \"$out\" | jq -r .error_description)\" = \"Identity not found\" ; then\n', '\n', ' break\n', ' fi\n', ' done\n', ' echo false\n', '}\n', '\n', '# description: create file $FWDIR/conf/azure-ha.json\n', '# args : no args\n', '# usage : cluster\n', 'function cluster {\n', ' log-data \"Cluster - Executing cluster function\"\n', ' subscriptionId=\"', subscription().subscriptionId, '\"', '\n', ' tenantId=\"', subscription().tenantId, '\"', '\n', ' resourceGroup=\"', resourceGroup().name, '\"', '\n', ' virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', ' clusterName=\"', parameters('vmName'), '\"', '\n', ' lbName=\"frontend-lb\"\n', ' location=\"', variables('location'), '\"', '\n', ' has_iam=false\n', '\n', ' case \"$location\" in\n', ' us*)\n', ' environment=\"AzureUSGovernment\"\n', ' ;;\n', ' china*)\n', ' environment=\"AzureChinaCloud\"\n', ' ;;\n', ' germany*)\n', ' environment=\"AzureGermanCloud\"\n', ' ;;\n', ' *)\n', ' environment=\"AzureCloud\"\n', ' has_iam=\"$(has_iam)\"\n', ' ;;\n', ' esac\n', '\n', ' cat <\"$FWDIR/conf/azure-ha.json\"\n', '{\n', ' \"subscriptionId\": \"$subscriptionId\",\n', ' \"location\": \"$location\",\n', ' \"environment\": \"$environment\",\n', ' \"resourceGroup\": \"$resourceGroup\",\n', 'EOF\n', ' if $has_iam ; then\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"credentials\": \"IAM\",\n', ' \"tenant\": \"$tenantId\",\n', 'EOF\n', ' else\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"credentials\": {\n', ' \"tenant\": \"$tenantId\",\n', ' \"grant_type\": \"client_credentials\",\n', ' \"client_id\": \"\",\n', ' \"client_secret\": \"\"\n', ' },\n', 'EOF\n', ' fi\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"proxy\": \"\",\n', ' \"virtualNetwork\": \"$virtualNetwork\",\n', ' \"clusterName\": \"$clusterName\",\n', ' \"templateName\": \"$templateName\",\n', 'EOF\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"lbName\": \"$lbName\",\n', 'EOF\n', '\n', '\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"debug\": false\n', '}\n', 'EOF\n', '\n', ' log-data \"Cluster - Write cluster values to $FWDIR/conf/azure-ha.json\"\n', ' log-data \"File content: \\\\n$(cat \"$FWDIR/conf/azure-ha.json\")\"\n', '}\n', '\n', '# description:\n', '# check if an alias exists on VM, in case there is no alias,\n', '# try to retrieve it from instance metadata & add it\n', '# args : no args.\n', '# usage : pub_addr=\"$(checkPublicAddress)\"\n', 'function checkPublicAddress {\n', ' log-data \"Executing checkPublicAddress function\" >&2\n', ' ipaddr=\"$(ip addr show dev eth0)\"\n', ' pub_addr=\"$(echo \"$ipaddr\" | sed -n -e \"s|^ *inet \\\\([^/]*\\\\)/.* eth0:1\\$|\\\\1|p\")\"\n', '\n', ' log-data \"At start - \" \"ip addr show dev eth0: \\\\n$ipaddr\" \"pub_addr: $pub_addr\" >&2\n', ' if test -z \"$pub_addr\" ; then\n', ' log-data \"Trying to set alias for public ip address\" >&2\n', ' pub_addr=\"$(get-cloud-data.sh \"metadata/instance/network/interface?api-version=2017-04-02\" | jq -r \".[].ipv4.ipAddress[].publicIpAddress\" | grep --max-count 1 .)\"\n', '\n', '\n', '\n', ' log-data \"Public Address from instance metadata: $pub_addr\" >&2\n', ' test -z \"$pub_addr\" || {\n', ' runcmd -rc \"1 0\" clish -c \"lock database override\" >&2\n', ' runcmd clish -s -c \"add interface eth0 alias $pub_addr/32\" >&2\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"Setting alias for eth0 completed successfuly\" >&2\n', ' else\n', ' log-data \"Failed to set alias for eth0\" >&2\n', ' fi\n', ' }\n', ' fi\n', ' log-data \"Interfaces at end: \\\\n$(ifconfig)\" >&2\n', ' test -z \"$pub_addr\" || echo \"$pub_addr\"\n', '}\n', '\n', 'case \"$installationType\" in\n', 'gateway)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=false\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' ;;\n', 'cluster)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=true\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' cluster\n', ' ;;\n', 'vmss)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=false\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' ;;\n', 'management)\n', ' installSecurityGateway=false\n', ' installSecurityManagement=true\n', ' sicKey=notused\n', ' ;;\n', 'custom)\n', ' pub_addr=\"$(checkPublicAddress)\"\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' exit 0\n', ' ;;\n', 'standalone | *)\n', ' installSecurityGateway=true\n', ' installSecurityManagement=true\n', ' gateway_cluster_member=false\n', ' sicKey=notused\n', ' ;;\n', 'esac\n', '\n', 'log-data \"installSecurityGateway: $installSecurityGateway\" \"gateway_cluster_member: $gateway_cluster_member\" \"installSecurityManagement: $installSecurityManagement\"\n', '\n', '\n', '\n', 'if [ \"$isBlink\" == \"True\" ]; then\n', ' if \"$installSecurityManagement\"; then\n', ' conf=\"mgmt_admin_radio=gaia_admin\"\n', ' else\n', ' conf=\"gateway_cluster_member=$gateway_cluster_member\"\n', ' fi\n', ' conf=\"${conf}&download_info=$allowUploadDownload\"\n', ' conf=\"${conf}&upload_info=$allowUploadDownload\"\n', ' log-data \"conf: $conf\"\n', '\n', ' conf=\"${conf}&ftw_sic_key=$sicKey\"\n', ' # temporary variable as blink config demands password (for now) this way the blink_config command works and does not override admin password\n', ' if [ \"$osVersion\" == \"R8010\" ]; then\n', ' conf=\"${conf}&admin_password_regular=1\"\n', ' fi\n', ' log-data \"Running blink config\"\n', ' blink_config -s \"$conf\"\n', 'else\n', ' conf=\"install_security_gw=$installSecurityGateway\"\n', ' if \"$installSecurityGateway\"; then\n', ' conf=\"${conf}&install_ppak=true\"\n', ' conf=\"${conf}&gateway_cluster_member=$gateway_cluster_member\"\n', ' fi\n', ' conf=\"${conf}&install_security_managment=$installSecurityManagement\"\n', ' if \"$installSecurityManagement\"; then\n', ' if [ \"R7730\" == \"$osVersion\" ]; then\n', ' managementAdminPassword=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"\n', ' conf=\"${conf}&mgmt_admin_name=admin\"\n', ' conf=\"${conf}&mgmt_admin_passwd=${managementAdminPassword}\"\n', ' else\n', ' conf=\"${conf}&mgmt_admin_radio=gaia_admin\"\n', ' fi\n', '\n', ' managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', ' conf=\"${conf}&install_mgmt_primary=true\"\n', '\n', ' if [ \"0.0.0.0/0\" = \"$managementGUIClientNetwork\" ]; then\n', ' conf=\"${conf}&mgmt_gui_clients_radio=any\"\n', ' else\n', ' conf=\"${conf}&mgmt_gui_clients_radio=network\"\n', ' ManagementGUIClientBase=\"$(echo \"$managementGUIClientNetwork\" | cut -d / -f 1)\"\n', ' ManagementGUIClientMaskLength=\"$(echo \"$managementGUIClientNetwork\" | cut -d / -f 2)\"\n', ' conf=\"${conf}&mgmt_gui_clients_ip_field=$ManagementGUIClientBase\"\n', ' conf=\"${conf}&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength\"\n', ' fi\n', ' fi\n', '\n', ' conf=\"${conf}&download_info=$allowUploadDownload\"\n', ' conf=\"${conf}&upload_info=$allowUploadDownload\"\n', ' log-data \"conf: $conf\"\n', ' # add sicKey value after loging the rest of conf parameters in order not to save the SIC key.\n', ' conf=\"${conf}&ftw_sic_key=$sicKey\"\n', '\n', ' #since DA process is running parallel to FTW and may cause to problems like SIM (TaskId=72815)\n', ' #the DA is being stoped before FTW is running, and restart again after FTW is finished.\n', ' log-data \"Stop DA process: $(/opt/CPda/bin/dastop)\"\n', '\n', ' log-data \"Running first time wizard\"\n', ' config_system -s \"$conf\"\n', '\n', ' log-data \"Start DA process: $(/opt/CPda/bin/dastart)\"\n', 'fi\n', '\n', 'pub_addr=\"$(checkPublicAddress)\"\n', 'log-data \"VM public address is: $pub_addr\"\n', '\n', '# set the main IP of the management object in SmartConsole to be the public IP:\n', 'if [ \"$installationType\" = \"management\" ] && [ \"R7730\" != \"$osVersion\" ]; then\n', ' until mgmt_cli -r true discard ; do\n', ' sleep 30\n', ' done\n', ' addr=\"$(ip addr show dev eth0 | sed -n -e \"s|^ *inet \\\\([^/]*\\\\)/.* eth0\\$|\\\\1|p\")\"\n', '\n', ' uid=\"$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json | jq -r \".objects[] | select(.ipaddr == \\\"$addr\\\") | .uid\")\"\n', '\n', '\n', '\n', ' test -z \"$uid\" || test -z \"$pub_addr\" || mgmt_cli -r true set-generic-object uid \"$uid\" ipaddr \"$pub_addr\"\n', '\n', ' log-data \"Management - Set management object in SmartConsole IP address to $pub_addr\"\n', 'fi\n', 'if \"$installSecurityManagement\" && [ \"R7730\" != \"$osVersion\" ]; then\n', ' chkconfig --add autoprovision\n', ' log-data \"Add autoprovision service to chkconfig\"\n', 'fi\n', '\n', 'if [ \"$installationType\" = \"vmss\" ] || [ \"$installationType\" = \"cluster\" ]; then\n', ' # add dynamic objects to represent the GWs external NICs in management:\n', ' dynamic_object_names=\"$(dynamic_objects -l | awk \"/object/{print \\$4}\")\"\n', ' log-data \"dynamic object names before are: $dynamic_object_names\"\n', ' ExtAddr=\"$(ip addr show dev eth0 | awk \"/inet/{print \\$2; exit}\" | cut -d / -f 1)\"\n', ' runcmd -rc \"19 0 3\" dynamic_objects -n LocalGatewayExternal -r \"$ExtAddr\" \"$ExtAddr\" -a\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"Created dynamic object for eth0\"\n', ' else\n', ' log-data \"Failed to create dynamic object for eth0\"\n', ' fi\n', ' log-data \"Set dynamic objects: (Ext: $ExtAddr) \\\\n$(dynamic_objects -l)\"\n', '\n', ' # Disable anti-spoofing feature in SecureXL for unknown connections.\n', ' # To prevent anti-spoofing on eth1 to drop the health probe queries.\n', ' if [ \"R7730\" != \"$osVersion\" ]; then\n', ' if [ -f /opt/CPshared/5.0/tmp/.CPprofile.sh ]; then\n', ' log-data \"/opt/CPshared/5.0/tmp/.CPprofile.sh exists and is a regular file.\"\n', ' . /opt/CPshared/5.0/tmp/.CPprofile.sh\n', ' log-data \"add sim_anti_spoofing_enabled=0 to $PPKDIR/boot/modules/simkern.conf\"\n', ' echo \"sim_anti_spoofing_enabled=0\" >> \"$PPKDIR/boot/modules/simkern.conf\"\n', ' log-data \"\\$PPKDIR/boot/modules/simkern.conf: \\\\n$(cat $PPKDIR/boot/modules/simkern.conf)\"\n', ' fi\n', ' fi\n', 'fi\n', '\n', 'if [ \"$installationType\" == \"vmss\" ]; then\n', ' # add dynamic objects to represent the GWs internal NICs in management:\n', ' IntAddr=\"$(ip addr show dev eth1 | awk \"/inet/{print \\$2; exit}\" | cut -d / -f 1)\"\n', ' runcmd -rc \"19 0 3\" dynamic_objects -n LocalGatewayInternal -r \"$IntAddr\" \"$IntAddr\" -a\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"VMSS - created dynamic object for eth1\"\n', ' else\n', ' log-data \"VMSS - failed to create dynamic object for eth1\"\n', ' fi\n', ' log-data \"VMSS - Set dynamic objects: (Int: $IntAddr) \\\\n$(dynamic_objects -l)\"\n', '\n', ' # add static route for all vnet but Frontend to use eth1:\n', ' subnet2Prefix=\"$(getInstanceMetadata | jq -r \".network.interface[1].ipv4.subnet[].address\")\"\n', ' firstThreeOctats=\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 1,2,3)\"\n', ' forthOctats=\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 4)\"\n', ' forthOctats=\"$(( forthOctats + 1 ))\"\n', ' router=\"$firstThreeOctats.$forthOctats\"\n', ' log-data \"Vnet CIDR: $vnet\" \"Internal subnet CIDR: $subnet2Prefix\" \"Internal subnet gateway: $router\"\n', ' vnets=(\"$vnet\" \"10.0.0.0/8\" \"172.16.0.0/12\" \"192.168.0.0/16\")\n', ' runcmd -rc \"1 0\" clish -c \"lock database override\" >&2\n', ' for vnet in \"${vnets[@]}\"; do\n', ' runcmd clish -s -c \"set static-route $vnet nexthop gateway address $router on\"\n', ' if [ \"$?\" == \"0\" ] ; then\n', ' log-data \"Set static-route for vnet: $vnet to router: $router\"\n', ' else\n', ' log-data \"Failed to set static-route for vnet: $vnet to router: $router\"\n', ' fi\n', ' done\n', 'fi\n', '\n', 'log-data \"VM static routes: \\\\n$(route)\"\n', 'log-data \"Contents of $FWDIR/boot/modules/fwkern.conf at end: \\\\n$(cat \"$FWDIR/boot/modules/fwkern.conf\")\"\n', '\n', 'if \"$installSecurityGateway\"; then\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' if [ \"$isBlink\" == \"False\" ] || [ \"$installationType\" == \"cluster\" ]; then\n', ' log-data \"VM is shuting down\"\n', ' shutdown -r now\n', ' fi\n', 'else\n', ' if \"$installSecurityManagement\" && [ \"R7730\" != \"$osVersion\" ]; then\n', ' service autoprovision start\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' log-data \"Start service autoprovision\"\n', ' fi\n', 'fi\n')]", + "imageOfferR7730": "check-point-r77-10", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[concat(if(equals(variables('osVersion'), 'R8020'), 'mgmt', 'sg'),'-byol')]", + "version": "latest" + }, + "imageReferenceMGMT5": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-5", + "version": "latest" + }, + "imageReference": "[variables(concat('imageReference', variables('offer')))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration',parameters('authenticationType')))]", + "planBYOL": { + "name": "[concat(if(equals(variables('osVersion'), 'R8020'), 'mgmt', 'sg'),'-byol')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT5": { + "name": "mgmt-5", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[concat(parameters('baseUrl'),'/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json')]", + "sicKey": "notused", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-cad9cfed-843e-554d-a348-a42352708fab", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('nsgId')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[variables('plan')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-existing.json b/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-existing.json new file mode 100644 index 00000000..a82ecbb9 --- /dev/null +++ b/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-existing.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-new.json b/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-new.json new file mode 100644 index 00000000..ba4bb568 --- /dev/null +++ b/deprecated/azure/templates/R7730/mgmt-r7730/vnet-1-subnet-new.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/single-r7730/README.MD b/deprecated/azure/templates/R7730/single-r7730/README.MD new file mode 100644 index 00000000..340d95b1 --- /dev/null +++ b/deprecated/azure/templates/R7730/single-r7730/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*Base Url*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/single-r7730 + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R7730/single-r7730/createUiDefinition.json b/deprecated/azure/templates/R7730/single-r7730/createUiDefinition.json new file mode 100644 index 00000000..8ccf677a --- /dev/null +++ b/deprecated/azure/templates/R7730/single-r7730/createUiDefinition.json @@ -0,0 +1,379 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R77.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R77.30", + "value": "R77.30" + } + ] + } + }, + { + "name": "R7730Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[and(not(equals(substring(location(), 0, 2), 'us')), equals(steps('chkp').cloudGuardVersion, 'R77.30'))]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + } + ] + } + }, + { + "name": "R7730vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R77.30'), or(equals(substring(location(), 0, 2), 'us'), contains(steps('chkp').R7730Offer, 'Bring Your Own License')))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_D3", + "Standard_DS3" + ], + "constraints": { + "excludedSizes": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Standard_A0", + "Standard_A1", + "Standard_A1_v2", + "Standard_A2", + "Standard_A5", + "Standard_D1", + "Standard_D1_v2", + "Standard_DS1", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R7730vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R77.30'), contains(steps('chkp').R7730Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_D3", + "Standard_DS3" + ], + "constraints": { + "excludedSizes": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Standard_A0", + "Standard_A1", + "Standard_A1_v2", + "Standard_A2", + "Standard_A5", + "Standard_D1", + "Standard_D1_v2", + "Standard_DS1", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "visible": "[not(equals(steps('chkp').cloudGuardVersion, 'R80.20'))]", + "defaultValue": "Gateway and Management (Standalone)", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Gateway only", + "value": "gateway" + }, + { + "label": "Gateway and Management (Standalone)", + "value": "standalone" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[and(not(equals(steps('chkp').cloudGuardVersion, 'R80.20')), equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "[or(equals(steps('chkp').installationType, 'gateway'), equals(steps('chkp').cloudGuardVersion, 'R80.20'))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R80.20'), not(equals(steps('chkp').installationType, 'custom')))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Amount of additional disk space (in GB), Initial disk size is 50 GB for R77.30", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[and(not(equals(substring(location(), 0, 2), 'us')), or(contains(steps('chkp').R7730vmSizeUiBYOL, 'DS'), contains(steps('chkp').R7730vmSizeUiNGTP, 'DS')))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R7730Offer, steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R7730vmSizeUiBYOL, steps('chkp').R7730vmSizeUiNGTP)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]" + } + } +} + diff --git a/deprecated/azure/templates/R7730/single-r7730/mainTemplate.json b/deprecated/azure/templates/R7730/single-r7730/mainTemplate.json new file mode 100644 index 00000000..6610c3d1 --- /dev/null +++ b/deprecated/azure/templates/R7730/single-r7730/mainTemplate.json @@ -0,0 +1,524 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R77.30 - Bring Your Own License", + "R77.30 - Pay As You Go (NGTP)" + ], + "defaultValue": "R77.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point vSEC" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "standalone", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "baseUrl": { + "type": "string", + "metadata": { + "artifactsBaseUrl": "" + }, + "defaultValue": "https://s3-us-west-2.amazonaws.com/azure.templates/marketplace-single" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + } + }, + "variables": { + "templateName": "single", + "templateVersion": "20181206", + "location": "[parameters('location')]", + "offers": { + "R77.30 - Bring Your Own License": "BYOL", + "R77.30 - Pay As You Go (NGTP)": "NGTP" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R77.30 - Bring Your Own License": "R7730", + "R77.30 - Pay As You Go (NGTP)": "R7730" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "installationType": "[if(equals(variables('osVersion'), 'R8020'), 'gateway', parameters('installationType'))]", + "isBlink": "[and(or(equals(variables('osVersion'), 'R8010'), equals(variables('osVersion'), 'R8020')), equals(variables('installationType'), 'gateway'))]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2018-01-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR7730": 50, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/bin/bash\n', '\n', 'LOG_FILE=/var/log/custom-data.log\n', 'exec >>$LOG_FILE 2>&1\n', '\n', '# description: echo instance metadata\n', '# args :\n', '# optional: string contatining api version date.\n', '# default is to \"2017-08-01\".\n', '# usage :\n', '# getInstanceMetadata \"2017-12-01\"\n', 'function getInstanceMetadata {\n', ' # get instance metadata using Azure Instance Metadata service:\n', ' if test -z \"$#\" ; then\n', ' api_version=\"$1\"\n', ' else\n', ' api_version=\"2017-08-01\"\n', ' fi\n', ' metadata=\"$(get-cloud-data.sh \"metadata/instance/?api-version=$api_version\" | jq \".\")\"\n', '\n', '\n', ' echo \"$metadata\"\n', ' log-data \"Instance metadata retrieved using api version: $api_version\" >&2\n', '}\n', '\n', '# description: echo $@ to std output wrapped with date and additional data\n', '# args :\n', '# add \"-w\" before the content to log warning message.\n', '# add \"-e\" before the content to log error message.\n', '# default is to log info message.\n', '# usage :\n', '# log-data \"-w\" \"my message\"\n', 'function log-data {\n', ' test -z \"$1\" && echo \"$(date +\"%F %T\") CUSTOM-DATA [INFO]\" || {\n', ' if [[ \"$1\" == \"-w\" ]] ; then\n', ' prefix=\"[WARNING] \"\n', ' shift\n', ' elif [[ \"$1\" == \"-e\" ]] ; then\n', ' prefix=\"[ERROR] \"\n', ' shift\n', ' else\n', ' prefix=\"[INFO] \"\n', ' fi\n', ' for i in \"$@\"; do\n', ' echo -e \"$(date +\"%F %T\") CUSTOM-DATA $prefix$i\"\n', ' shift\n', ' done\n', ' }\n', '}\n', '\n', '# description: wrapper to command to enable retries\n', '# args :\n', '# To specify return codes:\n', '# \"-rc\" followed by string of numbers seperated by a space: \"int1 int2\".\n', '# default is \"0\".\n', '# To specify maximum duration for retries:\n', '# \"-md\" followed by a number: 5.\n', '# default is 8.\n', '# To specift sleep time between retries:\n', '# \"-st\" followed by a number: 1.\n', '# default is 2.\n', '# usage :\n', '# runcmd -rc \"19 0 3\" \"-md\" 6 \"-st\" 1 my-command\n', 'function runcmd {\n', ' expected_returnval=()\n', ' if [ \"$1\" == \"-rc\" ] ; then\n', ' shift\n', ' for val in $1\n', ' do\n', ' expected_returnval[\"$val\"]=\"1\"\n', ' done\n', ' shift\n', ' else\n', ' expected_returnval[\"0\"]=\"1\"\n', ' fi\n', ' if [ \"$1\" == \"-md\" ] ; then\n', ' shift\n', ' MAX_DURATION=$1\n', ' shift\n', ' else\n', ' MAX_DURATION=8\n', ' fi\n', ' if [ \"$1\" == \"-st\" ] ; then\n', ' shift\n', ' SLEEP_TIME=$1\n', ' shift\n', ' else\n', ' SLEEP_TIME=2\n', ' fi\n', ' cmd=\"$@\"\n', ' log-data \"Executing $cmd\" \" Allowed return values : $(echo ${!expected_returnval[@]})\" \" Maximum retries duration : $MAX_DURATION\" \" Sleep time between retries: $SLEEP_TIME\" >&2\n', '\n', '\n', '\n', ' SECONDS=0\n', ' while [ \"$SECONDS\" -lt \"$MAX_DURATION\" ] ; do\n', ' returnmsg=\"$(\"$@\" 2>&1)\"\n', ' returnval=\"$?\"\n', ' if [[ ${expected_returnval[$returnval]} ]] ; then\n', ' log-data \"Success executing: $cmd\n', '\\\\tReturn Value : $(echo $returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\" >&2\n', ' return 0\n', ' fi\n', ' log-data \"-w\" \"Retrying to execute command: $cmd\n', '\\\\tReturn Value : $(echo $returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\" >&2\n', ' sleep \"$SLEEP_TIME\"\n', ' done\n', ' log-data \"-e\" \"Failed to execute command: $cmd\n', '\\\\tReturn Value : $(echo $returnval) (expected: $expected_returnval)\n', '\\\\tReturn message: $(echo $returnmsg)\n', '\\\\tTotal run time: $SECONDS [seconds]\" >&2\n', ' return 1\n', '}\n', '\n', 'log-data \"Start of custom-data.sh\"\n', 'log-data \"Time Zone: $(date +\"%Z %:z\")\"\n', 'log-data \"Instance metadata at beginning: \\\\n$(getInstanceMetadata)\"\n', 'log-data \"Contents of $FWDIR/boot/modules/fwkern.conf at beginning: \\\\n$(cat \"$FWDIR/boot/modules/fwkern.conf\")\"\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', '\n', 'if [ -z \"${isBlink}\" ]; then\n', ' isBlink=\"False\"\n', 'fi\n', '\n', 'log-data \"isBlink val: $isBlink\"\n', '\n', 'log-data \"templateName: $templateName\" \"templateVersion: $templateVersion\" \"installationType: $installationType\" \"osVersion: $osVersion\"\n', '\n', '\n', '\n', '\n', 'echo \"template_name: $templateName\" >> /etc/cloud-version\n', 'echo \"template_version: $templateVersion\" >> /etc/cloud-version\n', '\n', 'log-data \"Executing bootstrap script:\"\n', 'bootstrap=\"$(dirname \"$0\")/bootstrap\"\n', 'cat <<<\"', variables('bootstrapScript64'), '\" | tr -d \"\\n\" | base64 -d >\"$bootstrap\"', '\n', 'dos2unix \"$bootstrap\"\n', 'chmod +x \"$bootstrap\"\n', 'cp \"$bootstrap\" \"/var/log/custom-data-bootstrap\"\n', '\"$bootstrap\"\n', '\n', 'function has_iam {\n', ' local url\n', ' local out\n', ' url=\"http://169.254.169.254/metadata/identity/oauth2/token\"\n', ' url=\"$url?api-version=2018-02-01&resource=https://no-such-domain/\"\n', ' for i in 1 2 3 ; do\n', ' out=\"$(curl_cli --header metadata:true --url \"$url\" --max-time 10)\"\n', ' if test \"$(echo \"$out\" | jq -r .error)\" = \"invalid_resource\" ; then\n', ' echo true\n', ' return\n', ' fi\n', ' if test \"$(echo \"$out\" | jq -r .error_description)\" = \"Identity not found\" ; then\n', '\n', ' break\n', ' fi\n', ' done\n', ' echo false\n', '}\n', '\n', '# description: create file $FWDIR/conf/azure-ha.json\n', '# args : no args\n', '# usage : cluster\n', 'function cluster {\n', ' log-data \"Cluster - Executing cluster function\"\n', ' subscriptionId=\"', subscription().subscriptionId, '\"', '\n', ' tenantId=\"', subscription().tenantId, '\"', '\n', ' resourceGroup=\"', resourceGroup().name, '\"', '\n', ' virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', ' clusterName=\"', parameters('vmName'), '\"', '\n', ' lbName=\"frontend-lb\"\n', ' location=\"', variables('location'), '\"', '\n', ' has_iam=false\n', '\n', ' case \"$location\" in\n', ' us*)\n', ' environment=\"AzureUSGovernment\"\n', ' ;;\n', ' china*)\n', ' environment=\"AzureChinaCloud\"\n', ' ;;\n', ' germany*)\n', ' environment=\"AzureGermanCloud\"\n', ' ;;\n', ' *)\n', ' environment=\"AzureCloud\"\n', ' has_iam=\"$(has_iam)\"\n', ' ;;\n', ' esac\n', '\n', ' cat <\"$FWDIR/conf/azure-ha.json\"\n', '{\n', ' \"subscriptionId\": \"$subscriptionId\",\n', ' \"location\": \"$location\",\n', ' \"environment\": \"$environment\",\n', ' \"resourceGroup\": \"$resourceGroup\",\n', 'EOF\n', ' if $has_iam ; then\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"credentials\": \"IAM\",\n', ' \"tenant\": \"$tenantId\",\n', 'EOF\n', ' else\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"credentials\": {\n', ' \"tenant\": \"$tenantId\",\n', ' \"grant_type\": \"client_credentials\",\n', ' \"client_id\": \"\",\n', ' \"client_secret\": \"\"\n', ' },\n', 'EOF\n', ' fi\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"proxy\": \"\",\n', ' \"virtualNetwork\": \"$virtualNetwork\",\n', ' \"clusterName\": \"$clusterName\",\n', ' \"templateName\": \"$templateName\",\n', 'EOF\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"lbName\": \"$lbName\",\n', 'EOF\n', '\n', '\n', ' cat <>\"$FWDIR/conf/azure-ha.json\"\n', ' \"debug\": false\n', '}\n', 'EOF\n', '\n', ' log-data \"Cluster - Write cluster values to $FWDIR/conf/azure-ha.json\"\n', ' log-data \"File content: \\\\n$(cat \"$FWDIR/conf/azure-ha.json\")\"\n', '}\n', '\n', '# description:\n', '# check if an alias exists on VM, in case there is no alias,\n', '# try to retrieve it from instance metadata & add it\n', '# args : no args.\n', '# usage : pub_addr=\"$(checkPublicAddress)\"\n', 'function checkPublicAddress {\n', ' log-data \"Executing checkPublicAddress function\" >&2\n', ' ipaddr=\"$(ip addr show dev eth0)\"\n', ' pub_addr=\"$(echo \"$ipaddr\" | sed -n -e \"s|^ *inet \\\\([^/]*\\\\)/.* eth0:1\\$|\\\\1|p\")\"\n', '\n', ' log-data \"At start - \" \"ip addr show dev eth0: \\\\n$ipaddr\" \"pub_addr: $pub_addr\" >&2\n', ' if test -z \"$pub_addr\" ; then\n', ' log-data \"Trying to set alias for public ip address\" >&2\n', ' pub_addr=\"$(get-cloud-data.sh \"metadata/instance/network/interface?api-version=2017-04-02\" | jq -r \".[].ipv4.ipAddress[].publicIpAddress\" | grep --max-count 1 .)\"\n', '\n', '\n', '\n', ' log-data \"Public Address from instance metadata: $pub_addr\" >&2\n', ' test -z \"$pub_addr\" || {\n', ' runcmd -rc \"1 0\" clish -c \"lock database override\" >&2\n', ' runcmd clish -s -c \"add interface eth0 alias $pub_addr/32\" >&2\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"Setting alias for eth0 completed successfuly\" >&2\n', ' else\n', ' log-data \"Failed to set alias for eth0\" >&2\n', ' fi\n', ' }\n', ' fi\n', ' log-data \"Interfaces at end: \\\\n$(ifconfig)\" >&2\n', ' test -z \"$pub_addr\" || echo \"$pub_addr\"\n', '}\n', '\n', 'case \"$installationType\" in\n', 'gateway)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=false\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' ;;\n', 'cluster)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=true\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' cluster\n', ' ;;\n', 'vmss)\n', ' installSecurityGateway=true\n', ' gateway_cluster_member=false\n', ' installSecurityManagement=false\n', ' sicKey=\"', variables('sicKey'), '\"', '\n', ' ;;\n', 'management)\n', ' installSecurityGateway=false\n', ' installSecurityManagement=true\n', ' sicKey=notused\n', ' ;;\n', 'custom)\n', ' pub_addr=\"$(checkPublicAddress)\"\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' exit 0\n', ' ;;\n', 'standalone | *)\n', ' installSecurityGateway=true\n', ' installSecurityManagement=true\n', ' gateway_cluster_member=false\n', ' sicKey=notused\n', ' ;;\n', 'esac\n', '\n', 'log-data \"installSecurityGateway: $installSecurityGateway\" \"gateway_cluster_member: $gateway_cluster_member\" \"installSecurityManagement: $installSecurityManagement\"\n', '\n', '\n', '\n', 'if [ \"$isBlink\" == \"True\" ]; then\n', ' if \"$installSecurityManagement\"; then\n', ' conf=\"mgmt_admin_radio=gaia_admin\"\n', ' else\n', ' conf=\"gateway_cluster_member=$gateway_cluster_member\"\n', ' fi\n', ' conf=\"${conf}&download_info=$allowUploadDownload\"\n', ' conf=\"${conf}&upload_info=$allowUploadDownload\"\n', ' log-data \"conf: $conf\"\n', '\n', ' conf=\"${conf}&ftw_sic_key=$sicKey\"\n', '\n', ' log-data \"Running blink config\"\n', ' blink_config -s \"$conf\"\n', 'else\n', ' conf=\"install_security_gw=$installSecurityGateway\"\n', ' if \"$installSecurityGateway\"; then\n', ' conf=\"${conf}&install_ppak=true\"\n', ' conf=\"${conf}&gateway_cluster_member=$gateway_cluster_member\"\n', ' fi\n', ' conf=\"${conf}&install_security_managment=$installSecurityManagement\"\n', ' if \"$installSecurityManagement\"; then\n', ' if [ \"R7730\" == \"$osVersion\" ]; then\n', ' managementAdminPassword=\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\"\n', ' conf=\"${conf}&mgmt_admin_name=admin\"\n', ' conf=\"${conf}&mgmt_admin_passwd=${managementAdminPassword}\"\n', ' else\n', ' conf=\"${conf}&mgmt_admin_radio=gaia_admin\"\n', ' fi\n', '\n', ' managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', ' conf=\"${conf}&install_mgmt_primary=true\"\n', '\n', ' if [ \"0.0.0.0/0\" = \"$managementGUIClientNetwork\" ]; then\n', ' conf=\"${conf}&mgmt_gui_clients_radio=any\"\n', ' else\n', ' conf=\"${conf}&mgmt_gui_clients_radio=network\"\n', ' ManagementGUIClientBase=\"$(echo \"$managementGUIClientNetwork\" | cut -d / -f 1)\"\n', ' ManagementGUIClientMaskLength=\"$(echo \"$managementGUIClientNetwork\" | cut -d / -f 2)\"\n', ' conf=\"${conf}&mgmt_gui_clients_ip_field=$ManagementGUIClientBase\"\n', ' conf=\"${conf}&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength\"\n', ' fi\n', ' fi\n', '\n', ' conf=\"${conf}&download_info=$allowUploadDownload\"\n', ' conf=\"${conf}&upload_info=$allowUploadDownload\"\n', ' log-data \"conf: $conf\"\n', ' # add sicKey value after loging the rest of conf parameters in order not to save the SIC key.\n', ' conf=\"${conf}&ftw_sic_key=$sicKey\"\n', '\n', ' #since DA process is running parallel to FTW and may cause to problems like SIM (TaskId=72815)\n', ' #the DA is being stoped before FTW is running, and restart again after FTW is finished.\n', ' log-data \"Stop DA process: $(/opt/CPda/bin/dastop)\"\n', '\n', ' log-data \"Running first time wizard\"\n', ' config_system -s \"$conf\"\n', '\n', ' log-data \"Start DA process: $(/opt/CPda/bin/dastart)\"\n', 'fi\n', '\n', 'pub_addr=\"$(checkPublicAddress)\"\n', 'log-data \"VM public address is: $pub_addr\"\n', '\n', '# set the main IP of the management object in SmartConsole to be the public IP:\n', 'if [ \"$installationType\" = \"management\" ] && [ \"R7730\" != \"$osVersion\" ]; then\n', ' until mgmt_cli -r true discard ; do\n', ' sleep 30\n', ' done\n', ' addr=\"$(ip addr show dev eth0 | sed -n -e \"s|^ *inet \\\\([^/]*\\\\)/.* eth0\\$|\\\\1|p\")\"\n', '\n', ' uid=\"$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json | jq -r \".objects[] | select(.ipaddr == \\\"$addr\\\") | .uid\")\"\n', '\n', '\n', '\n', ' test -z \"$uid\" || test -z \"$pub_addr\" || mgmt_cli -r true set-generic-object uid \"$uid\" ipaddr \"$pub_addr\"\n', '\n', ' log-data \"Management - Set management object in SmartConsole IP address to $pub_addr\"\n', 'fi\n', 'if \"$installSecurityManagement\" && [ \"R7730\" != \"$osVersion\" ]; then\n', ' chkconfig --add autoprovision\n', ' log-data \"Add autoprovision service to chkconfig\"\n', 'fi\n', '\n', 'if [ \"$installationType\" = \"vmss\" ] || [ \"$installationType\" = \"cluster\" ]; then\n', ' # add dynamic objects to represent the GWs external NICs in management:\n', ' dynamic_object_names=\"$(dynamic_objects -l | awk \"/object/{print \\$4}\")\"\n', ' log-data \"dynamic object names before are: $dynamic_object_names\"\n', ' ExtAddr=\"$(ip addr show dev eth0 | awk \"/inet/{print \\$2; exit}\" | cut -d / -f 1)\"\n', ' runcmd -rc \"19 0 3\" dynamic_objects -n LocalGatewayExternal -r \"$ExtAddr\" \"$ExtAddr\" -a\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"Created dynamic object for eth0\"\n', ' else\n', ' log-data \"Failed to create dynamic object for eth0\"\n', ' fi\n', ' log-data \"Set dynamic objects: (Ext: $ExtAddr) \\\\n$(dynamic_objects -l)\"\n', '\n', ' # Disable anti-spoofing feature in SecureXL for unknown connections.\n', ' # To prevent anti-spoofing on eth1 to drop the health probe queries.\n', ' if [ \"R7730\" != \"$osVersion\" ]; then\n', ' if [ -f /opt/CPshared/5.0/tmp/.CPprofile.sh ]; then\n', ' log-data \"/opt/CPshared/5.0/tmp/.CPprofile.sh exists and is a regular file.\"\n', ' . /opt/CPshared/5.0/tmp/.CPprofile.sh\n', ' log-data \"add sim_anti_spoofing_enabled=0 to $PPKDIR/boot/modules/simkern.conf\"\n', ' echo \"sim_anti_spoofing_enabled=0\" >> \"$PPKDIR/boot/modules/simkern.conf\"\n', ' log-data \"\\$PPKDIR/boot/modules/simkern.conf: \\\\n$(cat $PPKDIR/boot/modules/simkern.conf)\"\n', ' fi\n', ' fi\n', 'fi\n', '\n', 'if [ \"$installationType\" == \"vmss\" ]; then\n', ' # add dynamic objects to represent the GWs internal NICs in management:\n', ' IntAddr=\"$(ip addr show dev eth1 | awk \"/inet/{print \\$2; exit}\" | cut -d / -f 1)\"\n', ' runcmd -rc \"19 0 3\" dynamic_objects -n LocalGatewayInternal -r \"$IntAddr\" \"$IntAddr\" -a\n', ' if [ \"$?\" -eq \"0\" ] ; then\n', ' log-data \"VMSS - created dynamic object for eth1\"\n', ' else\n', ' log-data \"VMSS - failed to create dynamic object for eth1\"\n', ' fi\n', ' log-data \"VMSS - Set dynamic objects: (Int: $IntAddr) \\\\n$(dynamic_objects -l)\"\n', '\n', ' # add static route for all vnet but Frontend to use eth1:\n', ' subnet2Prefix=\"$(getInstanceMetadata | jq -r \".network.interface[1].ipv4.subnet[].address\")\"\n', ' firstThreeOctats=\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 1,2,3)\"\n', ' forthOctats=\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 4)\"\n', ' forthOctats=\"$(( forthOctats + 1 ))\"\n', ' router=\"$firstThreeOctats.$forthOctats\"\n', ' log-data \"Vnet CIDR: $vnet\" \"Internal subnet CIDR: $subnet2Prefix\" \"Internal subnet gateway: $router\"\n', ' vnets=(\"$vnet\" \"10.0.0.0/8\" \"172.16.0.0/12\" \"192.168.0.0/16\")\n', ' runcmd -rc \"1 0\" clish -c \"lock database override\" >&2\n', ' for vnet in \"${vnets[@]}\"; do\n', ' runcmd clish -s -c \"set static-route $vnet nexthop gateway address $router on\"\n', ' if [ \"$?\" == \"0\" ] ; then\n', ' log-data \"Set static-route for vnet: $vnet to router: $router\"\n', ' else\n', ' log-data \"Failed to set static-route for vnet: $vnet to router: $router\"\n', ' fi\n', ' done\n', 'fi\n', '\n', 'log-data \"VM static routes: \\\\n$(route)\"\n', 'log-data \"Contents of $FWDIR/boot/modules/fwkern.conf at end: \\\\n$(cat \"$FWDIR/boot/modules/fwkern.conf\")\"\n', '\n', 'if \"$installSecurityGateway\"; then\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' if [ \"$isBlink\" == \"False\" ] || [ \"$installationType\" == \"cluster\" ]; then\n', ' log-data \"VM is shuting down\"\n', ' shutdown -r now\n', ' fi\n', 'else\n', ' if \"$installSecurityManagement\" && [ \"R7730\" != \"$osVersion\" ]; then\n', ' service autoprovision start\n', ' log-data \"Instance metadata at end: \\\\n$(getInstanceMetadata)\"\n', ' log-data \"Start service autoprovision\"\n', ' fi\n', 'fi\n')]", + "imageOfferR7730": "check-point-r77-10", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReference": "[variables(concat('imageReference', variables('offer')))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration',parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[concat(parameters('baseUrl'), '/vnet-', parameters('vnetNewOrExisting'), '.json')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-769ae546-3d1f-5beb-87f2-918ac09137c0", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[equals(variables('osVersion'), 'R8020')]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[equals(variables('osVersion'), 'R8020')]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[variables('plan')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R7730/single-r7730/vnet-existing.json b/deprecated/azure/templates/R7730/single-r7730/vnet-existing.json new file mode 100644 index 00000000..e8e5bd2f --- /dev/null +++ b/deprecated/azure/templates/R7730/single-r7730/vnet-existing.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Web" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/single-r7730/vnet-new.json b/deprecated/azure/templates/R7730/single-r7730/vnet-new.json new file mode 100644 index 00000000..169a4a3d --- /dev/null +++ b/deprecated/azure/templates/R7730/single-r7730/vnet-new.json @@ -0,0 +1,187 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/vmss-r7730/README.MD b/deprecated/azure/templates/R7730/vmss-r7730/README.MD new file mode 100644 index 00000000..34881c98 --- /dev/null +++ b/deprecated/azure/templates/R7730/vmss-r7730/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*Base Url*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/vmss-r7730 + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R7730/vmss-r7730/createUiDefinition.json b/deprecated/azure/templates/R7730/vmss-r7730/createUiDefinition.json new file mode 100644 index 00000000..4c3c4b53 --- /dev/null +++ b/deprecated/azure/templates/R7730/vmss-r7730/createUiDefinition.json @@ -0,0 +1,385 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maxiumum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "validationMessage": "Field cannot be empty." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Policy template name", + "toolTip": "A name of a template as it appears in the configuration file", + "constraints": { + "required": true, + "validationMessage": "Field cannot be empty." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "vsecVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R77.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R77.30", + "value": "R77.30" + } + ] + } + }, + { + "name": "R7730Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[and(not(or(equals(substring(location(), 0, 5), 'usgov'), equals(substring(location(), 0, 5), 'usdod'))), equals(steps('chkp').vsecVersion, 'R77.30'))]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + } + ] + } + }, + { + "name": "R7730vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').vsecVersion, 'R77.30'), or(or(equals(substring(location(), 0, 5), 'usgov'), equals(substring(location(), 0, 5), 'usdod')), contains(steps('chkp').R7730Offer, 'Bring Your Own License')))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_D3", + "Standard_DS3" + ], + "constraints": { + "excludedSizes": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Standard_A0", + "Standard_A1", + "Standard_A1_v2", + "Standard_A2", + "Standard_A5", + "Standard_G1", + "Standard_GS1", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16", + "Standard_H16m", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-byol" + }, + "count": "[basics('vmCount')]" + }, + { + "name": "R7730vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').vsecVersion, 'R77.30'), contains(steps('chkp').R7730Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_D3", + "Standard_DS3" + ], + "constraints": { + "excludedSizes": [ + "Basic_A0", + "Basic_A1", + "Basic_A2", + "Basic_A3", + "Standard_A0", + "Standard_A1", + "Standard_A1_v2", + "Standard_A2", + "Standard_A5", + "Standard_G1", + "Standard_GS1", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16", + "Standard_H16m", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-r77-10", + "sku": "sg-ngtp" + }, + "count": "[basics('vmCount')]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of vSEC disk.", + "visible": "[and(not(or(equals(substring(location(), 0, 5), 'usgov'), equals(substring(location(), 0, 5), 'usdod'))), or(contains(steps('chkp').R7730vmSizeUiBYOL, 'DS'), contains(steps('chkp').R7730vmSizeUiNGTP, 'DS')))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/25" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS subnet", + "defaultValue": { + "name": "VMSS-Subnet", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[basics('maxVmCount')]", + "requireContiguousAddresses": false + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "instanceCount": "[basics('vmCount')]", + "maxInstanceCount": "[basics('maxVmCount')]", + "managementServer": "[basics('managementServer')]", + "configurationTemplate": "[basics('configurationTemplate')]", + "adminEmail": "[basics('adminEmail')]", + "vsecVersion": "[concat(steps('chkp').vsecVersion, ' - ', coalesce(steps('chkp').R7730Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "vmSize": "[coalesce(steps('chkp').R7730vmSizeUiBYOL, steps('chkp').R7730vmSizeUiNGTP)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]" + } + } +} + diff --git a/deprecated/azure/templates/R7730/vmss-r7730/mainTemplate.json b/deprecated/azure/templates/R7730/vmss-r7730/mainTemplate.json new file mode 100644 index 00000000..67b0aef5 --- /dev/null +++ b/deprecated/azure/templates/R7730/vmss-r7730/mainTemplate.json @@ -0,0 +1,678 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + } + }, + "vsecVersion": { + "type": "string", + "allowedValues": [ + "R77.30 - Bring Your Own License", + "R77.30 - Pay As You Go (NGTP)" + ], + "defaultValue": "R77.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point vSEC" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vn')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the subnet" + }, + "defaultValue": "vSEC" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "baseUrl": { + "type": "string", + "metadata": { + "artifactsBaseUrl": "" + }, + "defaultValue": "https://s3-us-west-2.amazonaws.com/azure.templates/marketplace-vmss-r7730" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + } + }, + "variables": { + "templateName": "vmss", + "templateVersion": "", + "location": "[parameters('location')]", + "govCloud": "[or(startsWith(variables('location'), 'usgov'), startsWith(variables('location'), 'usdod'))]", + "offers": { + "R77.30 - Bring Your Own License": "BYOL", + "R77.30 - Pay As You Go (NGTP)": "NGTP", + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('vsecVersion')]]", + "osVersions": { + "R77.30 - Bring Your Own License": "R7730", + "R77.30 - Pay As You Go (NGTP)": "R7730", + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010" + }, + "osVersion": "[variables('osVersions')[parameters('vsecVersion')]]", + "isBlink": "[bool('false')]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2016-06-01", + "deploymentsApiVersion": "2016-02-01", + "insightsApiVersion": "2015-04-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "customData": "[concat('#!/bin/bash\\n', '\\n', 'LOG_FILE=/var/log/custom-data.log\\n', 'exec >>$LOG_FILE 2>&1\\n', '\\n', '# description: echo instance metadata\\n', '# args :\\n', '# optional: string contatining api version date.\\n', '# default is to \\\"2017-08-01\\\".\\n', '# usage :\\n', '# getInstanceMetadata \\\"2017-12-01\\\"\\n', 'function getInstanceMetadata {\\n', ' # get instance metadata using Azure Instance Metadata service:\\n', ' if test -z \\\"$#\\\" ; then\\n', ' api_version=\\\"$1\\\"\\n', ' else\\n', ' api_version=\\\"2017-08-01\\\"\\n', ' fi\\n', ' metadata=\\\"$(get-cloud-data.sh \\\"metadata/instance/?api-version=$api_version\\\" | jq \\\".\\\")\\\"\\n', '\\n', '\\n', ' echo \\\"$metadata\\\"\\n', ' log-data \\\"Instance metadata retrieved using api version: $api_version\\\" >&2\\n', '}\\n', '\\n', '# description: echo $@ to std output wrapped with date and additional data\\n', '# args :\\n', '# add \\\"-w\\\" before the content to log warning message.\\n', '# add \\\"-e\\\" before the content to log error message.\\n', '# default is to log info message.\\n', '# usage :\\n', '# log-data \\\"-w\\\" \\\"my message\\\"\\n', 'function log-data {\\n', ' test -z \\\"$1\\\" && echo \\\"$(date +\\\"%F %T\\\") CUSTOM-DATA [INFO]\\\" || {\\n', ' if [[ \\\"$1\\\" == \\\"-w\\\" ]] ; then\\n', ' prefix=\\\"[WARNING] \\\"\\n', ' shift\\n', ' elif [[ \\\"$1\\\" == \\\"-e\\\" ]] ; then\\n', ' prefix=\\\"[ERROR] \\\"\\n', ' shift\\n', ' else\\n', ' prefix=\\\"[INFO] \\\"\\n', ' fi\\n', ' for i in \\\"$@\\\"; do\\n', ' echo -e \\\"$(date +\\\"%F %T\\\") CUSTOM-DATA $prefix$i\\\"\\n', ' shift\\n', ' done\\n', ' }\\n', '}\\n', '\\n', '# description: wrapper to command to enable retries\\n', '# args :\\n', '# To specify return codes:\\n', '# \\\"-rc\\\" followed by string of numbers seperated by a space: \\\"int1 int2\\\".\\n', '# default is \\\"0\\\".\\n', '# To specify maximum duration for retries:\\n', '# \\\"-md\\\" followed by a number: 5.\\n', '# default is 8.\\n', '# To specift sleep time between retries:\\n', '# \\\"-st\\\" followed by a number: 1.\\n', '# default is 2.\\n', '# usage :\\n', '# runcmd -rc \\\"19 0 3\\\" \\\"-md\\\" 6 \\\"-st\\\" 1 my-command\\n', 'function runcmd {\\n', ' expected_returnval=()\\n', ' if [ \\\"$1\\\" == \\\"-rc\\\" ] ; then\\n', ' shift\\n', ' for val in $1\\n', ' do\\n', ' expected_returnval[\\\"$val\\\"]=\\\"1\\\"\\n', ' done\\n', ' shift\\n', ' else\\n', ' expected_returnval[\\\"0\\\"]=\\\"1\\\"\\n', ' fi\\n', ' if [ \\\"$1\\\" == \\\"-md\\\" ] ; then\\n', ' shift\\n', ' MAX_DURATION=$1\\n', ' shift\\n', ' else\\n', ' MAX_DURATION=8\\n', ' fi\\n', ' if [ \\\"$1\\\" == \\\"-st\\\" ] ; then\\n', ' shift\\n', ' SLEEP_TIME=$1\\n', ' shift\\n', ' else\\n', ' SLEEP_TIME=2\\n', ' fi\\n', ' cmd=\\\"$@\\\"\\n', ' log-data \\\"Executing $cmd\\\" \\\" Allowed return values : $(echo ${!expected_returnval[@]})\\\" \\\" Maximum retries duration : $MAX_DURATION\\\" \\\" Sleep time between retries: $SLEEP_TIME\\\" >&2\\n', '\\n', '\\n', '\\n', ' SECONDS=0\\n', ' while [ \\\"$SECONDS\\\" -lt \\\"$MAX_DURATION\\\" ] ; do\\n', ' returnmsg=\\\"$(\\\"$@\\\" 2>&1)\\\"\\n', ' returnval=\\\"$?\\\"\\n', ' if [[ ${expected_returnval[$returnval]} ]] ; then\\n', ' log-data \\\"Success executing: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\\" >&2\\n', ' return 0\\n', ' fi\\n', ' log-data \\\"-w\\\" \\\"Retrying to execute command: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\\" >&2\\n', ' sleep \\\"$SLEEP_TIME\\\"\\n', ' done\\n', ' log-data \\\"-e\\\" \\\"Failed to execute command: $cmd\\n', '\\\\\\\\tReturn Value : $(echo $returnval) (expected: $expected_returnval)\\n', '\\\\\\\\tReturn message: $(echo $returnmsg)\\n', '\\\\\\\\tTotal run time: $SECONDS [seconds]\\\" >&2\\n', ' return 1\\n', '}\\n', '\\n', 'log-data \\\"Start of custom-data.sh\\\"\\n', 'log-data \\\"Time Zone: $(date +\\\"%Z %:z\\\")\\\"\\n', 'log-data \\\"Instance metadata at beginning: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', 'log-data \\\"Contents of $FWDIR/boot/modules/fwkern.conf at beginning: \\\\\\\\n$(cat \\\"$FWDIR/boot/modules/fwkern.conf\\\")\\\"\\n', '\\n', 'installationType=\\\"', variables('installationType'), '\\\"', '\\n', 'allowUploadDownload=\\\"', variables('allowUploadDownload'), '\\\"', '\\n', 'osVersion=\\\"', variables('osVersion'), '\\\"', '\\n', 'templateName=\\\"', variables('templateName'), '\\\"', '\\n', 'isBlink=\\\"', variables('isBlink'), '\\\"', '\\n', 'templateVersion=\\\"', variables('templateVersion'), '\\\"', '\\n', '\\n', 'if [ -z \\\"${isBlink}\\\" ]; then\\n', ' isBlink=\\\"False\\\"\\n', 'fi\\n', '\\n', 'log-data \\\"isBlink val: $isBlink\\\"\\n', '\\n', 'log-data \\\"templateName: $templateName\\\" \\\"templateVersion: $templateVersion\\\" \\\"installationType: $installationType\\\" \\\"osVersion: $osVersion\\\"\\n', '\\n', '\\n', '\\n', '\\n', 'echo \\\"template_name: $templateName\\\" >> /etc/cloud-version\\n', 'echo \\\"template_version: $templateVersion\\\" >> /etc/cloud-version\\n', '\\n', 'log-data \\\"Executing bootstrap script:\\\"\\n', 'bootstrap=\\\"$(dirname \\\"$0\\\")/bootstrap\\\"\\n', 'cat <<<\\\"', variables('bootstrapScript64'), '\\\" | tr -d \\\"\\\\n\\\" | base64 -d >\\\"$bootstrap\\\"', '\\n', 'dos2unix \\\"$bootstrap\\\"\\n', 'chmod +x \\\"$bootstrap\\\"\\n', 'cp \\\"$bootstrap\\\" \\\"/var/log/custom-data-bootstrap\\\"\\n', '\\\"$bootstrap\\\"\\n', '\\n', 'function has_iam {\\n', ' local url\\n', ' local out\\n', ' url=\\\"http://169.254.169.254/metadata/identity/oauth2/token\\\"\\n', ' url=\\\"$url?api-version=2018-02-01&resource=https://no-such-domain/\\\"\\n', ' for i in 1 2 3 ; do\\n', ' out=\\\"$(curl_cli --header metadata:true --url \\\"$url\\\" --max-time 10)\\\"\\n', ' if test \\\"$(echo \\\"$out\\\" | jq -r .error)\\\" = \\\"invalid_resource\\\" ; then\\n', ' echo true\\n', ' return\\n', ' fi\\n', ' if test \\\"$(echo \\\"$out\\\" | jq -r .error_description)\\\" = \\\"Identity not found\\\" ; then\\n', '\\n', ' break\\n', ' fi\\n', ' done\\n', ' echo false\\n', '}\\n', '\\n', '# description: create file $FWDIR/conf/azure-ha.json\\n', '# args : no args\\n', '# usage : cluster\\n', 'function cluster {\\n', ' log-data \\\"Cluster - Executing cluster function\\\"\\n', ' subscriptionId=\\\"', subscription().subscriptionId, '\\\"', '\\n', ' tenantId=\\\"', subscription().tenantId, '\\\"', '\\n', ' resourceGroup=\\\"', resourceGroup().name, '\\\"', '\\n', ' virtualNetwork=\\\"', parameters('virtualNetworkName'), '\\\"', '\\n', ' clusterName=\\\"', parameters('vmName'), '\\\"', '\\n', ' lbName=\\\"frontend-lb\\\"\\n', ' location=\\\"', variables('location'), '\\\"', '\\n', ' has_iam=false\\n', '\\n', ' case \\\"$location\\\" in\\n', ' us*)\\n', ' environment=\\\"AzureUSGovernment\\\"\\n', ' ;;\\n', ' china*)\\n', ' environment=\\\"AzureChinaCloud\\\"\\n', ' ;;\\n', ' germany*)\\n', ' environment=\\\"AzureGermanCloud\\\"\\n', ' ;;\\n', ' *)\\n', ' environment=\\\"AzureCloud\\\"\\n', ' has_iam=\\\"$(has_iam)\\\"\\n', ' ;;\\n', ' esac\\n', '\\n', ' cat <\\\"$FWDIR/conf/azure-ha.json\\\"\\n', '{\\n', ' \\\"subscriptionId\\\": \\\"$subscriptionId\\\",\\n', ' \\\"location\\\": \\\"$location\\\",\\n', ' \\\"environment\\\": \\\"$environment\\\",\\n', ' \\\"resourceGroup\\\": \\\"$resourceGroup\\\",\\n', 'EOF\\n', ' if $has_iam ; then\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"credentials\\\": \\\"IAM\\\",\\n', ' \\\"tenant\\\": \\\"$tenantId\\\",\\n', 'EOF\\n', ' else\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"credentials\\\": {\\n', ' \\\"tenant\\\": \\\"$tenantId\\\",\\n', ' \\\"grant_type\\\": \\\"client_credentials\\\",\\n', ' \\\"client_id\\\": \\\"\\\",\\n', ' \\\"client_secret\\\": \\\"\\\"\\n', ' },\\n', 'EOF\\n', ' fi\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"proxy\\\": \\\"\\\",\\n', ' \\\"virtualNetwork\\\": \\\"$virtualNetwork\\\",\\n', ' \\\"clusterName\\\": \\\"$clusterName\\\",\\n', ' \\\"templateName\\\": \\\"$templateName\\\",\\n', 'EOF\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"lbName\\\": \\\"$lbName\\\",\\n', 'EOF\\n', '\\n', '\\n', ' cat <>\\\"$FWDIR/conf/azure-ha.json\\\"\\n', ' \\\"debug\\\": false\\n', '}\\n', 'EOF\\n', '\\n', ' log-data \\\"Cluster - Write cluster values to $FWDIR/conf/azure-ha.json\\\"\\n', ' log-data \\\"File content: \\\\\\\\n$(cat \\\"$FWDIR/conf/azure-ha.json\\\")\\\"\\n', '}\\n', '\\n', '# description:\\n', '# check if an alias exists on VM, in case there is no alias,\\n', '# try to retrieve it from instance metadata & add it\\n', '# args : no args.\\n', '# usage : pub_addr=\\\"$(checkPublicAddress)\\\"\\n', 'function checkPublicAddress {\\n', ' log-data \\\"Executing checkPublicAddress function\\\" >&2\\n', ' ipaddr=\\\"$(ip addr show dev eth0)\\\"\\n', ' pub_addr=\\\"$(echo \\\"$ipaddr\\\" | sed -n -e \\\"s|^ *inet \\\\\\\\([^/]*\\\\\\\\)/.* eth0:1\\\\$|\\\\\\\\1|p\\\")\\\"\\n', '\\n', ' log-data \\\"At start - \\\" \\\"ip addr show dev eth0: \\\\\\\\n$ipaddr\\\" \\\"pub_addr: $pub_addr\\\" >&2\\n', ' if test -z \\\"$pub_addr\\\" ; then\\n', ' log-data \\\"Trying to set alias for public ip address\\\" >&2\\n', ' pub_addr=\\\"$(get-cloud-data.sh \\\"metadata/instance/network/interface?api-version=2017-04-02\\\" | jq -r \\\".[].ipv4.ipAddress[].publicIpAddress\\\" | grep --max-count 1 .)\\\"\\n', '\\n', '\\n', '\\n', ' log-data \\\"Public Address from instance metadata: $pub_addr\\\" >&2\\n', ' test -z \\\"$pub_addr\\\" || {\\n', ' runcmd -rc \\\"1 0\\\" clish -c \\\"lock database override\\\" >&2\\n', ' runcmd clish -s -c \\\"add interface eth0 alias $pub_addr/32\\\" >&2\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"Setting alias for eth0 completed successfuly\\\" >&2\\n', ' else\\n', ' log-data \\\"Failed to set alias for eth0\\\" >&2\\n', ' fi\\n', ' }\\n', ' fi\\n', ' log-data \\\"Interfaces at end: \\\\\\\\n$(ifconfig)\\\" >&2\\n', ' test -z \\\"$pub_addr\\\" || echo \\\"$pub_addr\\\"\\n', '}\\n', '\\n', 'case \\\"$installationType\\\" in\\n', 'gateway)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=false\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' ;;\\n', 'cluster)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=true\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' cluster\\n', ' ;;\\n', 'vmss)\\n', ' installSecurityGateway=true\\n', ' gateway_cluster_member=false\\n', ' installSecurityManagement=false\\n', ' sicKey=\\\"', variables('sicKey'), '\\\"', '\\n', ' ;;\\n', 'management)\\n', ' installSecurityGateway=false\\n', ' installSecurityManagement=true\\n', ' sicKey=notused\\n', ' ;;\\n', 'custom)\\n', ' pub_addr=\\\"$(checkPublicAddress)\\\"\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' exit 0\\n', ' ;;\\n', 'standalone | *)\\n', ' installSecurityGateway=true\\n', ' installSecurityManagement=true\\n', ' gateway_cluster_member=false\\n', ' sicKey=notused\\n', ' ;;\\n', 'esac\\n', '\\n', 'log-data \\\"installSecurityGateway: $installSecurityGateway\\\" \\\"gateway_cluster_member: $gateway_cluster_member\\\" \\\"installSecurityManagement: $installSecurityManagement\\\"\\n', '\\n', '\\n', '\\n', 'if [ \\\"$isBlink\\\" == \\\"True\\\" ]; then\\n', ' if \\\"$installSecurityManagement\\\"; then\\n', ' conf=\\\"mgmt_admin_radio=gaia_admin\\\"\\n', ' else\\n', ' conf=\\\"gateway_cluster_member=$gateway_cluster_member\\\"\\n', ' fi\\n', ' conf=\\\"${conf}&download_info=$allowUploadDownload\\\"\\n', ' conf=\\\"${conf}&upload_info=$allowUploadDownload\\\"\\n', ' log-data \\\"conf: $conf\\\"\\n', '\\n', ' conf=\\\"${conf}&ftw_sic_key=$sicKey\\\"\\n', ' # temporary variable as blink config demands password (for now) this way the blink_config command works and does not override admin password\\n', ' if [ \\\"$osVersion\\\" == \\\"R8010\\\" ]; then\\n', ' conf=\\\"${conf}&admin_password_regular=1\\\"\\n', ' fi\\n', ' log-data \\\"Running blink config\\\"\\n', ' blink_config -s \\\"$conf\\\"\\n', 'else\\n', ' conf=\\\"install_security_gw=$installSecurityGateway\\\"\\n', ' if \\\"$installSecurityGateway\\\"; then\\n', ' conf=\\\"${conf}&install_ppak=true\\\"\\n', ' conf=\\\"${conf}&gateway_cluster_member=$gateway_cluster_member\\\"\\n', ' fi\\n', ' conf=\\\"${conf}&install_security_managment=$installSecurityManagement\\\"\\n', ' if \\\"$installSecurityManagement\\\"; then\\n', ' if [ \\\"R7730\\\" == \\\"$osVersion\\\" ]; then\\n', ' managementAdminPassword=\\\"$(dd if=/dev/urandom count=1 2>/dev/null | sha1sum | cut -c -28)\\\"\\n', ' conf=\\\"${conf}&mgmt_admin_name=admin\\\"\\n', ' conf=\\\"${conf}&mgmt_admin_passwd=${managementAdminPassword}\\\"\\n', ' else\\n', ' conf=\\\"${conf}&mgmt_admin_radio=gaia_admin\\\"\\n', ' fi\\n', '\\n', ' managementGUIClientNetwork=\\\"', variables('managementGUIClientNetwork'), '\\\"', '\\n', ' conf=\\\"${conf}&install_mgmt_primary=true\\\"\\n', '\\n', ' if [ \\\"0.0.0.0/0\\\" = \\\"$managementGUIClientNetwork\\\" ]; then\\n', ' conf=\\\"${conf}&mgmt_gui_clients_radio=any\\\"\\n', ' else\\n', ' conf=\\\"${conf}&mgmt_gui_clients_radio=network\\\"\\n', ' ManagementGUIClientBase=\\\"$(echo \\\"$managementGUIClientNetwork\\\" | cut -d / -f 1)\\\"\\n', ' ManagementGUIClientMaskLength=\\\"$(echo \\\"$managementGUIClientNetwork\\\" | cut -d / -f 2)\\\"\\n', ' conf=\\\"${conf}&mgmt_gui_clients_ip_field=$ManagementGUIClientBase\\\"\\n', ' conf=\\\"${conf}&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength\\\"\\n', ' fi\\n', ' fi\\n', '\\n', ' conf=\\\"${conf}&download_info=$allowUploadDownload\\\"\\n', ' conf=\\\"${conf}&upload_info=$allowUploadDownload\\\"\\n', ' log-data \\\"conf: $conf\\\"\\n', ' # add sicKey value after loging the rest of conf parameters in order not to save the SIC key.\\n', ' conf=\\\"${conf}&ftw_sic_key=$sicKey\\\"\\n', '\\n', ' #since DA process is running parallel to FTW and may cause to problems like SIM (TaskId=72815)\\n', ' #the DA is being stoped before FTW is running, and restart again after FTW is finished.\\n', ' log-data \\\"Stop DA process: $(/opt/CPda/bin/dastop)\\\"\\n', '\\n', ' log-data \\\"Running first time wizard\\\"\\n', ' config_system -s \\\"$conf\\\"\\n', '\\n', ' log-data \\\"Start DA process: $(/opt/CPda/bin/dastart)\\\"\\n', 'fi\\n', '\\n', 'pub_addr=\\\"$(checkPublicAddress)\\\"\\n', 'log-data \\\"VM public address is: $pub_addr\\\"\\n', '\\n', '# set the main IP of the management object in SmartConsole to be the public IP:\\n', 'if [ \\\"$installationType\\\" = \\\"management\\\" ] && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' until mgmt_cli -r true discard ; do\\n', ' sleep 30\\n', ' done\\n', ' addr=\\\"$(ip addr show dev eth0 | sed -n -e \\\"s|^ *inet \\\\\\\\([^/]*\\\\\\\\)/.* eth0\\\\$|\\\\\\\\1|p\\\")\\\"\\n', '\\n', ' uid=\\\"$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json | jq -r \\\".objects[] | select(.ipaddr == \\\\\\\"$addr\\\\\\\") | .uid\\\")\\\"\\n', '\\n', '\\n', '\\n', ' test -z \\\"$uid\\\" || test -z \\\"$pub_addr\\\" || mgmt_cli -r true set-generic-object uid \\\"$uid\\\" ipaddr \\\"$pub_addr\\\"\\n', '\\n', ' log-data \\\"Management - Set management object in SmartConsole IP address to $pub_addr\\\"\\n', 'fi\\n', 'if \\\"$installSecurityManagement\\\" && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' chkconfig --add autoprovision\\n', ' log-data \\\"Add autoprovision service to chkconfig\\\"\\n', 'fi\\n', '\\n', 'if [ \\\"$installationType\\\" = \\\"vmss\\\" ] || [ \\\"$installationType\\\" = \\\"cluster\\\" ]; then\\n', ' # add dynamic objects to represent the GWs external NICs in management:\\n', ' dynamic_object_names=\\\"$(dynamic_objects -l | awk \\\"/object/{print \\\\$4}\\\")\\\"\\n', ' log-data \\\"dynamic object names before are: $dynamic_object_names\\\"\\n', ' ExtAddr=\\\"$(ip addr show dev eth0 | awk \\\"/inet/{print \\\\$2; exit}\\\" | cut -d / -f 1)\\\"\\n', ' runcmd -rc \\\"19 0 3\\\" dynamic_objects -n LocalGatewayExternal -r \\\"$ExtAddr\\\" \\\"$ExtAddr\\\" -a\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"Created dynamic object for eth0\\\"\\n', ' else\\n', ' log-data \\\"Failed to create dynamic object for eth0\\\"\\n', ' fi\\n', ' log-data \\\"Set dynamic objects: (Ext: $ExtAddr) \\\\\\\\n$(dynamic_objects -l)\\\"\\n', '\\n', ' # Disable anti-spoofing feature in SecureXL for unknown connections.\\n', ' # To prevent anti-spoofing on eth1 to drop the health probe queries.\\n', ' if [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' if [ -f /opt/CPshared/5.0/tmp/.CPprofile.sh ]; then\\n', ' log-data \\\"/opt/CPshared/5.0/tmp/.CPprofile.sh exists and is a regular file.\\\"\\n', ' . /opt/CPshared/5.0/tmp/.CPprofile.sh\\n', ' log-data \\\"add sim_anti_spoofing_enabled=0 to $PPKDIR/boot/modules/simkern.conf\\\"\\n', ' echo \\\"sim_anti_spoofing_enabled=0\\\" >> \\\"$PPKDIR/boot/modules/simkern.conf\\\"\\n', ' log-data \\\"\\\\$PPKDIR/boot/modules/simkern.conf: \\\\\\\\n$(cat $PPKDIR/boot/modules/simkern.conf)\\\"\\n', ' fi\\n', ' fi\\n', 'fi\\n', '\\n', 'if [ \\\"$installationType\\\" == \\\"vmss\\\" ]; then\\n', ' # add dynamic objects to represent the GWs internal NICs in management:\\n', ' IntAddr=\\\"$(ip addr show dev eth1 | awk \\\"/inet/{print \\\\$2; exit}\\\" | cut -d / -f 1)\\\"\\n', ' runcmd -rc \\\"19 0 3\\\" dynamic_objects -n LocalGatewayInternal -r \\\"$IntAddr\\\" \\\"$IntAddr\\\" -a\\n', ' if [ \\\"$?\\\" -eq \\\"0\\\" ] ; then\\n', ' log-data \\\"VMSS - created dynamic object for eth1\\\"\\n', ' else\\n', ' log-data \\\"VMSS - failed to create dynamic object for eth1\\\"\\n', ' fi\\n', ' log-data \\\"VMSS - Set dynamic objects: (Int: $IntAddr) \\\\\\\\n$(dynamic_objects -l)\\\"\\n', '\\n', ' # add static route for all vnet but Frontend to use eth1:\\n', ' subnet2Prefix=\\\"$(getInstanceMetadata | jq -r \\\".network.interface[1].ipv4.subnet[].address\\\")\\\"\\n', ' firstThreeOctats=\\\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 1,2,3)\\\"\\n', ' forthOctats=\\\"$(echo $subnet2Prefix | cut -d / -f 1 | cut -d . -f 4)\\\"\\n', ' forthOctats=\\\"$(( forthOctats + 1 ))\\\"\\n', ' router=\\\"$firstThreeOctats.$forthOctats\\\"\\n', ' log-data \\\"Vnet CIDR: $vnet\\\" \\\"Internal subnet CIDR: $subnet2Prefix\\\" \\\"Internal subnet gateway: $router\\\"\\n', ' vnets=(\\\"$vnet\\\" \\\"10.0.0.0/8\\\" \\\"172.16.0.0/12\\\" \\\"192.168.0.0/16\\\")\\n', ' runcmd -rc \\\"1 0\\\" clish -c \\\"lock database override\\\" >&2\\n', ' for vnet in \\\"${vnets[@]}\\\"; do\\n', ' runcmd clish -s -c \\\"set static-route $vnet nexthop gateway address $router on\\\"\\n', ' if [ \\\"$?\\\" == \\\"0\\\" ] ; then\\n', ' log-data \\\"Set static-route for vnet: $vnet to router: $router\\\"\\n', ' else\\n', ' log-data \\\"Failed to set static-route for vnet: $vnet to router: $router\\\"\\n', ' fi\\n', ' done\\n', 'fi\\n', '\\n', 'log-data \\\"VM static routes: \\\\\\\\n$(route)\\\"\\n', 'log-data \\\"Contents of $FWDIR/boot/modules/fwkern.conf at end: \\\\\\\\n$(cat \\\"$FWDIR/boot/modules/fwkern.conf\\\")\\\"\\n', '\\n', 'if \\\"$installSecurityGateway\\\"; then\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' if [ \\\"$isBlink\\\" == \\\"False\\\" ] || [ \\\"$installationType\\\" == \\\"cluster\\\" ]; then\\n', ' log-data \\\"VM is shuting down\\\"\\n', ' shutdown -r now\\n', ' fi\\n', 'else\\n', ' if \\\"$installSecurityManagement\\\" && [ \\\"R7730\\\" != \\\"$osVersion\\\" ]; then\\n', ' service autoprovision start\\n', ' log-data \\\"Instance metadata at end: \\\\\\\\n$(getInstanceMetadata)\\\"\\n', ' log-data \\\"Start service autoprovision\\\"\\n', ' fi\\n', 'fi\\n')]", + "imageOfferR7730": "check-point-r77-10", + "imageOfferR8010": "check-point-vsec-r80", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReference": "[variables(concat('imageReference', variables('offer')))]", + "lbName": "[concat(parameters('vmName'), '-lb')]", + "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]", + "proxySubnet": "[parameters('subnet1Name')]", + "lbBEAddressPool": "[concat(parameters('vmName'), '-pool')]", + "lbBEAddressPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbBEAddressPool'))]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "appAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName'))]", + "appProtocol": "http", + "appFrontEndPort": 80, + "appBackEndPort": 8081, + "appFEName": "[variables('appName')]", + "appFEIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('appFEName'))]", + "appProbeName": "[variables('appName')]", + "appProbeID": "[concat(variables('lbID'),'/probes/',variables('appProbeName'))]", + "proxyName": "[concat(parameters('vmName'), '-proxy')]", + "proxyID": "[resourceId('Microsoft.Network/loadBalancers', variables('proxyName'))]", + "proxyBEAddressPool": "[concat(parameters('vmName'), '-proxy')]", + "proxyBEAddressPoolID": "[concat(variables('proxyID'), '/backendAddressPools/', variables('proxyBEAddressPool'))]", + "proxyPort": 8080, + "proxyFEIPConfigID": "[concat(variables('proxyID'), '/frontendIPConfigurations/', variables('proxyName'))]", + "proxyProbeName": "[variables('proxyName')]", + "proxyProbeID": "[concat(variables('proxyID'), '/probes/', variables('proxyProbeName'))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "emailSelector": [ + [], + [ + "[parameters('adminEmail')]" + ] + ], + "customEmails": "[variables('emailSelector')[length(take(parameters('adminEmail'), 1))]]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[concat(parameters('baseUrl'),'/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "vmss" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-dec47419-7c4a-5b38-94eb-1fd4e71be091", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('appAddressName')]", + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "apiVersion": "[variables('networkApiVersion')]", + "name": "[variables('lbName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('appAddressId')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[variables('appAddressId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('lbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('appFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('lbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('appProbeID')]" + }, + "protocol": "tcp", + "frontendPort": "[variables('appFrontEndPort')]", + "backendPort": "[variables('appBackEndPort')]", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appProtocol')]", + "port": "[variables('appBackEndPort')]", + "intervalInSeconds": "15", + "numberOfProbes": "5", + "requestPath": "/" + } + } + ] + } + }, + { + "apiVersion": "[variables('networkApiVersion')]", + "name": "[variables('proxyName')]", + "type": "Microsoft.Network/loadBalancers", + "location": "[variables('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('proxyName')]", + "properties": { + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', variables('proxySubnet'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('proxyBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('proxyName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('proxyFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('proxyBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('proxyProbeID')]" + }, + "protocol": "tcp", + "frontendPort": "[variables('proxyPort')]", + "backendPort": "[variables('proxyPort')]", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('proxyProbeName')]", + "properties": { + "protocol": "tcp", + "port": "[variables('proxyPort')]", + "intervalInSeconds": "15", + "numberOfProbes": "5" + } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "[variables('computeApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "tags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "private" + }, + "dependsOn": [ + "[variables('lbID')]", + "[variables('proxyID')]", + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[variables('plan')]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbBEAddressPoolID')]" + }, + { + "id": "[variables('proxyBEAddressPoolID')]" + } + ] + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "[variables('insightsApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[variables('customEmails')]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference(variables('appAddressId')).IpAddress]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference(variables('appAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-existing.json b/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-existing.json new file mode 100644 index 00000000..fd9b75d1 --- /dev/null +++ b/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-existing.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-new.json b/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-new.json new file mode 100644 index 00000000..e443a759 --- /dev/null +++ b/deprecated/azure/templates/R7730/vmss-r7730/vnet-1-subnet-new.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/cluster-r8010/README.MD b/deprecated/azure/templates/R8010-R8020/cluster-r8010/README.MD new file mode 100644 index 00000000..3dcafb5c --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/cluster-r8010/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/cluster-r8010/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8010-R8020/cluster-r8010/createUiDefinition.json b/deprecated/azure/templates/R8010-R8020/cluster-r8010/createUiDefinition.json new file mode 100644 index 00000000..13032428 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/cluster-r8010/createUiDefinition.json @@ -0,0 +1,380 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "clusterNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Name", + "toolTip": "The name of the cluster.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster settings", + "subLabel": { + "preValidation": "Configure Cluster settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.10", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.10", + "value": "R80.10" + } + ] + } + }, + { + "name": "R8010Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[equals(steps('chkp').cloudGuardVersion, 'R80.10')]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8010vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R8010Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8010vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R8010Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtp-v2" + }, + "count": 2 + }, + { + "name": "R8010vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R8010Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R7730Offer, steps('chkp').R8010Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiNGTP, steps('chkp').R8010vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/cluster-r8010/mainTemplate.json b/deprecated/azure/templates/R8010-R8020/cluster-r8010/mainTemplate.json new file mode 100644 index 00000000..4b0a5d83 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/cluster-r8010/mainTemplate.json @@ -0,0 +1,731 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + } + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.10 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Cluster" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "role": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Role" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "templateName": "cluster", + "templateVersion": "20191118", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010" + }, + "isBlink": "[equals(variables('osVersion'), 'R8010')]", + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2016-06-01", + "authorizationApiVersion": "2017-05-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8010": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80-blink-v2", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "lbId": "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "lbName": "frontend-lb", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), concat('/subscriptions/',subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[if(empty(variables('roleDefinitionId')), json('null'), json('{\"type\": \"SystemAssigned\"}'))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('Subnet1StartAddress'), '.')[0],'.', split(parameters('Subnet1StartAddress'), '.')[1],'.', split(parameters('Subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('Subnet1StartAddress'), '.')[0],'.', split(parameters('Subnet1StartAddress'), '.')[1],'.', split(parameters('Subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet1StartAddress'), '.')[3]),2)))]" + ], + "Subnet2PrivateAddresses": [ + "[parameters('Subnet2StartAddress')]", + "[concat(split(parameters('Subnet2StartAddress'), '.')[0],'.', split(parameters('Subnet2StartAddress'), '.')[1],'.', split(parameters('Subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('Subnet2StartAddress'), '.')[0],'.', split(parameters('Subnet2StartAddress'), '.')[1],'.', split(parameters('Subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('Subnet2StartAddress'), '.')[3]),2)))]" + ], + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('vmName'))]", + "publicIPAddressIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "cluster" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-02f0149c-45d1-561e-bd46-1121af3376e0", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressIds')[0]]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressIds')[0]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressIds')[1]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "copy": { + "name": "nic2Copy", + "count": "[variables('count')]" + }, + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('Subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(empty(variables('roleDefinitionId')))]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(concat('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), variables('computeApiVersion'), 'Full').identity.principalId]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "ClusterIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "ClusterFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressIds')[1]).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-existing.json b/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-existing.json new file mode 100644 index 00000000..e8e5bd2f --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-existing.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Web" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-new.json b/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-new.json new file mode 100644 index 00000000..169a4a3d --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/cluster-r8010/nestedtemplates/vnet-new.json @@ -0,0 +1,187 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/README.MD b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/README.MD new file mode 100644 index 00000000..06bcde28 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/ha-r8010-r8020/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/createUiDefinition.json b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/createUiDefinition.json new file mode 100644 index 00000000..d5510237 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/createUiDefinition.json @@ -0,0 +1,1284 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point CloudGuard IaaS High Availability Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_IaaS_HighAvailability_for_Azure/html_frameset.htm" + } + } + }, + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster Object settings", + "subLabel": { + "preValidation": "Configure Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.20", + "toolTip": "The version of Check Point CloudGuard. For R80.20 license is BYOL.", + "constraints": { + "allowedValues": [ + { + "label": "R80.10", + "value": "R80.10" + }, + { + "label": "R80.20", + "value": "R80.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8010vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D2s_v3", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DC2s", + "Standard_DC4s", + "Standard_F2s_v2", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_E2s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ts", + "Standard_M32ls", + "Standard_M32ms", + "Standard_M64s", + "Standard_M64ls", + "Standard_M64ms", + "Standard_M64", + "Standard_M64m", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_NC6s_v2", + "Standard_NC12s_v2", + "Standard_NC24s_v2", + "Standard_NC24rs_v2", + "Standard_NC6s_v3", + "Standard_NC12s_v3", + "Standard_NC24s_v3", + "Standard_NC24rs_v3", + "Standard_ND6s", + "Standard_ND12s", + "Standard_ND24s", + "Standard_ND24rs", + "Standard_NV6s_v2", + "Standard_NV12s_v2", + "Standard_NV24s_v2", + "Standard_B1s", + "Standard_B1ms", + "Standard_B2s", + "Standard_B2ms", + "Standard_B4ms", + "Standard_B8ms", + "Standard_D2_v3", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_A2_v2", + "Standard_A4_v2", + "Standard_A8_v2", + "Standard_A2m_v2", + "Standard_A4m_v2", + "Standard_A8m_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_E2_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_L4s", + "Standard_L8s", + "Standard_L16s", + "Standard_L32s", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24r", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16r", + "Standard_H16mr" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8010vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D2s_v3", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DC2s", + "Standard_DC4s", + "Standard_F2s_v2", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_E2s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ts", + "Standard_M32ls", + "Standard_M32ms", + "Standard_M64s", + "Standard_M64ls", + "Standard_M64ms", + "Standard_M64", + "Standard_M64m", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_NC6s_v2", + "Standard_NC12s_v2", + "Standard_NC24s_v2", + "Standard_NC24rs_v2", + "Standard_NC6s_v3", + "Standard_NC12s_v3", + "Standard_NC24s_v3", + "Standard_NC24rs_v3", + "Standard_ND6s", + "Standard_ND12s", + "Standard_ND24s", + "Standard_ND24rs", + "Standard_NV6s_v2", + "Standard_NV12s_v2", + "Standard_NV24s_v2", + "Standard_B1s", + "Standard_B1ms", + "Standard_B2s", + "Standard_B2ms", + "Standard_B4ms", + "Standard_B8ms", + "Standard_D2_v3", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_A2_v2", + "Standard_A4_v2", + "Standard_A8_v2", + "Standard_A2m_v2", + "Standard_A4m_v2", + "Standard_A8m_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_E2_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_L4s", + "Standard_L8s", + "Standard_L16s", + "Standard_L32s", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24r", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16r", + "Standard_H16mr" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtp-v2" + }, + "count": 2 + }, + { + "name": "R8010vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D2s_v3", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DC2s", + "Standard_DC4s", + "Standard_F2s_v2", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_E2s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ts", + "Standard_M32ls", + "Standard_M32ms", + "Standard_M64s", + "Standard_M64ls", + "Standard_M64ms", + "Standard_M64", + "Standard_M64m", + "Standard_GS2", + "Standard_GS3", + "Standard_GS4", + "Standard_GS5", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_NC6s_v2", + "Standard_NC12s_v2", + "Standard_NC24s_v2", + "Standard_NC24rs_v2", + "Standard_NC6s_v3", + "Standard_NC12s_v3", + "Standard_NC24s_v3", + "Standard_NC24rs_v3", + "Standard_ND6s", + "Standard_ND12s", + "Standard_ND24s", + "Standard_ND24rs", + "Standard_NV6s_v2", + "Standard_NV12s_v2", + "Standard_NV24s_v2", + "Standard_B1s", + "Standard_B1ms", + "Standard_B2s", + "Standard_B2ms", + "Standard_B4ms", + "Standard_B8ms", + "Standard_D2_v3", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_A2_v2", + "Standard_A4_v2", + "Standard_A8_v2", + "Standard_A2m_v2", + "Standard_A4m_v2", + "Standard_A8m_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_E2_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_G2", + "Standard_G3", + "Standard_G4", + "Standard_G5", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_L4s", + "Standard_L8s", + "Standard_L16s", + "Standard_L32s", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24r", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16r", + "Standard_H16mr" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "R8020vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8020vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8020vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), equals(coalesce(steps('chkp').R80Offer, 'Bring Your Own License'), 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": false, + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": false, + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "managedSystemAssigned", + "type": "Microsoft.Common.OptionsGroup", + "visible": "[not(or(equals(substring(location(), 0, 2), 'us'), equals(substring(location(), 0, 5), 'china'), equals(substring(location(), 0, 7), 'germany')))]", + "label": "Create a System Assigned Identity", + "toolTip": "Automatically create a Service Principal for this deployment.", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "availabilityOptions", + "type": "Microsoft.Common.DropDown", + "label": "Availability options", + "defaultValue": "Availability Set", + "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' centralus eastus2 francecentral northeurope southeastasia westeurope westus2 eastus uksouth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "Availability Set", + "value": "Availability Set" + }, + { + "label": "Availability Zones", + "value": "Availability Zones" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTX, 'DS'), contains(steps('chkp').R8020vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTX, 'DS'), contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiNGTP, steps('chkp').R8010vmSizeUiNGTX, steps('chkp').R8020vmSizeUiBYOL, steps('chkp').R8020vmSizeUiNGTP, steps('chkp').R8020vmSizeUiNGTX, steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "managedSystemAssigned": "[steps('chkp').managedSystemAssigned]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "availabilityOptions": "[steps('chkp').availabilityOptions]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/mainTemplate.json b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/mainTemplate.json new file mode 100644 index 00000000..7ec20a9e --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/mainTemplate.json @@ -0,0 +1,960 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (NGTP)", + "R80.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.20 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "role": { + "type": "string", + "defaultValue": "Contributor", + "metadata": { + "description": "Role" + } + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "templateName": "ha", + "templateVersion": "20191114", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (NGTP)": "NGTP", + "R80.20 - Pay As You Go (NGTX)": "NGTX", + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP", + "R80.30 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (NGTP)": "R8020", + "R80.20 - Pay As You Go (NGTX)": "R8020", + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-12-01", + "storageApiVersion": "2017-10-01", + "networkApiVersion": "2018-01-01", + "authorizationApiVersion": "2017-05-01", + "deploymentsApiVersion": "2017-08-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8010": 100, + "diskSizeGBR8020": 100, + "diskSizeGBR8030": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80-blink-v2", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOfferR8030": "check-point-cg-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[concat(variables('elbId'),'/backendAddressPools/',variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[concat(variables('ilbID'), '/backendAddressPools/', variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[concat(variables('ilbID'), '/frontendIPConfigurations/', variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[concat(variables('ilbID'), '/probes/', variables('ilbProbeName'))]", + "appProbeName": "health_prob_port", + "appProbeID": "[concat(variables('elbId'),'/probes/',variables('appProbeName'))]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),2)))]" + ], + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), concat('/subscriptions/',subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "azureCloud": "[not(or(startsWith(variables('location'), 'us'), startsWith(variables('location'), 'china'), startsWith(variables('location'), 'germany')))]", + "managedSystemAssigned": "[if(not(variables('azureCloud')), 'no', parameters('managedSystemAssigned'))]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('elbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('elbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('elbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('elbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth" + ], + "availabilitySetProperty": { + "id": "[concat(resourceGroup().id, '/providers/Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-7fbd7ca2-a62c-5cb5-9b28-3900ca6dba8d", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "nsgName": { + "value": "[variables('nsgName')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(variables('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[equals(variables('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(concat('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), variables('computeApiVersion'), 'Full').identity.principalId]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "[variables('networkApiVersion')]", + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-existing.json b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-existing.json new file mode 100644 index 00000000..c06ec0ba --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-existing.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "nsgName": { + "type": "string", + "metadata": { + "description": "Name of the network security group" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-new.json b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-new.json new file mode 100644 index 00000000..39971172 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/ha-r8010-r8020/nestedtemplates/vnet-2-subnet-ha2-new.json @@ -0,0 +1,217 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "nsgName": { + "type": "string", + "metadata": { + "description": "Name of the network security group" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('Subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray": "[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('Subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('Subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('Subnet1Name')]", + "properties": { + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]" + }, + "addressPrefix": "[parameters('Subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]" + } + } + }, + { + "name": "[parameters('Subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('Subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/README.MD b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/README.MD new file mode 100644 index 00000000..e30aa5a0 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/mgmt-r8010-r8020/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/createUiDefinition.json b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/createUiDefinition.json new file mode 100644 index 00000000..8c33f9c2 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/createUiDefinition.json @@ -0,0 +1,409 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Security Management Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.20", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.10", + "value": "R80.10" + }, + { + "label": "R80.20", + "value": "R80.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8010vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-4qa-preview", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "R8020vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8020vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Management", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Management", + "value": "management" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[equals(steps('chkp').installationType, 'management')]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[equals(steps('chkp').installationType, 'management')]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiMGMT25, 'DS'), contains(steps('chkp').R8020vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8020vmSizeUiMGMT25, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiMGMT25, steps('chkp').R8020vmSizeUiBYOL, steps('chkp').R8020vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/mainTemplate.json b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/mainTemplate.json new file mode 100644 index 00000000..6e20c8dc --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/mainTemplate.json @@ -0,0 +1,633 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (MGMT25)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R80.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point vSEC" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "management", + "allowedValues": [ + "management", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "templateName": "management", + "templateVersion": "20191118", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (MGMT25)": "MGMT25", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (MGMT25)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (MGMT25)": "R8020" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": "[bool('false')]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2016-06-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8010": 100, + "diskSizeGBR8020": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[concat(if(equals(variables('osVersion'), 'R8010'), 'sg', 'mgmt'),'-byol')]", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration',parameters('authenticationType')))]", + "planBYOL": { + "name": "[concat(if(equals(variables('osVersion'), 'R8010'), 'sg', 'mgmt'),'-byol')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "notused", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-cad9cfed-843e-554d-a348-a42352708fab", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('nsgId')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-existing.json b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-existing.json new file mode 100644 index 00000000..a82ecbb9 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-existing.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-new.json b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-new.json new file mode 100644 index 00000000..ba4bb568 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/mgmt-r8010-r8020/nestedtemplates/vnet-1-subnet-new.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/README.MD b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/README.MD new file mode 100644 index 00000000..70787f21 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/single-r8010-r8020/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/createUiDefinition.json b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/createUiDefinition.json new file mode 100644 index 00000000..f33d78a1 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/createUiDefinition.json @@ -0,0 +1,754 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.20", + "toolTip": "The version of Check Point CloudGuard. For R80.20 license is BYOL.", + "constraints": { + "allowedValues": [ + { + "label": "R80.10", + "value": "R80.10" + }, + { + "label": "R80.20", + "value": "R80.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8010vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), not(equals(steps('chkp').installationType, 'gateway')), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), not(equals(steps('chkp').installationType, 'gateway')), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80", + "sku": "sg-ngtp-v2" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), not(equals(steps('chkp').installationType, 'gateway')), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiBYOLBlink", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), equals(steps('chkp').installationType, 'gateway'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiNGTPBlink", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), equals(steps('chkp').installationType, 'gateway'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtp-v2" + }, + "count": 1 + }, + { + "name": "R8010vmSizeUiNGTXBlink", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), equals(steps('chkp').installationType, 'gateway'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "R8020vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8020vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8020vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "visible": "[equals(steps('chkp').cloudGuardVersion, 'R80.10')]", + "defaultValue": "Gateway and Management (Standalone)", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Gateway only", + "value": "gateway" + }, + { + "label": "Gateway and Management (Standalone)", + "value": "standalone" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "[or(equals(steps('chkp').installationType, 'gateway'), not(equals(steps('chkp').cloudGuardVersion, 'R80.10')))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[or(not(equals(steps('chkp').cloudGuardVersion, 'R80.10')), not(equals(steps('chkp').installationType, 'custom')))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTX, 'DS'), contains(steps('chkp').R8010vmSizeUiBYOLBlink, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTPBlink, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTXBlink, 'DS'), contains(steps('chkp').R8020vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiNGTP, steps('chkp').R8010vmSizeUiNGTX, steps('chkp').R8010vmSizeUiBYOLBlink, steps('chkp').R8010vmSizeUiNGTPBlink, steps('chkp').R8010vmSizeUiNGTXBlink, steps('chkp').R8020vmSizeUiBYOL, steps('chkp').R8020vmSizeUiNGTP, steps('chkp').R8020vmSizeUiNGTX)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/mainTemplate.json b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/mainTemplate.json new file mode 100644 index 00000000..d181ad96 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/mainTemplate.json @@ -0,0 +1,599 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (NGTP)", + "R80.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point vSEC" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "standalone", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "templateName": "single", + "templateVersion": "20191118", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (NGTP)": "NGTP", + "R80.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (NGTP)": "R8020", + "R80.20 - Pay As You Go (NGTX)": "R8020" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "installationType": "[if(not(equals(variables('osVersion'), 'R8010')), 'gateway', parameters('installationType'))]", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2018-01-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8010": 100, + "diskSizeGBR8020": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n')]", + "imageOfferR8010": "[if(variables('isBlink'), 'check-point-vsec-r80-blink-v2', 'check-point-vsec-r80')]", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration',parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-769ae546-3d1f-5beb-87f2-918ac09137c0", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-existing.json b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-existing.json new file mode 100644 index 00000000..e8e5bd2f --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-existing.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Web" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-new.json b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-new.json new file mode 100644 index 00000000..169a4a3d --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/single-r8010-r8020/nestedtemplates/vnet-new.json @@ -0,0 +1,187 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/README.MD b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/README.MD new file mode 100644 index 00000000..90c0ad70 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/vmss-r8010-r8020/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/createUiDefinition.json b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/createUiDefinition.json new file mode 100644 index 00000000..cc375f8b --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/createUiDefinition.json @@ -0,0 +1,1056 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point CloudGuard IaaS Scale Set Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/html_frameset.htm" + } + } + }, + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "Check Point VMSS settings", + "subLabel": { + "preValidation": "Configure CloudGuard VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard VMSS settings", + "elements": [ + { + "name": "CloudGuard VMSS settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please provide the configuration values according to the Deployment Guide.", + "link": { + "label": "Deployment Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/html_frameset.htm" + } + } + }, + { + "name": "upgrading", + "type": "Microsoft.Common.OptionsGroup", + "label": "Are you upgrading your CloudGuard VMSS solution?", + "defaultValue": "No", + "toolTip": "Select 'Yes' if you are upgrading your CloudGuard VMSS solution.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "upgradeVmssInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Warning", + "text": "All the configurations below must be similar to the existing CloudGuard VMSS solution.\n\nNote that the target load balancers are the ones connected to your existing CloudGuard VMSS solution.\n\nSee the Deployment Guide for more information." + } + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maximum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "configurationTemplateInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Use a different configuration template name than in your existing CloudGuard VMSS solution." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Configuration template name", + "toolTip": "The configuration template name as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + }, + { + "name": "deploymentMode", + "type": "Microsoft.Common.DropDown", + "label": "Load balancers deployment", + "defaultValue": "Standard (External & Internal)", + "toolTip": "Defines which load balancers will be deployed. Note: For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses.", + "constraints": { + "allowedValues": [ + { + "label": "Standard (External & Internal)", + "value": "Standard" + }, + { + "label": "External only (Inbound inspection only)", + "value": "ELBOnly" + }, + { + "label": "Internal only (Outbound & E-W inspection only - see tooltip)", + "value": "ILBOnly" + } + ] + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "External Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the External Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "ilbLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "Internal Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the Internal Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ELBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the VMSS with instance level Public IP address", + "defaultValue": "No", + "toolTip": "If selected 'Yes', then each VMSS instance will have its own public IP address.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "externalCommunicationInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').instanceLevelPublicIP, 'no'), equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "options": { + "icon": "Warning", + "text": "For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses." + } + }, + { + "name": "lbsTargetRGName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target load balancers resource group name", + "defaultValue": "", + "toolTip": "The name of the Target Load Balancers Resource Group.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Group only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "Target external load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target External Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target external load balancer." + } + }, + { + "name": "elbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "External load balancer's new backend pool name", + "toolTip": "The name of the new Target External Load Balancer's Backend Pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "ilbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Target internal load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target Internal Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "ilbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target internal load balancer." + } + }, + { + "name": "ilbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Internal load balancer's new backend pool name", + "toolTip": "The name of the new target internal load balancer's backend pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "mgmtInterfaceOpt1", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC and with public or private IP.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's public IP address", + "value": "eth0-public" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtInterfaceOpt2", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'no')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtIPaddress", + "type": "Microsoft.Common.TextBox", + "label": "Management Server IP address", + "toolTip": "The IP address used to manage the VMSS instances.", + "visible": "[or(equals(steps('autoprovision').mgmtInterfaceOpt1, 'eth0-private'), equals(steps('autoprovision').mgmtInterfaceOpt2, 'eth0-private'))]", + "constraints": { + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "required": true, + "validationMessage": "Please enter a valid IP address" + } + }, + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "None", + "toolTip": "The number of avalability zones to use for the scale set. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' centralus eastus2 francecentral northeurope southeastasia westeurope westus2 eastus uksouth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "None", + "value": 0 + }, + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + } + ] + }, + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.20", + "toolTip": "The version of Check Point CloudGuard. For R80.20 license is BYOL.", + "constraints": { + "allowedValues": [ + { + "label": "R80.10", + "value": "R80.10" + }, + { + "label": "R80.20", + "value": "R80.20" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8010vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_G1", + "Standard_GS1", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8010vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_G1", + "Standard_GS1", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtp-v2" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8010vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.10'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_G1", + "Standard_GS1", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_NV6", + "Standard_NV12", + "Standard_NV24", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-vsec-r80-blink-v2", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8020vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8020vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8020vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.20'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8020-blink-v2", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8010vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8010vmSizeUiNGTX, 'DS'), contains(steps('chkp').R8020vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8020vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS Frontend subnet", + "defaultValue": { + "name": "VMSS-Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + }, + "subnet2": { + "label": "VMSS Backend subnet", + "defaultValue": { + "name": "VMSS-Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "upgrading": "[steps('autoprovision').upgrading]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "managementServer": "[steps('autoprovision').managementServer]", + "configurationTemplate": "[steps('autoprovision').configurationTemplate]", + "adminEmail": "[steps('autoprovision').adminEmail]", + "deploymentMode": "[steps('autoprovision').deploymentMode]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "lbsTargetRGName": "[steps('autoprovision').lbsTargetRGName]", + "elbResourceId": "[steps('autoprovision').elbResourceId]", + "elbTargetBEAddressPoolName": "[steps('autoprovision').elbBEAddressPoolName]", + "ilbResourceId": "[steps('autoprovision').ilbResourceId]", + "ilbTargetBEAddressPoolName": "[steps('autoprovision').ilbBEAddressPoolName]", + "mgmtInterfaceOpt1": "[steps('autoprovision').mgmtInterfaceOpt1]", + "mgmtInterfaceOpt2": "[steps('autoprovision').mgmtInterfaceOpt2]", + "mgmtIPaddress": "[steps('autoprovision').mgmtIPaddress]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "ilbLoadDistribution": "[steps('autoprovision').ilbLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "vmSize": "[coalesce(steps('chkp').R8010vmSizeUiBYOL, steps('chkp').R8010vmSizeUiNGTP, steps('chkp').R8010vmSizeUiNGTX, steps('chkp').R8020vmSizeUiBYOL, steps('chkp').R8020vmSizeUiNGTP, steps('chkp').R8020vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/mainTemplate.json b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/mainTemplate.json new file mode 100644 index 00000000..0bdfc0b1 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/mainTemplate.json @@ -0,0 +1,874 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.10 - Bring Your Own License", + "R80.10 - Pay As You Go (NGTP)", + "R80.10 - Pay As You Go (NGTX)", + "R80.20 - Bring Your Own License", + "R80.20 - Pay As You Go (NGTP)", + "R80.20 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user in upgrading the CloudGuard VMSS solution" + } + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of avalability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "templateName": "vmss-v2", + "templateVersion": "20191118", + "location": "[parameters('location')]", + "offers": { + "R80.10 - Bring Your Own License": "BYOL", + "R80.10 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.10 - Pay As You Go (NGTX)": "NGTX", + "R80.20 - Bring Your Own License": "BYOL", + "R80.20 - Pay As You Go (NGTP)": "NGTP", + "R80.20 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.10 - Bring Your Own License": "R8010", + "R80.10 - Pay As You Go (NGTP)": "R8010", + "R80.10 - Pay As You Go (NGTX)": "R8010", + "R80.20 - Bring Your Own License": "R8020", + "R80.20 - Pay As You Go (NGTP)": "R8020", + "R80.20 - Pay As You Go (NGTX)": "R8020" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-12-01", + "storageApiVersion": "2017-10-01", + "networkApiVersion": "2018-01-01", + "deploymentsApiVersion": "2017-08-01", + "insightsApiVersion": "2015-04-01", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n')]", + "imageOfferR8010": "check-point-vsec-r80-blink-v2", + "imageOfferR8020": "check-point-cg-r8020-blink-v2", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "vmssID": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Compute/virtualMachineScaleSets/', parameters('vmName'))]", + "emailSelector": [ + [], + [ + "[parameters('adminEmail')]" + ] + ], + "customEmails": "[variables('emailSelector')[length(take(parameters('adminEmail'), 1))]]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "installationType": "vmss", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "networkSetupId": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Resources/deployments', 'networkSetup')]", + "lbRGName": "[if(variables('upgrading'), parameters('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "storageAccountId": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "centralus", + "eastus2", + "francecentral", + "northeurope", + "southeastasia", + "westeurope", + "westus2", + "eastus", + "uksouth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]", + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]" + }, + "resources": [ + { + "apiVersion": "2018-02-01", + "name": "pid-5432b4df-d783-57a2-b65f-39f4bca4974a", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "networkApiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Id": { + "value": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "lbsTargetRGName": { + "value": "[parameters('lbsTargetRGName')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "[variables('computeApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('networkSetupId')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', reference('networkSetup').outputs.vnetAddressPrefixes.value[0], '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "networkSecurityGroup": "[reference('networkSetup').outputs.nsgProperties.value]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), variables('storageApiVersion')).primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "[variables('insightsApiVersion')]", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[variables('customEmails')]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricNamespace": "", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/load-balancers.json b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/load-balancers.json new file mode 100644 index 00000000..401925e0 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/load-balancers.json @@ -0,0 +1,279 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentMode": { + "type": "string" + }, + "networkApiVersion": { + "type": "string" + }, + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "Subnet2StartAddress": { + "type": "string" + }, + "subnet2Name": { + "type": "string" + }, + "subnet2Id": { + "type": "string" + }, + "ilbLoadDistribution": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "lbsTargetRGName": { + "type": "string" + }, + "elbResourceId": { + "type": "string" + }, + "elbTargetBEAddressPoolName": { + "type": "string" + }, + "ilbResourceId": { + "type": "string" + }, + "ilbTargetBEAddressPoolName": { + "type": "string" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "deployELB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ELBOnly'))]", + "deployILB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ILBOnly'))]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "appAddressId": "[concat(variables('resourceGroup').id, '/providers/Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]", + "appFEName": "[variables('appName')]", + "elbName": "frontend-lb", + "elbID": "[if(parameters('upgrading'), parameters('elBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('elbName')))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolName": "[if(parameters('upgrading'), parameters('elbTargetBEAddressPoolName'), variables('elbBEAddressPool'))]", + "elbBEAddressPoolID": "[concat(variables('elbID'), '/backendAddressPools/', variables('elbBEAddressPoolName'))]", + "appFEIPConfigID": "[concat(variables('elbID'), '/frontendIPConfigurations/', variables('appFEName'))]", + "appProbeName": "[variables('appName')]", + "appProbeID": "[concat(variables('elbID'),'/probes/',variables('appProbeName'))]", + "appFrontEndProtocol": "tcp", + "appFrontEndPort": 80, + "appBackEndPort": 8081, + "appHealthProtocol": "tcp", + "ilbHealthProtocol": "tcp", + "lbHealthPort": 8117, + "ilbName": "['backend-lb']", + "ilbID": "[if(parameters('upgrading'), parameters('ilbResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('ilbName')))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbFEIPConfigID": "[concat(variables('ilbID'), '/frontendIPConfigurations/', variables('ilbName'))]", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "ilbBEAddressPoolName": "[if(parameters('upgrading'), parameters('ilbTargetBEAddressPoolName'), variables('ilbBEAddressPool'))]", + "ilbBEAddressPoolID": "[concat(variables('ilbID'), '/backendAddressPools/', variables('ilbBEAddressPoolName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[concat(variables('ilbID'), '/probes/', variables('ilbProbeName'))]", + "ilbBEAddressPoolProperties": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ], + "elbBEAddressPoolProperties": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "location": "[parameters('location')]", + "name": "[variables('appAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "name": "[variables('elbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[variables('appAddressId')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[variables('appAddressId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('appFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('elbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('appProbeID')]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": "[variables('appFrontEndPort')]", + "backendPort": "[variables('appBackEndPort')]", + "enableFloatingIP": false, + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployILB'), not(parameters('upgrading')))]", + "apiVersion": "[parameters('networkApiVersion')]", + "name": "[variables('ilbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[parameters('subnet2ID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "[parameters('ilbLoadDistribution')]", + "enableFloatingIP": false + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "[variables('ilbHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "appAddressId": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName')), '')]", + "type": "string" + }, + "elbId": { + "value": "[if(variables('deployELB'), variables('elbId'), '')]", + "type": "string" + }, + "ilbId": { + "value": "[if(variables('deployILB'), variables('ilbId'), '')]", + "type": "string" + }, + "ilbBEAddressPoolProperties": { + "value": "[variables('ilbBEAddressPoolProperties')]", + "type": "array" + }, + "elbBEAddressPoolProperties": { + "value": "[variables('elbBEAddressPoolProperties')]", + "type": "array" + }, + "ApplicationAddress": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), parameters('networkApiVersion')).IpAddress, 'no public ip')]", + "type": "string" + }, + "ApplicationFQDN": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), parameters('networkApiVersion')).dnsSettings.fqdn, 'no public ip')]", + "type": "string" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-existing.json b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-existing.json new file mode 100644 index 00000000..286d1927 --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-existing.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": "true" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[reference(variables('vnetId'),parameters('apiVersion')).addressSpace.addressPrefixes]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-new.json b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-new.json new file mode 100644 index 00000000..3a9a8c8c --- /dev/null +++ b/deprecated/azure/templates/R8010-R8020/vmss-r8010-r8020/nestedtemplates/vnet-2-subnet-ha-new.json @@ -0,0 +1,216 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "apiVersion": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": "true" + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray": "[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "[parameters('apiVersion')]", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} diff --git a/deprecated/azure/templates/R8030/ha-r8030/README.MD b/deprecated/azure/templates/R8030/ha-r8030/README.MD new file mode 100644 index 00000000..61102a27 --- /dev/null +++ b/deprecated/azure/templates/R8030/ha-r8030/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/ha-r8030/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8030/ha-r8030/createUiDefinition.json b/deprecated/azure/templates/R8030/ha-r8030/createUiDefinition.json new file mode 100644 index 00000000..efa3c5a4 --- /dev/null +++ b/deprecated/azure/templates/R8030/ha-r8030/createUiDefinition.json @@ -0,0 +1,730 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point CloudGuard IaaS High Availability Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_IaaS_HighAvailability_for_Azure/Default.htm" + } + } + }, + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster Object settings", + "subLabel": { + "preValidation": "Configure Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), equals(coalesce(steps('chkp').R80Offer, 'Bring Your Own License'), 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtp-v2" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtx-v2" + }, + "count": 2 + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "true" + }, + { + "name": "managedSystemAssigned", + "type": "Microsoft.Common.OptionsGroup", + "visible": true, + "label": "Create a System Assigned Identity", + "toolTip": "Automatically create a Service Principal for this deployment.", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "availabilityOptions", + "type": "Microsoft.Common.DropDown", + "label": "Availability options", + "defaultValue": "Availability Set", + "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "Availability Set", + "value": "Availability Set" + }, + { + "label": "Availability Zones", + "value": "Availability Zones" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Cluster members to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": true + }, + { + "name": "customMetricsInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('chkp').customMetrics, 'yes'), not(equals(steps('chkp').managedSystemAssigned, 'yes')))]", + "options": { + "icon": "Warning", + "text": "CloudGuard metrics can't be used when System Assigned Identity is disabled" + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use public IP prefix", + "defaultValue": "No", + "toolTip": "Use public IP prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create public IP prefix", + "defaultValue": "No", + "toolTip": "Create new public IP prefix to use.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('chkp').publicIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Public IP prefix resource id", + "defaultValue": "", + "toolTip": "Use an exisiting public IP prefix resource id.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed." + }, + "visible": "[equals(steps('chkp').createNewIPPrefix, 'no')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "managedSystemAssigned": "[steps('chkp').managedSystemAssigned]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "availabilityOptions": "[steps('chkp').availabilityOptions]", + "customMetrics": "[steps('chkp').customMetrics]", + "floatingIP": "[steps('chkp').floatingIP]", + "publicIPPrefix": "[steps('chkp').publicIPPrefix]", + "createNewIPPrefix": "[steps('chkp').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('chkp').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/ha-r8030/mainTemplate.json b/deprecated/azure/templates/R8030/ha-r8030/mainTemplate.json new file mode 100644 index 00000000..29f398e5 --- /dev/null +++ b/deprecated/azure/templates/R8030/ha-r8030/mainTemplate.json @@ -0,0 +1,1029 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "floatingIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "publicIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Use public IP prefix" + } + }, + "createNewIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Create new public IP prefix" + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "role": { + "type": "string", + "defaultValue": "Contributor", + "metadata": { + "description": "Role" + } + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + } + }, + "variables": { + "templateName": "ha", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),2)))]" + ], + "roleDefinitionId": "[if(equals(parameters('role'), 'Contributor'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c'), parameters('role'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "australiaeast", + "brazilsouth", + "canadacentral", + "centralus", + "eastasia", + "eastus", + "eastus2", + "francecentral", + "germanywestcentral", + "japaneast", + "koreacentral", + "northeurope", + "norwayeast", + "southafricanorth", + "southcentralus", + "southeastasia", + "swedencentral", + "uksouth", + "usgovvirginia", + "westeurope", + "westus2", + "westus3" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "emptyString": "none", + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), variables('emptyString'))]", + "ipNewPrefixId": "[resourceId('Microsoft.Network/publicIPPrefixes',variables('ipPrefixNewName'))]", + "publicIPNewPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipNewPrefixId'), json('null'))]", + "usepublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPNewPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPrefixProperty": { + "Id": "[variables('usepublicIPPrefix')]" + }, + "prefixDependsOn": "[if(equals(parameters('publicIPPrefix'), 'yes'), if(equals(parameters('createNewIPPrefix'), 'yes'), variables('publicIPNewPrefixId'), variables('ipNewPrefixId')), variables('ipNewPrefixId'))]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicIPPrefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "30", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + } + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "nsgName": { + "value": "[variables('nsgName')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(parameters('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-04-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]", + "publicIPPrefix": { + "id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usepublicIPPrefix'), json('null'))]" + } + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + }, + { + "condition": "[equals(parameters('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1)))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), copyIndex(1))), '2021-07-01', 'Full').identity.principalId]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": "[variables('enableFloatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-existing.json b/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-existing.json new file mode 100644 index 00000000..561fcd21 --- /dev/null +++ b/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-existing.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-new.json b/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-new.json new file mode 100644 index 00000000..88e8796d --- /dev/null +++ b/deprecated/azure/templates/R8030/ha-r8030/nestedtemplates/vnet-2-subnet-ha2-new.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "nsgName": { + "type": "string", + "metadata": { + "description": "Name of the network security group" + } + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('Subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray": "[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('Subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('Subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('Subnet1Name')]", + "properties": { + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]" + }, + "addressPrefix": "[parameters('Subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet1Name'))]" + } + } + }, + { + "name": "[parameters('Subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('Subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('Subnet2Name'))]" + } + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mds-r8030/README.MD b/deprecated/azure/templates/R8030/mds-r8030/README.MD new file mode 100644 index 00000000..c61e7e85 --- /dev/null +++ b/deprecated/azure/templates/R8030/mds-r8030/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/mds-r8030/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8030/mds-r8030/createUiDefinition.json b/deprecated/azure/templates/R8030/mds-r8030/createUiDefinition.json new file mode 100644 index 00000000..4f4f0df1 --- /dev/null +++ b/deprecated/azure/templates/R8030/mds-r8030/createUiDefinition.json @@ -0,0 +1,377 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard MDS deployment guide", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point MDS Deployment for Azure.", + "link": { + "label": "MDS Deployment Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk154436&partition=Basic&product=CloudGuard" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Multi-Domain Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Multi-Domain Server settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_DS5_v2", + "Standard_DS15_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Primary Multi-Domain Server", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Primary Multi-Domain Server", + "value": "mds-primary" + }, + { + "label": "Secondary Multi-Domain Server", + "value": "mds-secondary" + }, + { + "label": "Multi-Domain Log Server", + "value": "mds-logserver" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(0|32))?$", + "validationMessage": "Enter a valid IPv4 network CIDR" + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[not(equals(steps('chkp').installationType, 'mds-primary'))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8040vmSizeUiBYOL, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use custom image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Multi-Domain Server subnet", + "defaultValue": { + "name": "Multi-Domain-Server", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[steps('chkp').R8030vmSizeUiBYOL]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[if(contains(steps('chkp').managementGUIClientNetwork, '/'), steps('chkp').managementGUIClientNetwork, concat(steps('chkp').managementGUIClientNetwork, '/32'))]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "adminShell": "[steps('chkp').adminShell]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mds-r8030/mainTemplate.json b/deprecated/azure/templates/R8030/mds-r8030/mainTemplate.json new file mode 100644 index 00000000..b59710f4 --- /dev/null +++ b/deprecated/azure/templates/R8030/mds-r8030/mainTemplate.json @@ -0,0 +1,625 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "The name of the Check Point Multi-Domain Server." + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_DS5_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet01" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the subnet" + }, + "defaultValue": "Multi-Domain-Server" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "mds-primary", + "allowedValues": [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + } + }, + "variables": { + "templateName": "mds", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": "[bool('false')]", + "primary": "[equals(parameters('installationType'), 'mds-primary')]", + "secondary": "[equals(parameters('installationType'), 'mds-secondary')]", + "logserver": "[equals(parameters('installationType'), 'mds-logserver')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'sicKey=\"', parameters('sicKey'), '\"', '\n', 'primary=\"', variables('primary'), '\"', '\n', 'secondary=\"', variables('secondary'), '\"', '\n', 'logserver=\"', variables('logserver'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables('imageReferenceBYOL')]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planBYOL'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('nsgId')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-existing.json b/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-existing.json new file mode 100644 index 00000000..d36ab635 --- /dev/null +++ b/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-existing.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes[0]]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-new.json b/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-new.json new file mode 100644 index 00000000..479e15d1 --- /dev/null +++ b/deprecated/azure/templates/R8030/mds-r8030/nestedtemplates/vnet-1-subnet-new.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "deployRouteTable": { + "type": "bool", + "defaultValue": false + }, + "deployGWLB": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-VNet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "None" + } + } + ], + "routesArray": "[variables('localSubnetRoute')]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "routeTableID": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "routeTableProperties": { + "id": "[variables('routeTableID')]" + }, + "deployGWLB": "[parameters('deployGWLB')]", + "vnetProperties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": "[if(and(parameters('deployRouteTable'), variables('deployGWLB')), variables('routeTableProperties'), json('null'))]" + } + } + ] + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "condition": "[and(parameters('deployRouteTable'), variables('deployGWLB'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[variables('routeTableID')]" + ], + "properties": "[variables('vnetProperties')]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mgmt-r8030/README.MD b/deprecated/azure/templates/R8030/mgmt-r8030/README.MD new file mode 100644 index 00000000..a848a86d --- /dev/null +++ b/deprecated/azure/templates/R8030/mgmt-r8030/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/mgmt-r8030/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8030/mgmt-r8030/createUiDefinition.json b/deprecated/azure/templates/R8030/mgmt-r8030/createUiDefinition.json new file mode 100644 index 00000000..aeb0a4c9 --- /dev/null +++ b/deprecated/azure/templates/R8030/mgmt-r8030/createUiDefinition.json @@ -0,0 +1,387 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "chkp refrence architecture", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Security Management Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Management", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Management", + "value": "management" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[equals(steps('chkp').installationType, 'management')]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[equals(steps('chkp').installationType, 'management')]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiMGMT25, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "adminShell": "[steps('chkp').adminShell]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mgmt-r8030/mainTemplate.json b/deprecated/azure/templates/R8030/mgmt-r8030/mainTemplate.json new file mode 100644 index 00000000..4aab7e4d --- /dev/null +++ b/deprecated/azure/templates/R8030/mgmt-r8030/mainTemplate.json @@ -0,0 +1,629 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "management", + "allowedValues": [ + "management", + "custom" + ] + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + } + }, + "variables": { + "templateName": "management", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (MGMT25)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": "[bool('false')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), variables('imageReferenceMGMT25'))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planMGMT25'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgId": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('nsgId')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + }, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-existing.json b/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-existing.json new file mode 100644 index 00000000..d36ab635 --- /dev/null +++ b/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-existing.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes[0]]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-new.json b/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-new.json new file mode 100644 index 00000000..479e15d1 --- /dev/null +++ b/deprecated/azure/templates/R8030/mgmt-r8030/nestedtemplates/vnet-1-subnet-new.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "vmName": { + "type": "string", + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + }, + "deployRouteTable": { + "type": "bool", + "defaultValue": false + }, + "deployGWLB": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-VNet", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "None" + } + } + ], + "routesArray": "[variables('localSubnetRoute')]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "routeTableID": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "routeTableProperties": { + "id": "[variables('routeTableID')]" + }, + "deployGWLB": "[parameters('deployGWLB')]", + "vnetProperties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": "[if(and(parameters('deployRouteTable'), variables('deployGWLB')), variables('routeTableProperties'), json('null'))]" + } + } + ] + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "condition": "[and(parameters('deployRouteTable'), variables('deployGWLB'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[variables('routeTableID')]" + ], + "properties": "[variables('vnetProperties')]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]", + "type": "string" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/single-r8030/README.MD b/deprecated/azure/templates/R8030/single-r8030/README.MD new file mode 100644 index 00000000..8c2376fb --- /dev/null +++ b/deprecated/azure/templates/R8030/single-r8030/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/single-r8030/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8030/single-r8030/createUiDefinition.json b/deprecated/azure/templates/R8030/single-r8030/createUiDefinition.json new file mode 100644 index 00000000..f96d6430 --- /dev/null +++ b/deprecated/azure/templates/R8030/single-r8030/createUiDefinition.json @@ -0,0 +1,603 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), equals(coalesce(steps('chkp').R80Offer, 'Bring Your Own License'), 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtp-v2" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtx-v2" + }, + "count": 1 + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[not(equals(steps('chkp').cloudGuardVersion, 'R80.10'))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Gateway or Standalone to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "customMetrics": "[steps('chkp').customMetrics]", + "adminShell": "[steps('chkp').adminShell]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/single-r8030/mainTemplate.json b/deprecated/azure/templates/R8030/single-r8030/mainTemplate.json new file mode 100644 index 00000000..0e9e6f06 --- /dev/null +++ b/deprecated/azure/templates/R8030/single-r8030/mainTemplate.json @@ -0,0 +1,638 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "gateway", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for this VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + } + }, + "variables": { + "templateName": "single", + "templateVersion": "20220130", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "installationType": "[parameters('installationType')]", + "adminUsername": "notused", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageSku": "sg-byol", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "vmID": "[resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", + "customMetrics": "[parameters('customMetrics')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]" + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments/', 'networkExistingSetup'))]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + } + } + } + ] + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmID'), '2019-12-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmID')]" + ] + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-existing.json b/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-existing.json new file mode 100644 index 00000000..561fcd21 --- /dev/null +++ b/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-existing.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" + }, + "resources": [], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-new.json b/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-new.json new file mode 100644 index 00000000..d46b15bb --- /dev/null +++ b/deprecated/azure/templates/R8030/single-r8030/nestedtemplates/vnet-new.json @@ -0,0 +1,151 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 1st subnet" + } + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first avaialable address on the 2nd subnet" + } + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "To-Internal", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefix')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet1StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('subnet2StartAddress')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('virtualNetworkAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/vmss-r8030/README.MD b/deprecated/azure/templates/R8030/vmss-r8030/README.MD new file mode 100644 index 00000000..ce4af645 --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/README.MD @@ -0,0 +1,13 @@ +# How to deploy this template +To deploy this ARM template, follow these instructions: +1. Log in to the [Microsoft Azure Portal](https://portal.azure.com) +2. Click "*Create a resource*" +3. Search for "*Template deployment (deploy using custom templates)*" and click "*Create*" +4. Click "*Build your own template in the editor*" +5. Load the "*mainTemplate.json*" file from this directory and click "*Save*" +6. Enter the desired template parameters + - Replace the "*_artifacts Location*" property with: + ``` + https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/deprecated/azure/templates/vmss-r8030/ + ``` +7. Click *Purchase* to deploy the solution diff --git a/deprecated/azure/templates/R8030/vmss-r8030/createUiDefinition.json b/deprecated/azure/templates/R8030/vmss-r8030/createUiDefinition.json new file mode 100644 index 00000000..3b6e0907 --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/createUiDefinition.json @@ -0,0 +1,1106 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard VMSS settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the CloudGuard Network for Azure VMSS R80.10 and Higher Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm" + } + } + }, + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "Check Point VMSS settings", + "subLabel": { + "preValidation": "Configure CloudGuard VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard VMSS settings", + "elements": [ + { + "name": "upgrading", + "type": "Microsoft.Common.OptionsGroup", + "label": "Are you upgrading your CloudGuard VMSS solution?", + "defaultValue": "No", + "toolTip": "Select 'Yes' if you are upgrading your CloudGuard VMSS solution.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "upgradeVmssInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Warning", + "text": "All the configurations below must be similar to the existing CloudGuard VMSS solution.\n\nNote that the target load balancers are the ones connected to your existing CloudGuard VMSS solution.\n\nSee the Deployment Guide for more information." + } + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maximum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "configurationTemplateInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Use a different configuration template name than in your existing CloudGuard VMSS solution." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Configuration template name", + "toolTip": "The configuration template name as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + }, + { + "name": "deploymentMode", + "type": "Microsoft.Common.DropDown", + "label": "Load balancers deployment", + "defaultValue": "Standard (External & Internal)", + "toolTip": "Defines which load balancers will be deployed. Note: For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses.", + "constraints": { + "allowedValues": [ + { + "label": "Standard (External & Internal)", + "value": "Standard" + }, + { + "label": "External only (Inbound inspection only)", + "value": "ELBOnly" + }, + { + "label": "Internal only (Outbound & E-W inspection only - see tooltip)", + "value": "ILBOnly" + } + ] + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "External Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the External Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "ilbLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "Internal Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the Internal Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ELBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the VMSS with instance level Public IP address", + "defaultValue": "No", + "toolTip": "If selected 'Yes', then each VMSS instance will have its own public IP address.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Public IP prefix", + "defaultValue": "No", + "toolTip": "Define if deploy existsing Public IP Prefix or a new Public IP Prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]" + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create new IP prefiex", + "toolTip": "Create new or existsing Public IP Prefix", + "defaultValue": "No", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').publicIPPrefix, 'yes')]" + }, + { + "name": "IPv4Length", + "type": "Microsoft.Common.DropDown", + "label": "IPv4 IP prefix length", + "defaultValue": "/31 (2 addresses)", + "toolTip": "Choose the length of the IP prefix for IP v4.", + "multiselect": false, + "selectAll": false, + "filter": false, + "multiLine": false, + "constraints": { + "allowedValues": [ + { + "label": "/28 (16 addresses)", + "value": "/28 (16 addresses)" + }, + { + "label": "/29 (8 addresses)", + "value": "/29 (8 addresses)" + }, + { + "label": "/30 (4 addresses)", + "value": "/30 (4 addresses)" + }, + { + "label": "/31 (2 addresses)", + "value": "/31 (2 addresses)" + } + ], + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixLengthWarning", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]", + "options": { + "icon": "Warning", + "text": "[concat('NOTE: The VMSS will not be allowed to contain more than ', if(equals(steps('autoprovision').IPv4Length, '/31 (2 addresses)'), '2', if(equals(steps('autoprovision').IPv4Length, '/30 (4 addresses)'), '4', if(equals(steps('autoprovision').IPv4Length, '/29 (8 addresses)'), '8', if(equals(steps('autoprovision').IPv4Length, '/28 (16 addresses)'), '16', '0')))), ' instances')]" + } + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Enter an existing IP prefix resource id", + "toolTip": "The resource id of an existing public IP prefix.", + "multiLine": false, + "constraints": { + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed.", + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'no')]" + }, + { + "name": "externalCommunicationInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').instanceLevelPublicIP, 'no'), equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "options": { + "icon": "Warning", + "text": "For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses." + } + }, + { + "name": "lbsTargetRGName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target load balancers resource group name", + "defaultValue": "", + "toolTip": "The name of the Target Load Balancers Resource Group.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Group only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "Target external load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target External Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target external load balancer." + } + }, + { + "name": "elbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "External load balancer's new backend pool name", + "toolTip": "The name of the new Target External Load Balancer's Backend Pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "ilbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Target internal load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target Internal Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "ilbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target internal load balancer." + } + }, + { + "name": "ilbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Internal load balancer's new backend pool name", + "toolTip": "The name of the new target internal load balancer's backend pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "mgmtInterfaceOpt1", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC and with public or private IP.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's public IP address", + "value": "eth0-public" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtInterfaceOpt2", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'no')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtIPaddress", + "type": "Microsoft.Common.TextBox", + "label": "Management Server IP address", + "toolTip": "The IP address used to manage the VMSS instances.", + "visible": "[or(equals(steps('autoprovision').mgmtInterfaceOpt1, 'eth0-private'), equals(steps('autoprovision').mgmtInterfaceOpt2, 'eth0-private'))]", + "constraints": { + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "required": true, + "validationMessage": "Please enter a valid IP address" + } + }, + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "None", + "toolTip": "The number of avalability zones to use for the scale set. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "None", + "value": 0 + }, + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + } + ] + }, + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), equals(coalesce(steps('chkp').R80Offer, 'Bring Your Own License'), 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtp-v2" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8030", + "sku": "sg-ngtx-v2" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS Frontend subnet", + "defaultValue": { + "name": "VMSS-Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + }, + "subnet2": { + "label": "VMSS Backend subnet", + "defaultValue": { + "name": "VMSS-Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "upgrading": "[steps('autoprovision').upgrading]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "managementServer": "[steps('autoprovision').managementServer]", + "configurationTemplate": "[steps('autoprovision').configurationTemplate]", + "adminEmail": "[steps('autoprovision').adminEmail]", + "deploymentMode": "[steps('autoprovision').deploymentMode]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "lbsTargetRGName": "[steps('autoprovision').lbsTargetRGName]", + "elbResourceId": "[steps('autoprovision').elbResourceId]", + "elbTargetBEAddressPoolName": "[steps('autoprovision').elbBEAddressPoolName]", + "ilbResourceId": "[steps('autoprovision').ilbResourceId]", + "ilbTargetBEAddressPoolName": "[steps('autoprovision').ilbBEAddressPoolName]", + "mgmtInterfaceOpt1": "[steps('autoprovision').mgmtInterfaceOpt1]", + "mgmtInterfaceOpt2": "[steps('autoprovision').mgmtInterfaceOpt2]", + "mgmtIPaddress": "[steps('autoprovision').mgmtIPaddress]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "ilbLoadDistribution": "[steps('autoprovision').ilbLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "customMetrics": "[steps('autoprovision').customMetrics]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "floatingIP": "[steps('autoprovision').floatingIP]", + "IPv4Length": "[steps('autoprovision').IPv4Length]", + "publicIPPrefix": "[steps('autoprovision').publicIPPrefix]", + "createNewIPPrefix": "[steps('autoprovision').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('autoprovision').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/vmss-r8030/mainTemplate.json b/deprecated/azure/templates/R8030/vmss-r8030/mainTemplate.json new file mode 100644 index 00000000..3f9f2c64 --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/mainTemplate.json @@ -0,0 +1,1026 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user in upgrading the CloudGuard VMSS solution" + } + }, + "floatingIP": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "publicIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Use public IP prefix." + } + }, + "createNewIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Create new IP prefix or use an existing one." + } + }, + "IPv4Length": { + "type": "string", + "defaultValue": "/31 (2 addresses)", + "allowedValues": [ + "/28 (16 addresses)", + "/29 (8 addresses)", + "/30 (4 addresses)", + "/31 (2 addresses)" + ], + "metadata": { + "description": "Choose the IP prefix length for IP v4." + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix." + }, + "defaultValue": "" + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "resourceGroupName": "[resourceGroup().name]", + "templateName": "vmss-v2", + "templateVersion": "20220512", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP-V2", + "R80.30 - Pay As You Go (NGTX)": "NGTX-V2" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "adminUsername": "notused", + "isBlink": true, + "subnet2Name": "[parameters('subnet2Name')]", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "vmss", + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "lbsTargetRGName": "[parameters('lbsTargetRGName')]", + "lbRGName": "[if(variables('upgrading'), variables('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), variables('resourceGroupName'), parameters('virtualNetworkExistingRGName'))]", + "vnetID": "[if(variables('deployNewVnet'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "australiaeast", + "brazilsouth", + "canadacentral", + "centralus", + "eastasia", + "eastus", + "eastus2", + "francecentral", + "germanywestcentral", + "japaneast", + "koreacentral", + "northeurope", + "norwayeast", + "southafricanorth", + "southcentralus", + "southeastasia", + "swedencentral", + "uksouth", + "usgovvirginia", + "westeurope", + "westus2", + "westus3" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "numberOfRecordSetEntries": "20", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "IPv4Lengths": { + "/28 (16 addresses)": "28", + "/29 (8 addresses)": "29", + "/30 (4 addresses)": "30", + "/31 (2 addresses)": "31" + }, + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), json('null'))]", + "ipPrefixId": "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixNewName'))]", + "publicIPPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipPrefixId'), json('null'))]", + "usePublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPropertiesWithPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15, + "PublicIpPrefix": { + "Id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usePublicIPPrefix'), json('null'))]" + } + } + }, + "publicIPPropertiesWithoutPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "publicIPPrefixLength": "[variables('IPv4Lengths')[parameters('IPv4Length')]]", + "useIpPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPropertiesWithPrefix'), variables('publicIPPropertiesWithoutPrefix'))]" + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicipprefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[variables('publicIPPrefixLength')]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + } + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2021-07-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ] + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": true + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": false + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Id": { + "value": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), variables('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "floatingIp": { + "value": "[variables('enableFloatingIP')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2" + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[variables('vmssTags')]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[variables('adminUsername')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": false, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "networkSecurityGroup": "[if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.nsgProperties.value, reference('networkExistingSetup').outputs.nsgProperties.value)]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('useIpPrefix'), json('null'))]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": "[not(equals(variables('osVersion'), 'R8010'))]", + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2021-04-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + } + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} diff --git a/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/load-balancers.json b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/load-balancers.json new file mode 100644 index 00000000..ada64a6a --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/load-balancers.json @@ -0,0 +1,252 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentMode": { + "type": "string" + }, + "location": { + "type": "string" + }, + "vmName": { + "type": "string" + }, + "appLoadDistribution": { + "type": "string" + }, + "Subnet2StartAddress": { + "type": "string" + }, + "subnet2Id": { + "type": "string" + }, + "floatingIP": { + "type": "bool" + }, + "ilbLoadDistribution": { + "type": "string" + }, + "upgrading": { + "type": "bool" + }, + "elbResourceId": { + "type": "string" + }, + "elbTargetBEAddressPoolName": { + "type": "string" + }, + "ilbResourceId": { + "type": "string" + }, + "ilbTargetBEAddressPoolName": { + "type": "string" + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "deployELB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ELBOnly'))]", + "deployILB": "[or(equals(parameters('deploymentMode'),'Standard'), equals(parameters('deploymentMode'),'ILBOnly'))]", + "appName": "[concat(parameters('vmName'), '-app-1')]", + "appAddressName": "[variables('appName')]", + "appAddressId": "[resourceId(variables('resourceGroup').name, 'Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]", + "appFEName": "[variables('appName')]", + "elbName": "frontend-lb", + "elbID": "[if(parameters('upgrading'), parameters('elBResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('elbName')))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolName": "[if(parameters('upgrading'), parameters('elbTargetBEAddressPoolName'), variables('elbBEAddressPool'))]", + "appProbeName": "[variables('appName')]", + "appFrontEndProtocol": "tcp", + "appFrontEndPort": 80, + "appBackEndPort": 8081, + "appHealthProtocol": "tcp", + "ilbHealthProtocol": "tcp", + "lbHealthPort": 8117, + "ilbName": "['backend-lb']", + "ilbID": "[if(parameters('upgrading'), parameters('ilbResourceId'), resourceId('Microsoft.Network/loadBalancers', variables('ilbName')))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "ilbBEAddressPoolName": "[if(parameters('upgrading'), parameters('ilbTargetBEAddressPoolName'), variables('ilbBEAddressPool'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + } + ], + "elbBEAddressPoolProperties": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + } + ] + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('appAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(variables('resourceGroup').id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployELB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('elbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[variables('appAddressId')]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('appFEName')]", + "properties": { + "publicIPAddress": { + "id": "[resourceId(variables('resourceGroup').name, 'Microsoft.Network/publicIPAddresses/', variables('appAddressName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('appName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('elbName'), variables('appFEName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('elbName'), variables('appProbeName'))]" + }, + "protocol": "[variables('appFrontEndProtocol')]", + "frontendPort": "[variables('appFrontEndPort')]", + "backendPort": "[variables('appBackEndPort')]", + "enableFloatingIP": "[parameters('floatingIP')]", + "loadDistribution": "[parameters('appLoadDistribution')]" + } + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "[variables('appHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "condition": "[and(variables('deployILB'), not(parameters('upgrading')))]", + "apiVersion": "2020-06-01", + "name": "[variables('ilbName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[parameters('subnet2ID')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', variables('ilbName'), variables('ilbName'))]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('ilbName'), variables('ilbBEAddressPoolName'))]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', variables('ilbName'), variables('ilbProbeName'))]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "[parameters('ilbLoadDistribution')]", + "enableFloatingIP": "[parameters('floatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "[variables('ilbHealthProtocol')]", + "port": "[variables('lbHealthPort')]", + "intervalInSeconds": "5", + "numberOfProbes": "2" + } + } + ] + } + } + ], + "outputs": { + "appAddressId": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), resourceId('Microsoft.Network/publicIPAddresses', variables('appAddressName')), '')]", + "type": "string" + }, + "elbId": { + "value": "[if(variables('deployELB'), variables('elbId'), '')]", + "type": "string" + }, + "ilbId": { + "value": "[if(variables('deployILB'), variables('ilbId'), '')]", + "type": "string" + }, + "ilbBEAddressPoolProperties": { + "value": "[variables('ilbBEAddressPoolProperties')]", + "type": "array" + }, + "elbBEAddressPoolProperties": { + "value": "[variables('elbBEAddressPoolProperties')]", + "type": "array" + }, + "ApplicationAddress": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').IpAddress, 'no public ip')]", + "type": "string" + }, + "ApplicationFQDN": { + "value": "[if(and(variables('deployELB'), not(parameters('upgrading'))), reference(variables('appAddressId'), '2018-11-01').dnsSettings.fqdn, 'no public ip')]", + "type": "string" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-existing.json b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-existing.json new file mode 100644 index 00000000..ef49724a --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-existing.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "vnetId": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId(parameters('virtualNetworkExistingRGName'),'Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[variables('vnetId')]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[reference(variables('vnetId'),'2018-11-01').addressSpace.addressPrefixes]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-new.json b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-new.json new file mode 100644 index 00000000..e9100c9c --- /dev/null +++ b/deprecated/azure/templates/R8030/vmss-r8030/nestedtemplates/vnet-2-subnet-ha-new.json @@ -0,0 +1,188 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + } + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "vmName": { + "type": "string" + }, + "deployNsg": { + "type": "bool", + "defaultValue": "true" + } + }, + "variables": { + "copy": [ + { + "name": "toInternalRoutes", + "count": "[length(parameters('virtualNetworkAddressPrefixes'))]", + "input": { + "name": "[concat('To-Internal-',copyIndex('toInternalRoutes'))]", + "properties": { + "addressPrefix": "[parameters('virtualNetworkAddressPrefixes')[copyIndex('toInternalRoutes')]]", + "nextHopType": "None" + } + } + } + ], + "localSubnetRoute": [ + { + "name": "Local-Subnet", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "nextHopType": "VnetLocal" + } + } + ], + "routesArray": "[concat(variables('localSubnetRoute'), variables('toInternalRoutes'))]", + "nsgName": "[concat(parameters('vmName'), '-nsg')]", + "nsgProperties": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet1Name')]", + "properties": { + "routes": "[variables('routesArray')]" + } + }, + { + "type": "Microsoft.Network/routeTables", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('subnet2Name')]", + "properties": { + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('virtualNetworkName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]", + "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnets": [ + { + "name": "[parameters('subnet1Name')]", + "properties": { + "addressPrefix": "[parameters('subnet1Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet1Name'))]" + } + } + }, + { + "name": "[parameters('subnet2Name')]", + "properties": { + "addressPrefix": "[parameters('subnet2Prefix')]", + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnet2Name'))]" + } + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[parameters('deployNsg')]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[variables('nsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "type": "string" + }, + "vnetAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]", + "type": "array" + }, + "nsgProperties": { + "value": "[variables('nsgProperties')]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/ha-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/README.md new file mode 100644 index 00000000..e58bd802 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security High Availability for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-ha%2FmainTemplate.json) + + diff --git a/deprecated/azure/templates/R8040-R81/ha-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..31bbc503 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/createUiDefinition.json @@ -0,0 +1,1602 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point CloudGuard IaaS High Availability Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm" + } + } + }, + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Cluster Object settings", + "subLabel": { + "preValidation": "Configure Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "Cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8040vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8040vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "true" + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "managedSystemAssigned", + "type": "Microsoft.Common.OptionsGroup", + "visible": true, + "label": "Create a System Assigned Identity", + "toolTip": "Automatically create a Service Principal for this deployment.", + "defaultValue": "Yes", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + }, + { + "name": "availabilityOptions", + "type": "Microsoft.Common.DropDown", + "label": "Availability options", + "defaultValue": "Availability Set", + "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth \\ ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "Availability Set", + "value": "Availability Set" + }, + { + "label": "Availability Zones", + "value": "Availability Zones" + } + ] + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R80.40 R81 ' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R80.40 R81 ' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Cluster members to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": true + }, + { + "name": "customMetricsInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('chkp').customMetrics, 'yes'), not(equals(steps('chkp').managedSystemAssigned, 'yes')))]", + "options": { + "icon": "Warning", + "text": "CloudGuard metrics can't be used when System Assigned Identity is disabled" + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use public IP prefix", + "defaultValue": "No", + "toolTip": "Use public IP prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create public IP prefix", + "defaultValue": "No", + "toolTip": "Create new public IP prefix to use.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('chkp').publicIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Public IP prefix resource id", + "defaultValue": "", + "toolTip": "Use an exisiting public IP prefix resource id.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed." + }, + "visible": "[equals(steps('chkp').createNewIPPrefix, 'no')]" + }, + { + "name": "allowSmart1CloudConnection", + "type": "Microsoft.Common.OptionsGroup", + "label": "Quick connect to Smart-1 Cloud", + "defaultValue": "Yes", + "toolTip": "Automatically connect this Cluster to Smart-1 Cloud - Check Point's Security Management as a Service", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": true + }, + { + "name": "smart1CloudTokenTxt", + "type": "Microsoft.Common.TextBlock", + "options": { + "text": "Follow these instructions to quickly connect this Cluster to Smart-1 Cloud", + "link": { + "label": "SK180501 - Connecting CloudGuard Network Security Public Cloud Gateways to Smart-1 Cloud", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501" + } + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudTokenA", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token Member A", + "toolTip": "Paste here the token copied from the Connect Gateway (Member A) screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudTokenB", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token Member B", + "toolTip": "Paste here the token copied from the Connect Gateway (Member B) screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "Vips_Number", + "type": "Microsoft.Common.DropDown", + "label": "Number of Virtual IPs (VIP)", + "defaultValue": "1", + "toolTip": "Choose number of Virtual IP addresses to deploy for the cluster's external NIC", + "constraints": { + "allowedValues": [ + { + "label": "1", + "value": "1" + }, + { + "label": "2", + "value": "2" + }, + { + "label": "3", + "value": "3" + }, + { + "label": "4", + "value": "4" + }, + { + "label": "5", + "value": "5" + }, + { + "label": "6", + "value": "6" + }, + { + "label": "7", + "value": "7" + }, + { + "label": "8", + "value": "8" + }, + { + "label": "9", + "value": "9" + }, + { + "label": "10", + "value": "10" + } + ], + "required": true + }, + "visible": true + }, + { + "name": "VIP_Names", + "type": "Microsoft.Common.Section", + "label": "VIPs Names", + "elements": [ + { + "name": "VIP2_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 2 name", + "toolTip": "Choose name for VIP number 2", + "visible": "[greater(int(steps('network').Vips_Number), 1)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP3_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 3 name", + "toolTip": "Choose name for VIP number 3", + "visible": "[greater(int(steps('network').Vips_Number), 2)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP4_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 4 name", + "toolTip": "Choose name for VIP number 4", + "visible": "[greater(int(steps('network').Vips_Number), 3)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP5_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 5 name", + "toolTip": "Choose name for VIP number 5", + "visible": "[greater(int(steps('network').Vips_Number), 4)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP6_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 6 name", + "toolTip": "Choose name for VIP number 6", + "visible": "[greater(int(steps('network').Vips_Number), 5)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP7_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 7 name", + "toolTip": "Choose name for VIP number 7", + "visible": "[greater(int(steps('network').Vips_Number), 6)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP8_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 8 name", + "toolTip": "Choose name for VIP number 8", + "visible": "[greater(int(steps('network').Vips_Number), 7)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP9_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 9 name", + "toolTip": "Choose name for VIP number 9", + "visible": "[greater(int(steps('network').Vips_Number), 8)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + }, + { + "name": "VIP10_Name", + "type": "Microsoft.Common.TextBox", + "label": "VIP 10 name", + "toolTip": "Choose name for VIP number 10", + "visible": "[greater(int(steps('network').Vips_Number), 9)]", + "constraints": { + "validations": [ + { + "regex": "^[a-z0-9A-Z]{1,30}$", + "message": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + ] + } + } + ], + "visible": "[greater(int(steps('network').Vips_Number), 1)]" + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('clusterObjectNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Compute/availabilitySets", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/loadBalancers", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiNGTP, steps('chkp').R8040vmSizeUiNGTX, steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiNGTP, steps('chkp').R81vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R80.40 R81 ' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "managedSystemAssigned": "[steps('chkp').managedSystemAssigned]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "availabilityOptions": "[steps('chkp').availabilityOptions]", + "customMetrics": "[steps('chkp').customMetrics]", + "floatingIP": "[steps('chkp').floatingIP]", + "publicIPPrefix": "[steps('chkp').publicIPPrefix]", + "createNewIPPrefix": "[steps('chkp').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('chkp').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]", + "smart1CloudTokenA": "[steps('chkp').Smart1CloudTokenA]", + "smart1CloudTokenB": "[steps('chkp').Smart1CloudTokenB]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "VipsNumber": "[int(steps('network').Vips_Number)]", + "VipNames": "[concat(steps('network').VIP_Names.VIP2_Name, ',', steps('network').VIP_Names.VIP3_Name, ',', steps('network').VIP_Names.VIP4_Name, ',', steps('network').VIP_Names.VIP5_Name, ',', steps('network').VIP_Names.VIP6_Name, ',', steps('network').VIP_Names.VIP7_Name, ',', steps('network').VIP_Names.VIP8_Name, ',', steps('network').VIP_Names.VIP9_Name, ',', steps('network').VIP_Names.VIP10_Name)]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..59952e87 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json @@ -0,0 +1,1294 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Check Point CloudGuard version" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "floatingIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "publicIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Use public IP prefix" + } + }, + "createNewIPPrefix": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Create new public IP prefix" + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix" + }, + "defaultValue": "" + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "managedSystemAssigned": { + "type": "string", + "allowedValues": [ + "yes", + "no" + ], + "defaultValue": "yes", + "metadata": { + "description": "Automatically create a Service Principal for this deployment." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityOptions": { + "type": "string", + "allowedValues": [ + "Availability Set", + "Availability Zones" + ], + "defaultValue": "Availability Set", + "metadata": { + "description": "Use replicated Cluster VMs in Availability Set or Availability Zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for Cluster members monitoring" + } + }, + "smart1CloudTokenA": { + "type": "securestring", + "defaultValue": "" + }, + "smart1CloudTokenB": { + "type": "securestring", + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "VipsNumber": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 10 + }, + "VipNames": { + "type": "string", + "defaultValue": "" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + + }, + "variables": { + "VIPs_Number": "[int(parameters('VipsNumber'))]", + "Vip_Names": "[split(parameters('VipNames'), ',')]", + "templateName": "ha", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "elbPublicIPName": "frontend-lb-address", + "haPublicIPName": "[parameters('vmName')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX", + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81", + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"]}, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "elbName": "frontend-lb", + "elbId": "[resourceId('Microsoft.Network/loadBalancers', variables('elbName'))]", + "elbBEAddressPool": "[concat(variables('elbName'), '-pool')]", + "elbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', variables('elbName'), variables('elbBEAddressPool'))]", + "ilbName": "backend-lb", + "ilbId": "[resourceId('Microsoft.Network/loadBalancers', variables('ilbName'))]", + "ilbBEAddressPool": "[concat(variables('ilbName'), '-pool')]", + "ilbBEAddressPoolID": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools/', variables('ilbName'), variables('ilbBEAddressPool'))]", + "ilbFEIPConfigID": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations/', variables('ilbName'), variables('ilbName'))]", + "ilbProbeName": "[variables('ilbName')]", + "ilbProbeID": "[resourceId('Microsoft.Network/loadBalancers/probes/', variables('ilbName'), variables('ilbProbeName'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "appProbeName": "health_prob_port", + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "roleDefinitionIds": "[createArray(subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7'))]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "subnet2PrivateAddresses": [ + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),2)))]" + ], + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "haPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('haPublicIPName'))]", + "gwPublicIPIds": [ + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '1'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', concat(parameters('vmName'), '2'))]" + ], + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha2-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "ExsitingNsgRoleAssignmentURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/existing-nsg-RoleAssignment', '.json'))]", + "sicKey": "[parameters('sicKey')]", + "installationType": "cluster", + "internalLBPrivateIPAddress": "[parameters('Subnet2StartAddress')]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilitySetProperty": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "useAZ": "[and(contains(variables('availabilityZonesLocations'), variables('location')), equals(parameters('availabilityOptions'), 'Availability Zones'))]", + "customMetrics": "[parameters('customMetrics')]", + "emptyString": "none", + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), variables('emptyString'))]", + "ipNewPrefixId": "[resourceId('Microsoft.Network/publicIPPrefixes',variables('ipPrefixNewName'))]", + "publicIPNewPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipNewPrefixId'), json('null'))]", + "usepublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPNewPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPrefixProperty": { + "Id": "[variables('usepublicIPPrefix')]" + }, + "tokens":[ + "[parameters('smart1CloudTokenA')]", + "[parameters('smart1CloudTokenB')]" + ], + "prefixDependsOn": "[if(equals(parameters('publicIPPrefix'), 'yes'), if(equals(parameters('createNewIPPrefix'), 'yes'), variables('publicIPNewPrefixId'), variables('ipNewPrefixId')), variables('ipNewPrefixId'))]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"}, + "DefaultIpAddresses": + [{ + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[0]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + }, + { + "name": "cluster-vip", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('haPublicIPId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + }], + "copy": + [ + { + "name": "externalPrivateAddresses", + "count": "[add(variables('VIPs_Number'),2)]", + "input": "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),copyIndex('externalPrivateAddresses'))))]" + }, + { + "name": "Vips", + "count": "[sub(variables('VIPs_Number'), 1)]", + "input": { + "name": "[concat('cluster-vip-', copyIndex('Vips', 1))]", + "properties": { + "primary": false, + "privateIPAddress": "[variables('externalPrivateAddresses')[add(copyIndex('Vips'), 3)]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('Vip_Names')[copyIndex('Vips')])]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + } + } + } + }, + { + "name": "VipsInformation", + "count": "[sub(variables('VIPs_Number'), 1)]", + "input": { + "name": "[concat('cluster-vip-', copyIndex('VipsInformation', 1))]", + "privateIPAddress": "[variables('externalPrivateAddresses')[add(copyIndex('VipsInformation'), 3)]]", + "publicIPAddress": "[variables('Vip_Names')[copyIndex('VipsInformation')]]" + } + }, + { + "name": "customData", + "count": "[variables('count')]", + "input": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', '\n','smart1CloudToken=\"', variables('tokens')[copyIndex('customData')], '\"', '\n', 'Vips=\"', string(variables('VipsInformationForCloudConfig')), '\"', '\n','externalPrivateAddresses=\"', variables('externalPrivateAddresses')[2], '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]" + } + ], + "DefaultVipInformation": [ + { + "name": "cluster-vip", + "privateIPAddress": "[variables('externalPrivateAddresses')[2]]", + "publicIPAddress": "[parameters('vmName')]" + } + ], + "VipsInformationForCloudConfig": "[union(variables('DefaultVipInformation'), variables('VipsInformation'))]" + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicIPPrefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[if(greater(variables('VIPs_Number'), 5), '28', if(greater(variables('VIPs_Number'), 1), '29', '30'))]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPPrefixes'), parameters('tagsByResource')['Microsoft.Network/publicIPPrefixes'], json('{}')) ]" + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "condition": "[not(variables('useAZ'))]", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/availabilitySets'), parameters('tagsByResource')['Microsoft.Compute/availabilitySets'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-vip-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('prefixDependsOn')]" + ], + "location": "[variables('location')]", + "name": "[variables('Vip_Names')[copyIndex()]]", + "sku": { + "name": "Standard" + }, + "copy": { + "name": "publicVipCopy", + "count": "[sub(variables('VIPs_Number'), 1)]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), 'vip', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + }, + "publicIPPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPrefixProperty'), json('null'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[0]]", + "[variables('haPublicIPId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations":"[union(variables('DefaultIpAddresses'),variables('Vips'))]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('elbId')]", + "[variables('gwPublicIPIds')[1]]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('gwPublicIPIds')[1]]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('ilbId')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "internalNicCopy", + "count": "[variables('count')]" + }, + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "member-ip", + "properties": { + "primary": true, + "privateIPAddress": "[variables('subnet2PrivateAddresses')[copyIndex()]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('ilbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2022-11-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "zones": "[if(variables('useAZ'), array(copyIndex(1)), json('null'))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(parameters('managedSystemAssigned'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "UserData": "[base64(concat(variables('customData')[copyIndex()], 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n'))]", + "availabilitySet": "[if(not(variables('useAZ')), variables('availabilitySetProperty'), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computername": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(concat(variables('customData')[copyIndex()], 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('elbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]", + "publicIPPrefix": { + "id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usepublicIPPrefix'), json('null'))]" + } + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('managedSystemAssigned'), 'yes')]", + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-04-01-preview", + "name": "[guid(resourceGroup().id, concat(parameters('vmName'), copyIndex(1)))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[mul(length(variables('roleDefinitionIds')), variables('count'))]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), if(equals(mod(copyIndex(1), 2), 1), '1', '2')))]" + ], + "properties": { + "roleDefinitionId": "[variables('roleDefinitionIds')[if(greater(copyIndex(1), 2), 1, 0)]]", + "scope": "[resourceGroup().id]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), if(equals(mod(copyIndex(1), 2), 1), '1', '2'))), '2022-11-01', 'Full').identity.principalId]" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[and(equals(parameters('managedSystemAssigned'), 'yes'), not(parameters('deployNewNSG')))]", + "dependsOn": ["[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '1'))]"], + "name": "[concat('ExistingNsgRoleAssignment', copyIndex())]", + "copy": { + "name": "ExistingNsgRoleAssignmentCopy", + "count": "[length(variables('roleDefinitionIds'))]" + }, + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "resourceGroup": "[if(not(parameters('deployNewNSG')), split(parameters('ExistingNSG').id, '/')[4], '')]", + "subscriptionId": "[subscription().subscriptionId]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('ExsitingNsgRoleAssignmentURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "ExistingNSG": { + "value": "[parameters('ExistingNSG')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "roleDefinitionId": { + "value": "[variables('roleDefinitionIds')[copyIndex()]]" + }, + "principalId1": { + "value": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '1')), '2022-11-01', 'Full').identity.principalId]" + }, + "principalId2": { + "value": "[reference(resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'), '2')), '2022-11-01', 'Full').identity.principalId]" + }, + "index": { + "value": "[copyIndex()]" + } + } + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "name": "[variables('ilbName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "frontendIPConfigurations": [ + { + "name": "[variables('ilbName')]", + "properties": { + "privateIPAllocationMethod": "Static", + "privateIPAddress": "[variables('internalLBPrivateIPAddress')]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnet2Name'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('ilbBEAddressPool')]" + } + ], + "loadBalancingRules": [ + { + "name": "[variables('ilbName')]", + "properties": { + "frontendIPConfiguration": { + "id": "[variables('ilbFEIPConfigID')]" + }, + "backendAddressPool": { + "id": "[variables('ilbBEAddressPoolID')]" + }, + "probe": { + "id": "[variables('ilbProbeID')]" + }, + "protocol": "All", + "frontendPort": 0, + "backendPort": 0, + "loadDistribution": "Default", + "enableFloatingIP": "[variables('enableFloatingIP')]" + } + } + ], + "probes": [ + { + "name": "[variables('ilbProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8117, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + } + ], + "outputs": { + "HaIPAddr": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).IpAddress]" + }, + "HaFQDN": { + "type": "string", + "value": "[reference(variables('haPublicIPId')).dnsSettings.fqdn]" + }, + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[0]).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('gwPublicIPIds')[1]).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/R8040-R81/mds-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/README.md new file mode 100644 index 00000000..83bf14c5 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security MDS for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-mds%2FmainTemplate.json) + + diff --git a/deprecated/azure/templates/R8040-R81/mds-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..cb81c79e --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/createUiDefinition.json @@ -0,0 +1,589 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard MDS deployment guide", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point MDS Deployment for Azure.", + "link": { + "label": "MDS Deployment Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk154436&partition=Basic&product=CloudGuard" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Multi-Domain Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Multi-Domain Server settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_DS5_v2", + "Standard_DS15_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_DS5_v2", + "Standard_DS15_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Primary Multi-Domain Server", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Primary Multi-Domain Server", + "value": "mds-primary" + }, + { + "label": "Secondary Multi-Domain Server", + "value": "mds-secondary" + }, + { + "label": "Multi-Domain Log Server", + "value": "mds-logserver" + } + ] + } + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "(^0\\.0\\.0\\.0\\/0$)|(^(?!0\\.0\\.0\\.0$)(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", + "validationMessage": "Enter a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)" + }, + "visible": true + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[not(equals(steps('chkp').installationType, 'mds-primary'))]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R80.40 R81' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R80.40 R81' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use custom image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Multi-Domain Server subnet", + "defaultValue": { + "name": "Multi-Domain-Server", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R81vmSizeUiBYOL)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[if(contains(steps('chkp').managementGUIClientNetwork, '/'), steps('chkp').managementGUIClientNetwork, concat(steps('chkp').managementGUIClientNetwork, '/32'))]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R80.40 R81' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..c9800935 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json @@ -0,0 +1,746 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R81 - Bring Your Own License", + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "The name of the Check Point Multi-Domain Server." + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_DS5_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet01" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the subnet" + }, + "defaultValue": "Multi-Domain-Server" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "mds-primary", + "allowedValues": [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + + }, + "variables": { + "templateName": "mds", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R81 - Bring Your Own License": "BYOL" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R81 - Bring Your Own License": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "serialConsoleGeographies": { + "astasia" : ["20.205.69.28"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "eastasia" : ["20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": "[bool('false')]", + "primary": "[equals(parameters('installationType'), 'mds-primary')]", + "secondary": "[equals(parameters('installationType'), 'mds-secondary')]", + "logserver": "[equals(parameters('installationType'), 'mds-logserver')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'sicKey=\"', parameters('sicKey'), '\"', '\n', 'primary=\"', variables('primary'), '\"', '\n', 'secondary=\"', variables('secondary'), '\"', '\n', 'logserver=\"', variables('logserver'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables('imageReferenceBYOL')]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planBYOL'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "condition": "[parameters('deployNewNSG')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/README.md b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/README.md new file mode 100644 index 00000000..ae636acd --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/README.md @@ -0,0 +1,21 @@ +# Check Point CloudGuard Network Security Management for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-management%2FmainTemplate.json) + + diff --git a/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/createUiDefinition.json b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/createUiDefinition.json new file mode 100644 index 00000000..e2bdf52e --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/createUiDefinition.json @@ -0,0 +1,654 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "chkp refrence architecture", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point Security Management Server settings", + "subLabel": { + "preValidation": "Configure additional settings", + "postValidation": "Done" + }, + "bladeTitle": "Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "defaultValue": "Management", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Management", + "value": "management" + }, + { + "label": "Configure manually", + "value": "custom" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[equals(steps('chkp').installationType, 'management')]" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R80.40 R81' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R80.40 R81' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "enableApi", + "type": "Microsoft.Common.DropDown", + "label": "Accept Management API calls", + "defaultValue": "Management server only", + "toolTip": "Select the type of the Management API calls", + "constraints": { + "allowedValues": [ + { + "label": "Management server only", + "value": "management_only" + }, + { + "label": "All IP Addresses that can be used for GUI clients", + "value": "gui_clients" + }, + { + "label": "All IP addresses", + "value": "all" + } + ] + }, + "visible": "[not(or(equals(steps('chkp').cloudGuardVersion, 'R81'), equals(steps('chkp').cloudGuardVersion, 'R80.40'))))]" + }, + { + "visible": "[equals(steps('chkp').installationType, 'management')]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/networkInterfaces", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiMGMT25, steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R80.40 R81' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "enableApi": "[steps('chkp').enableApi]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json new file mode 100644 index 00000000..44f62298 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json @@ -0,0 +1,751 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (MGMT25)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "management", + "allowedValues": [ + "management", + "custom" + ] + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + + }, + "variables": { + "templateName": "management", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (MGMT25)": "MGMT25", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (MGMT25)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (MGMT25)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"]}, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": "[bool('false')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'enableApi=\"', parameters('enableApi'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData64": "[base64(variables('customData'))]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), variables('imageReferenceMGMT25'))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL'), variables('planBYOL'), variables('planMGMT25'))]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": false + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "condition": "[parameters('deployNewNSG')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "description": "Allow inbound SSH connection", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + }, + { + "name": "GAiA-portal", + "properties": { + "description": "Allow inbound HTTPS access to the GAiA portal", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "443", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "110", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-1", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18190", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "120", + "direction": "Inbound" + } + }, + { + "name": "SmartConsole-2", + "properties": { + "description": "Allow inbound access using the SmartConsole GUI client", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "19009", + "sourceAddressPrefix": "[variables('managementGUIClientNetwork')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "130", + "direction": "Inbound" + } + }, + { + "name": "Logs", + "properties": { + "description": "Allow inbound logging connections from managed gateways", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "257", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "140", + "direction": "Inbound" + } + }, + { + "name": "ICA-pull", + "properties": { + "description": "Allow security gateways to pull a SIC certificate", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18210", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "150", + "direction": "Inbound" + } + }, + { + "name": "CRL-fetch", + "properties": { + "description": "Allow security gateways to fetch CRLs", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18264", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "160", + "direction": "Inbound" + } + }, + { + "name": "Policy-fetch", + "properties": { + "description": "Allow security gateways to fetch policy", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "18191", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "170", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName') ,'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "UserData": "[variables('customData64')]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[variables('customData64')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/README.md new file mode 100644 index 00000000..57e098d6 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/README.md @@ -0,0 +1,10 @@ +# IPv6 support for CloudGuard IaaS in Azure +Azure's IPv6 connectivity makes it easy to provide dual stack (IPv4/IPv6) Internet connectivity for applications hosted in Azure. +It allows for simple deployment of VMs with load balanced IPv6 connectivity for both inbound and outbound initiated connections. + +Follow [sk170760](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk170760) instruction to deploy dual stack (IPv4/IPv6) CloudGuard IaaS Security Gateway in Azure. + + + Deploy to Azure + + diff --git a/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..2a322a31 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/single-ipv6-r8040-r81/mainTemplate.json @@ -0,0 +1,887 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "virtualNetworkIpv6AddressPrefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the virtual network" + }, + "defaultValue": "ace:cab:deca::/48" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.0.0/24" + }, + "Subnet1Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 1st subnet" + }, + "defaultValue": "ace:cab:deca:deed::/64" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.0.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet2Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 2nd subnet" + }, + "defaultValue": "ace:cab:deca:deee::/64" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "ipv6Gateway", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + + }, + "variables": { + "vnetv4AddressRange": "[parameters('virtualNetworkAddressPrefix')]", + "vnetv6AddressRange": "[parameters('virtualNetworkIPv6AddressPrefix')]", + "subnetv4AddressRange": "[parameters('Subnet1Prefix')]", + "subnet2v4AddressRange": "[parameters('Subnet2Prefix')]", + "subnetv6AddressRange": "[parameters('Subnet1IPv6Prefix')]", + "subnet2v6AddressRange": "[parameters('Subnet2IPv6Prefix')]", + "virtualNetworkName": "[parameters('virtualNetworkName')]", + "subnetName": "[parameters('Subnet1Name')]", + "subnet2Name": "[parameters('Subnet2Name')]", + "templateName": "singleIpv6", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"]}, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "installationType": "[parameters('installationType')]", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageSku": "[if(and(equals(parameters('installationType'), 'standalone'), or(equals(variables('osVersion'),'R8040'), equals(variables('osVersion'),'R81'))), 'mgmt-byol', 'sg-byol')]", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-14dc7680-7a2f-483c-b3ec-2c0cfae477aa", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v4", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v6", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "publicIPAddressVersion": "IPv6" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "name": "loadBalancer", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v4')]", + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', 'lbpublicip-v4')]" + } + } + }, + { + "name": "LB-v6", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LBBAP-v4" + }, + { + "name": "LBBAP-v6" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'loadBalancer', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'loadBalancer', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "lb-rule-v4" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'loadBalancer', 'LB-v6')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v6')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'loadBalancer', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443 + }, + "name": "lb-rule-v6" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[and(parameters('deployNewNSG'),equals(parameters('vnetNewOrExisting'), 'new'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkSecurityGroups'), parameters('tagsByResource')['Microsoft.Network/networkSecurityGroups'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "apiVersion": "2021-05-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "dhcpOptions": { + "dnsServers": [ + "cafe:43::", + "cafe:45::" + ] + }, + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetv4AddressRange')]", + "[variables('vnetv6AddressRange')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefixes": [ + "[variables('subnetv4AddressRange')]", + "[variables('subnetv6AddressRange')]" + ] + } + }, + { + "name": "[variables('subnet2Name')]", + "properties": { + "addressPrefixes": [ + "[variables('subnet2v4AddressRange')]", + "[variables('subnet2v6AddressRange')]" + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-05-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','loadBalancer')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig-v4", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "privateIPAddressVersion": "IPv4", + "primary": true, + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v4')]" + } + ] + } + }, + { + "name": "ipconfig-v6", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "privateIPAddressVersion": "IPv6", + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'loadBalancer', 'LBBAP-v6')]" + } + ] + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','loadBalancer')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig-v4", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + }, + { + "name": "ipconfig-v6", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "privateIPAddressVersion": "IPv6", + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "UserData": "[base64(variables('customData'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + } + ] +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/single-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/single-r8040-r81/README.md new file mode 100644 index 00000000..e092fdd8 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/single-r8040-r81/README.md @@ -0,0 +1,22 @@ +# Check Point CloudGuard Network Security Single Gateway for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-single%2FmainTemplate.json) + + + diff --git a/deprecated/azure/templates/R8040-R81/single-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/R8040-R81/single-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..0cc7cd29 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/single-r8040-r81/createUiDefinition.json @@ -0,0 +1,1305 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point Reference Architecture for Azure.", + "link": { + "label": "Reference Architecture Guide", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk109360" + } + } + }, + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "installationType", + "type": "Microsoft.Common.DropDown", + "label": "Installation type", + "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R80.40'), equals(steps('chkp').cloudGuardVersion, 'R81'))]", + "defaultValue": "Gateway only", + "toolTip": "Select the type of deployment", + "constraints": { + "allowedValues": [ + { + "label": "Gateway only", + "value": "gateway" + }, + { + "label": "Standalone", + "value": "standalone" + } + ] + } + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "standaloneValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(steps('chkp').cloudGuardVersion, 'R80.40'), equals(steps('chkp').cloudGuardVersion, 'R81')))))]", + "options": { + "icon": "Error", + "text": "Standalone deployment is ONLY supported for CloudGuard versions R80.40, R81 Bring Your Own License." + } + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + }, + "visible": "[and(or(equals(steps('chkp').cloudGuardVersion, 'R80.40'), equals(steps('chkp').cloudGuardVersion, 'R81')), equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[not(equals(steps('chkp').installationType, 'standalone'))]" + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "visible": "[or(not(equals(steps('chkp').cloudGuardVersion, 'R80.10')), not(equals(steps('chkp').installationType, 'custom')))]", + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Automatically download updates and share statistical data for product improvement purpose", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R80.40 R81' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R80.40 R81' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "basics settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the Check Point referenced guide for adding disk space.", + "link": { + "label": "Additional disk space in CloudGuard", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk156552" + } + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from Gateway or Standalone to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ], + "required": true + }, + "visible": true + }, + { + "name": "allowSmart1CloudConnection", + "type": "Microsoft.Common.OptionsGroup", + "label": "Quick connect to Smart-1 Cloud", + "defaultValue": "Yes", + "toolTip": "Automatically connect this single gateway to Smart-1 Cloud - Check Point's Security Management as a Service", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + }, + "visible": "[equals(steps('chkp').installationType, 'gateway')]" + }, + { + "name": "smart1CloudTokenTxt", + "type": "Microsoft.Common.TextBlock", + "options": { + "text": "Follow these instructions to quickly connect this single gateway to Smart-1 Cloud", + "link": { + "label": "SK180501 - Connecting CloudGuard Network Security Public Cloud Gateways to Smart-1 Cloud", + "uri": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501" + } + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + }, + { + "name": "Smart1CloudToken", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token", + "toolTip": "Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Microsoft.Storage/storageAccounts", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/networkInterfaces", + "Microsoft.Compute/virtualMachines", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiNGTP, steps('chkp').R8040vmSizeUiNGTX,steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiNGTP, steps('chkp').R81vmSizeUiNGTX)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "installationType": "[steps('chkp').installationType]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R80.40 R81' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "customMetrics": "[steps('chkp').customMetrics]", + "adminShell": "[steps('chkp').adminShell]", + "smart1CloudToken": "[steps('chkp').Smart1CloudToken]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]" + } + } +} diff --git a/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..911b8572 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json @@ -0,0 +1,779 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + ], + "defaultValue": "R81.20 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "vnet" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the 1st subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 1st subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 1st subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the 2nd subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the 2nd subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "installationType": { + "type": "string", + "metadata": { + "description": "Installation Type" + }, + "defaultValue": "gateway", + "allowedValues": [ + "standalone", + "gateway", + "custom" + ] + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether CloudGuard Metrics will be used for this VM monitoring" + } + }, + "smart1CloudToken": { + "type": "securestring", + "defaultValue": "" + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + }, + "variables": { + "templateName": "single", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "serialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"], + "usgovarizona" : ["20.141.10.130", "52.127.55.131"], + "usgovvirginia" : ["20.141.10.130", "52.127.55.131"] + }, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "installationType": "[parameters('installationType')]", + "isBlink": "[equals(variables('installationType'), 'gateway')]", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'smart1CloudToken=\"', parameters('smart1CloudToken'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageSku": "[if(and(equals(parameters('installationType'), 'standalone'), or(equals(variables('osVersion'),'R8040'), equals(variables('osVersion'),'R81'))), 'mgmt-byol', 'sg-byol')]", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "[variables('imageSku')]", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "[variables('imageSku')]", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "vmID": "[resourceId('Microsoft.Compute/virtualMachines/', parameters('vmName'))]", + "customMetrics": "[parameters('customMetrics')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), resourceGroup().name, parameters('virtualNetworkExistingRGName'))]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2022-09-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2020-06-01", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "sku": { + "name": "Standard" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Resources/deployments/', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments/', 'networkExistingSetup'))]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets/', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), parameters('tagsByResource')['Microsoft.Network/networkInterfaces'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2021-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "properties": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces/', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), parameters('tagsByResource')['Microsoft.Compute/virtualMachines'], json('{}')) ]" + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmID'), '2019-12-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/README.md new file mode 100644 index 00000000..6fbc5c3c --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/README.md @@ -0,0 +1,9 @@ +# IPv6 support for CloudGuard IaaS in Azure +Azure's IPv6 connectivity makes it easy to provide dual stack (IPv4/IPv6) Internet connectivity for applications hosted in Azure. +It allows for simple deployment of VMs with load balanced IPv6 connectivity for both inbound and outbound initiated connections. + +Follow [sk170760](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk170760) instruction to deploy CloudGuard IaaS virtual machine scale sets with IPv6 in Azure. + + + Deploy to Azure + diff --git a/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..fe55976d --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/vmss-ipv6-r8040-r81/mainTemplate.json @@ -0,0 +1,1209 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "virtualNetworkIpv6AddressPrefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the virtual network" + }, + "defaultValue": "ace:cab:deca::/48" + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 1st subnet" + }, + "defaultValue": "ace:cab:deca:deed::/64" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2Ipv6Prefix": { + "type": "string", + "metadata": { + "description": "The IPv6 address prefix of the 2nd subnet" + }, + "defaultValue": "ace:cab:deca:deee::/64" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIpAddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "default-nsg" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + + }, + "variables": { + "vnetv4AddressRange": "[parameters('virtualNetworkAddressPrefix')]", + "vnetv6AddressRange": "[parameters('virtualNetworkIPv6AddressPrefix')]", + "subnetv4AddressRange": "[parameters('Subnet1Prefix')]", + "subnet2v4AddressRange": "[parameters('Subnet2Prefix')]", + "subnetv6AddressRange": "[parameters('Subnet1IPv6Prefix')]", + "subnet2v6AddressRange": "[parameters('Subnet2IPv6Prefix')]", + "virtualNetworkName": "[parameters('virtualNetworkName')]", + "subnetName": "[parameters('Subnet1Name')]", + "subnet2Name": "[parameters('Subnet2Name')]", + "resourceGroup": "[resourceGroup()]", + "templateName": "vmss-v2", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", + "VMSSFrontend": "VMSS-Frontend", + "VMSSBackend": "VMSS-Backend", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"]}, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "additionalDiskSizeGB": "[if(contains('R8040 R81', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", + "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "vmss", + "publicIPProperties": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "azureFunctionSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/azure-func-sami.json', parameters('_artifactsLocationSasToken')))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIpAddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "dnsZoneResourceId": "[parameters('dnsZoneResourceId')]", + "dnsZoneRecordSetName": "[parameters('dnsZoneRecordSetName')]", + "numberOfRecordSetEntries": "20", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "NewNsgReference": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "apiVersion": "2021-01-01", + "name": "pid-23952014-097a-4aed-ade6-0d4b5c278517", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v4", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "type": "Microsoft.Network/publicIPAddresses", + "name": "lbpublicip-v6", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "publicIPAddressVersion": "IPv6" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicIPAddresses'), parameters('tagsByResource')['Microsoft.Network/publicIPAddresses'], json('{}')) ]" + }, + { + "apiVersion": "2020-05-01", + "name": "frontend-lb", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v4')]", + "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', 'lbpublicip-v4')]" + } + } + }, + { + "name": "LB-v6", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses','lbpublicip-v6')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "frontend-LBBAP-v4" + }, + { + "name": "frontend-LBBAP-v6" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'frontend-lb', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'frontend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "frontend-lb-rule-v4" + }, + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'frontend-lb', 'LB-v6')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v6')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'frontend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443 + }, + "name": "frontend-lb-rule-v6" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "apiVersion": "2021-01-01", + "name": "backend-lb", + "type": "Microsoft.Network/loadBalancers", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]" + ], + "properties": { + "frontendIpConfigurations": [ + { + "name": "LB-v4", + "properties": { + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "backend-LBBAP-v4" + } + ], + "loadBalancingRules": [ + { + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', 'backend-lb', 'LB-v4')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'backend-lb', 'backend-LBBAP-v4')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', 'backend-lb', 'lb-probe')]" + }, + "protocol": "Tcp", + "frontendPort": 443, + "backendPort": 443, + "idleTimeoutInMinutes": 4 + }, + "name": "backend-lb-rule-v4" + } + ], + "probes": [ + { + "properties": { + "protocol": "Tcp", + "port": 22, + "intervalInSeconds": 5, + "numberOfProbes": 2 + }, + "name": "lb-probe" + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/loadBalancers'), parameters('tagsByResource')['Microsoft.Network/loadBalancers'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('VMSSBackend')]", + "apiVersion": "2021-03-01", + "location": "[parameters('location')]", + "properties": { + "disableBgpRoutePropagation": false, + "routes": [ + { + "name": "To-Internet", + "properties": { + "addressPrefix": "0.0.0.0/0", + "nextHopType": "None" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('VMSSFrontend')]", + "apiVersion": "2021-03-01", + "location": "[parameters('location')]", + "properties": { + "disableBgpRoutePropagation": false, + "routes": [ + { + "name": "Local-Subnet-v6", + "properties": { + "addressPrefix": "[parameters('Subnet1IPv6Prefix')]", + "nextHopType": "VnetLocal" + } + }, + { + "name": "Local-Subnet-v4", + "properties": { + "addressPrefix": "[variables('subnetv4AddressRange')]", + "nextHopType": "VnetLocal" + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "apiVersion": "2021-03-01", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/routeTables', variables('VMSSFrontend'))]", + "[resourceId('Microsoft.Network/routeTables', variables('VMSSBackend'))]" + ], + "properties": { + "dhcpOptions": { + "dnsServers": [ + "cafe:43::", + "cafe:45::" + ] + }, + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetv4AddressRange')]", + "[variables('vnetv6AddressRange')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefixes": [ + "[variables('subnetv4AddressRange')]", + "[variables('subnetv6AddressRange')]" + ], + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', variables('VMSSFrontend'))]" + } + } + }, + { + "name": "[variables('subnet2Name')]", + "properties": { + "addressPrefixes": [ + "[variables('subnet2v4AddressRange')]", + "[variables('subnet2v6AddressRange')]" + ], + "routeTable": { + "id": "[resourceId('Microsoft.Network/routeTables', variables('VMSSBackend'))]" + } + } + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), parameters('tagsByResource')['Microsoft.Network/virtualNetworks'], json('{}')) ]" + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2021-03-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-01-01", + "resourceGroup": "[parameters('virtualNetworkExistingRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-06-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2021-07-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + + { + "type": "Microsoft.Network/networkSecurityGroups", + "condition": "[and(parameters('deployNewNSG'),equals(parameters('vnetNewOrExisting'), 'new'))]", + "apiVersion": "2020-06-01", + "location": "[parameters('location')]", + "name": "[parameters('NewNsgName')]", + "properties": { + "securityRules": [ + { + "name": "AllowAllInBound", + "properties": { + "description": "Allow all inbound connections", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": "100", + "direction": "Inbound" + } + } + ] + } + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[union(variables('vmssTags'),if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachineScaleSets'), parameters('tagsByResource')['Microsoft.Compute/virtualMachineScaleSets'], json('{}')))]", + "dependsOn": [ + "[coalesce(resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "[resourceId('Microsoft.Network/loadBalancers','frontend-lb')]", + "[resourceId('Microsoft.Network/loadBalancers','backend-lb')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), split(parameters('virtualNetworkAddressPrefix'), '.')[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "storageProfile": { + "osDisk": + { + "diskSizeGB": "[variables('diskSizeGB')]", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), split(parameters('virtualNetworkAddressPrefix'), '.')[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup": "[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1IPV6", + "properties": { + "primary": true, + "subnet": { + "id": "[variables('subnet-id')]" + }, + "privateIPAddressVersion": "IPv6", + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v6')]" + } + ] + } + }, + { + "name": "ipconfig1", + "properties": { + "primary": false, + "privateIPAddressVersion": "IPv4", + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('publicIPProperties'), json('null'))]", + "subnet": { + "id": "[variables('subnet-id')]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'frontend-lb', 'frontend-LBBAP-v4')]" + } + ] + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2IPV6", + "properties": { + "primary": true, + "subnet": { + "id": "[variables('subnet2-id')]" + }, + "privateIPAddressVersion": "IPv6" + } + }, + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[variables('subnet2-id')]" + } + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2021-06-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Insights/autoscaleSettings'), parameters('tagsByResource')['Microsoft.Insights/autoscaleSettings'], json('{}')) ]" + } + ] +} \ No newline at end of file diff --git a/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/README.md b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/README.md new file mode 100644 index 00000000..3c632bf9 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/README.md @@ -0,0 +1,23 @@ +# Check Point CloudGuard Network Security VMSS for Azure + +Check Point CloudGuard Network Security delivers advanced, multi-layered threat prevention to protect customer assets in Azure from malware and sophisticated threats. As a Microsoft Azure certified solution, CloudGuard Network Security enables you to easily and seamlessly secure your workloads while providing secure connectivity across your cloud and on-premises environments. + +Benefits: + +· Advanced threat prevention and traffic inspection + +· Integrated with Azure Security Center and Azure Sentinel + +· Provides consistent security policy management, enforcement, and reporting with a single pane of glass, using Check Point Unified Security Management + + + + + Deploy to Azure + + + +To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-vmss%2FmainTemplate.json) + + + diff --git a/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..c8b71304 --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/createUiDefinition.json @@ -0,0 +1,1732 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "CloudGuard VMSS settings text block", + "type": "Microsoft.Common.TextBlock", + "visible": true, + "options": { + "text": "Please follow the CloudGuard Network for Azure VMSS R80.10 and Higher Administration Guide.", + "link": { + "label": "Administration Guide", + "uri": "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm" + } + } + }, + { + "name": "warning reserved words InfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": true, + "options": { + "icon": "Warning", + "text": "Note: Resource group and Gateway scale set names must be without reserved words according to: sk40179", + "uri": "https://support.checkpoint.com/results/sk/sk40179" + } + }, + { + "name": "gatewayScaleSetNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Gateway scale set name", + "toolTip": "The name of the Check Point Security Gateway Scale Set", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "autoprovision", + "label": "Check Point VMSS settings", + "subLabel": { + "preValidation": "Configure CloudGuard VMSS settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard VMSS settings", + "elements": [ + { + "name": "upgrading", + "type": "Microsoft.Common.OptionsGroup", + "label": "Are you upgrading your CloudGuard VMSS solution?", + "defaultValue": "No", + "toolTip": "Select 'Yes' if you are upgrading your CloudGuard VMSS solution.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "upgradeVmssInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Warning", + "text": "All the configurations below must be similar to the existing CloudGuard VMSS solution.\n\nNote that the target load balancers are the ones connected to your existing CloudGuard VMSS solution.\n\nSee the Deployment Guide for more information." + } + }, + { + "name": "vmCount", + "type": "Microsoft.Common.TextBox", + "label": "Initial number of gateways", + "defaultValue": "2", + "toolTip": "The initial number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "maxVmCount", + "type": "Microsoft.Common.TextBox", + "label": "Maximum number of gateways", + "defaultValue": "10", + "toolTip": "The maximum number of gateways", + "constraints": { + "required": true, + "regex": "^[1-9][0-9]{0,1}$", + "validationMessage": "Please enter a number in the range 1-99." + } + }, + { + "name": "numGwsValidation", + "type": "Microsoft.Common.InfoBox", + "visible": "[greater(steps('autoprovision').vmCount, steps('autoprovision').maxVmCount)]", + "options": { + "icon": "Error", + "text": "Maximum number of gateways is lower than initial number of gateways" + } + }, + { + "name": "managementServer", + "type": "Microsoft.Common.TextBox", + "label": "Management name", + "toolTip": "The name of the management server as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "configurationTemplateInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "options": { + "icon": "Info", + "text": "Use a different configuration template name than in your existing CloudGuard VMSS solution." + } + }, + { + "name": "configurationTemplate", + "type": "Microsoft.Common.TextBox", + "label": "Configuration template name", + "toolTip": "The configuration template name as it appears in the configuration file", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-]{1,30}$", + "validationMessage": "Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "adminEmail", + "type": "Microsoft.Common.TextBox", + "label": "Administrator email address", + "defaultValue": "", + "toolTip": "An email address to notify about scaling operations", + "constraints": { + "required": false, + "regex": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", + "validationMessage": "Leave empty or enter a valid email address." + } + }, + { + "name": "deploymentMode", + "type": "Microsoft.Common.DropDown", + "label": "Load balancers deployment", + "defaultValue": "Standard (External & Internal)", + "toolTip": "Defines which load balancers will be deployed. Note: For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses.", + "constraints": { + "allowedValues": [ + { + "label": "Standard (External & Internal)", + "value": "Standard" + }, + { + "label": "External only (Inbound inspection only)", + "value": "ELBOnly" + }, + { + "label": "Internal only (Outbound & E-W inspection only - see tooltip)", + "value": "ILBOnly" + } + ] + } + }, + { + "name": "appLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "External Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the External Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "ilbLoadDistribution", + "type": "Microsoft.Common.DropDown", + "label": "Internal Load Balancer session persistence", + "defaultValue": "None (5-tuple)", + "toolTip": "The load balancing distribution method for the Internal Load Balancer.", + "visible": "[not(equals(steps('autoprovision').deploymentMode, 'ELBOnly'))]", + "constraints": { + "allowedValues": [ + { + "label": "None (5-tuple)", + "value": "Default" + }, + { + "label": "Client IP (2-tuple)", + "value": "SourceIP" + }, + { + "label": "Client IP and protocol (3-tuple)", + "value": "SourceIPProtocol" + } + ] + } + }, + { + "name": "floatingIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the Load Balancers with floating IP", + "defaultValue": "No", + "toolTip": "Deploy the Load Balancers with floating IP.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + }, + { + "name": "instanceLevelPublicIP", + "type": "Microsoft.Common.OptionsGroup", + "label": "Deploy the VMSS with instance level Public IP address", + "defaultValue": "No", + "toolTip": "If selected 'Yes', then each VMSS instance will have its own public IP address.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + } + }, + { + "name": "publicIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Public IP prefix", + "defaultValue": "No", + "toolTip": "Define if deploy existsing Public IP Prefix or a new Public IP Prefix.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]" + }, + { + "name": "createNewIPPrefix", + "type": "Microsoft.Common.OptionsGroup", + "label": "Create new IP prefiex", + "toolTip": "Create new or existsing Public IP Prefix", + "defaultValue": "No", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": "[equals(steps('autoprovision').publicIPPrefix, 'yes')]" + }, + { + "name": "IPv4Length", + "type": "Microsoft.Common.DropDown", + "label": "IPv4 IP prefix length", + "defaultValue": "/31 (2 addresses)", + "toolTip": "Choose the length of the IP prefix for IP v4.", + "multiselect": false, + "selectAll": false, + "filter": false, + "multiLine": false, + "constraints": { + "allowedValues": [ + { + "label": "/28 (16 addresses)", + "value": "/28 (16 addresses)" + }, + { + "label": "/29 (8 addresses)", + "value": "/29 (8 addresses)" + }, + { + "label": "/30 (4 addresses)", + "value": "/30 (4 addresses)" + }, + { + "label": "/31 (2 addresses)", + "value": "/31 (2 addresses)" + } + ], + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]" + }, + { + "name": "ipPrefixLengthWarning", + "type": "Microsoft.Common.InfoBox", + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'yes')]", + "options": { + "icon": "Warning", + "text": "[concat('NOTE: The VMSS will not be allowed to contain more than ', if(equals(steps('autoprovision').IPv4Length, '/31 (2 addresses)'), '2', if(equals(steps('autoprovision').IPv4Length, '/30 (4 addresses)'), '4', if(equals(steps('autoprovision').IPv4Length, '/29 (8 addresses)'), '8', if(equals(steps('autoprovision').IPv4Length, '/28 (16 addresses)'), '16', '0')))), ' instances')]" + } + }, + { + "name": "ipPrefixExistingResourceId", + "type": "Microsoft.Common.TextBox", + "label": "Enter an existing IP prefix resource id", + "toolTip": "The resource id of an existing public IP prefix.", + "multiLine": false, + "constraints": { + "regex": "^[a-z0-9A-Z -.:/n]{1,}$", + "validationMessage": "Only alphanumeric characters, hyphens, spaces, periods, and colons are allowed.", + "required": true + }, + "visible": "[equals(steps('autoprovision').createNewIPPrefix, 'no')]" + }, + { + "name": "externalCommunicationInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').instanceLevelPublicIP, 'no'), equals(steps('autoprovision').deploymentMode, 'ILBOnly'))]", + "options": { + "icon": "Warning", + "text": "For outbound inspection it is mandatory to deploy an external load balancer and/or instance level public IP addresses." + } + }, + { + "name": "lbsTargetRGName", + "type": "Microsoft.Common.TextBox", + "visible": "[equals(steps('autoprovision').upgrading, 'yes')]", + "label": "Target load balancers resource group name", + "defaultValue": "", + "toolTip": "The name of the Target Load Balancers Resource Group.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Group only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "Target external load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target External Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "elbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target external load balancer." + } + }, + { + "name": "elbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ILBOnly')))]", + "label": "External load balancer's new backend pool name", + "toolTip": "The name of the new Target External Load Balancer's Backend Pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "ilbResourceId", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Target internal load balancer resource ID", + "defaultValue": "", + "toolTip": "The Resource ID of the Target Internal Load Balancer.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Resource Id only allow alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis" + } + }, + { + "name": "ilbInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "options": { + "icon": "Info", + "text": "Make sure you have created a new backend address pool for the target internal load balancer." + } + }, + { + "name": "ilbBEAddressPoolName", + "type": "Microsoft.Common.TextBox", + "visible": "[and(equals(steps('autoprovision').upgrading, 'yes'), not(equals(steps('autoprovision').deploymentMode, 'ELBOnly')))]", + "label": "Internal load balancer's new backend pool name", + "toolTip": "The name of the new target internal load balancer's backend pool.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z_\\-\\.\\/\\(\\)]", + "validationMessage": "Only alphanumeric characters, periods, underscores, hyphens, slash, and parenthesis are allowed" + } + }, + { + "name": "mgmtInterfaceOpt1", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'yes')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC and with public or private IP.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's public IP address", + "value": "eth0-public" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtInterfaceOpt2", + "type": "Microsoft.Common.DropDown", + "label": "Management interface and IP address", + "defaultValue": "Backend NIC's private IP address", + "visible": "[equals(steps('autoprovision').instanceLevelPublicIP, 'no')]", + "toolTip": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address.", + "constraints": { + "allowedValues": [ + { + "label": "Backend NIC's private IP address", + "value": "eth1-private" + }, + { + "label": "Frontend NIC's private IP address", + "value": "eth0-private" + } + ] + } + }, + { + "name": "mgmtIPaddress", + "type": "Microsoft.Common.TextBox", + "label": "Management Server IP address", + "toolTip": "The IP address used to manage the VMSS instances.", + "visible": "[or(equals(steps('autoprovision').mgmtInterfaceOpt1, 'eth0-private'), equals(steps('autoprovision').mgmtInterfaceOpt2, 'eth0-private'))]", + "constraints": { + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "required": true, + "validationMessage": "Please enter a valid IP address" + } + }, + { + "name": "availabilityZonesNum", + "type": "Microsoft.Common.DropDown", + "label": "Number of Availability Zones to use", + "defaultValue": "None", + "toolTip": "The number of avalability zones to use for the scale set. Note that the load balancers and their IP addresses will be zone redundant in any case.", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", + "constraints": { + "allowedValues": [ + { + "label": "None", + "value": 0 + }, + { + "label": "One zone", + "value": 1 + }, + { + "label": "Two zones", + "value": 2 + }, + { + "label": "Three zones", + "value": 3 + } + ] + } + }, + { + "name": "customMetrics", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable CloudGuard metrics", + "defaultValue": "Yes", + "toolTip": "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service.", + "constraints": { + "allowedValues": [ + { + "label": "No", + "value": "no" + }, + { + "label": "Yes", + "value": "yes" + } + ] + }, + "visible": true + } + ] + }, + { + "name": "chkp", + "label": "Check Point CloudGuard settings", + "subLabel": { + "preValidation": "Configure CloudGuard settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (NGTP)", + "value": "Pay As You Go (NGTP)" + }, + { + "label": "Pay As You Go (NGTX)", + "value": "Pay As You Go (NGTX)" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8040vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R8040vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R81vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R81vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "adminShell", + "type": "Microsoft.Common.DropDown", + "label": "Default shell for the admin user", + "defaultValue": "/etc/cli.sh", + "toolTip": "The default shell for the admin user", + "constraints": { + "allowedValues": [ + { + "label": "/etc/cli.sh", + "value": "/etc/cli.sh" + }, + { + "label": "/bin/bash", + "value": "/bin/bash" + }, + { + "label": "/bin/csh", + "value": "/bin/csh" + }, + { + "label": "/bin/tcsh", + "value": "/bin/tcsh" + } + ] + } + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC Key", + "confirmPassword": "Confirm SIC Key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{12,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "SerialPasswordInfoBox", + "type": "Microsoft.Common.InfoBox", + "visible": "[bool(basics('auth').sshPublicKey)]", + "options": { + "icon": "Info", + "text": "Check Point recommends setting serial console password and maintenance-mode password for recovery purposes. For R81.10 and below the serial console password is used also as maintenance-mode password" + } + }, + { + "visible": "[bool(basics('auth').sshPublicKey)]", + "name": "EnableSerialConsolePassword", + "type": "Microsoft.Common.OptionsGroup", + "label": "Enable Serial console password", + "defaultValue": "Yes", + "toolTip": "A unique password hash to enable VM connection via serial console.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": true + }, + { + "label": "No", + "value": false + } + ] + } + }, + { + "name": "AdditionalPassword", + "type": "Microsoft.Common.PasswordBox", + "toolTip": "Serial console password hash, used to enable password authentication (using serial console). To generate password hash use the command 'openssl passwd -6 PASSWORD'", + "visible": "[and(bool(basics('auth').sshPublicKey), steps('chkp').EnableSerialConsolePassword)]", + "label": { + "password": "Password hash", + "confirmPassword": "Confirm password" + }, + "constraints": { + "required": true, + "regex": "^.{12,300}$", + "validationMessage": "The value must be the output of the hash command." + }, + "options": { + "hideConfirmation": false + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[not(contains('R80.40 R81' , steps('chkp').cloudGuardVersion))]", + "defaultValue": "Premium", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "VMDiskTypeOldVersions", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[contains('R80.40 R81' , steps('chkp').cloudGuardVersion)]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + }, + "visible": "[not(contains('R80.40 R81', steps('chkp').cloudGuardVersion))]" + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "Use custom image URI.", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "VMSS Frontend subnet", + "defaultValue": { + "name": "VMSS-Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + }, + "subnet2": { + "label": "VMSS Backend subnet", + "defaultValue": { + "name": "VMSS-Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": "[steps('autoprovision').maxVmCount]", + "requireContiguousAddresses": false + } + } + } + }, + { + "name": "NSG", + "type": "Microsoft.Common.OptionsGroup", + "label": "Network Security Group", + "toolTip": "Choose between using an existing NSG or using a new NSG", + "constraints": { + "allowedValues": [ + { + "label": "Create new", + "value": true + }, + { + "label": "Existing NSG", + "value": false + } + ], + "required": true + }, + "visible": true + }, + { + "name": "nsgSelector", + "type": "Microsoft.Solutions.ResourceSelector", + "label": "Network Security Group", + "defaultValue": "null", + "toolTip": "Choose an existing NSG", + "resourceType": "Microsoft.Network/NetworkSecurityGroups", + "options": { + "filter": { + "subscription": "onBasics", + "location": "onBasics" + } + }, + "constraints": { + "required": true + }, + "visible": "[equals(steps('network').NSG, false)]" + }, + { + "name": "NSGName", + "type": "Microsoft.Common.TextBox", + "label": "Name", + "defaultValue": "[concat(basics('gatewayScaleSetNameUi') , '-nsg')]", + "toolTip": "Insert Name for the new NSG", + "multiLine": false, + "constraints": { + "required": "[steps('network').NSG]", + "regex": "^[a-z0-9A-Z-]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + }, + "visible": "[steps('network').NSG]" + }, + { + "name": "addStorageAccountIpRules", + "type": "Microsoft.Common.OptionsGroup", + "defaultValue": "Network access from all networks", + "label": "Storage Account Network Access", + "toolTip": "Select your preferred network access to the Storage Account, for more information - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#serial-console-security", + "constraints": { + "allowedValues": [ + { + "label": "Network access from all networks", + "value": false + }, + { + "label": "Network access only from Serial Console", + "value": true + } + ], + "required": true + }, + "visible": true + } + ] + }, + { + "name": "tags", + "label": "Tags", + "elements": [ + { + "name": "tagsByResource", + "type": "Microsoft.Common.TagsByResource", + "toolTip": "Create Azure tags for the new resources", + "resources": [ + "Function App", + "Microsoft.Storage/storageAccounts", + "Microsoft.Compute/virtualMachineScaleSets", + "Microsoft.Network/routeTables", + "Microsoft.Network/virtualNetworks", + "Microsoft.Network/networkSecurityGroups", + "Microsoft.Network/publicIPAddresses", + "Microsoft.Network/loadBalancers" + ] + } + ] + } + ], + "outputs": { + "location": "[location()]", + "authenticationType": "[basics('auth').authenticationType]", + "adminPassword": "[basics('auth').password]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "upgrading": "[steps('autoprovision').upgrading]", + "vmName": "[basics('gatewayScaleSetNameUi')]", + "instanceCount": "[steps('autoprovision').vmCount]", + "maxInstanceCount": "[steps('autoprovision').maxVmCount]", + "managementServer": "[steps('autoprovision').managementServer]", + "configurationTemplate": "[steps('autoprovision').configurationTemplate]", + "adminEmail": "[steps('autoprovision').adminEmail]", + "deploymentMode": "[steps('autoprovision').deploymentMode]", + "instanceLevelPublicIP": "[steps('autoprovision').instanceLevelPublicIP]", + "lbsTargetRGName": "[steps('autoprovision').lbsTargetRGName]", + "elbResourceId": "[steps('autoprovision').elbResourceId]", + "elbTargetBEAddressPoolName": "[steps('autoprovision').elbBEAddressPoolName]", + "ilbResourceId": "[steps('autoprovision').ilbResourceId]", + "ilbTargetBEAddressPoolName": "[steps('autoprovision').ilbBEAddressPoolName]", + "mgmtInterfaceOpt1": "[steps('autoprovision').mgmtInterfaceOpt1]", + "mgmtInterfaceOpt2": "[steps('autoprovision').mgmtInterfaceOpt2]", + "mgmtIPaddress": "[steps('autoprovision').mgmtIPaddress]", + "appLoadDistribution": "[steps('autoprovision').appLoadDistribution]", + "ilbLoadDistribution": "[steps('autoprovision').ilbLoadDistribution]", + "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", + "customMetrics": "[steps('autoprovision').customMetrics]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiNGTP, steps('chkp').R8040vmSizeUiNGTX, steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiNGTP, steps('chkp').R81vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[if(contains('R80.40 R81' , steps('chkp').cloudGuardVersion) , steps('chkp').VMDiskTypeOldVersions , steps('chkp').VMDiskType)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "floatingIP": "[steps('autoprovision').floatingIP]", + "IPv4Length": "[steps('autoprovision').IPv4Length]", + "publicIPPrefix": "[steps('autoprovision').publicIPPrefix]", + "createNewIPPrefix": "[steps('autoprovision').createNewIPPrefix]", + "ipPrefixExistingResourceId": "[steps('autoprovision').ipPrefixExistingResourceId]", + "adminShell": "[steps('chkp').adminShell]", + "tagsByResource": "[steps('tags').tagsByResource]", + "deployNewNSG": "[steps('network').NSG]", + "ExistingNSG": "[steps('network').nsgSelector]", + "NewNsgName": "[steps('network').NSGName]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]" + } + } +} diff --git a/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..b343976c --- /dev/null +++ b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json @@ -0,0 +1,1156 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "Subscription ID." + } + }, + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)" + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "instanceCount": { + "defaultValue": "2", + "type": "string", + "metadata": { + "description": "Number of VM instances" + } + }, + "maxInstanceCount": { + "defaultValue": "10", + "type": "string", + "metadata": { + "description": "Maximum number of VM instances" + } + }, + "managementServer": { + "type": "string", + "metadata": { + "description": "The name of the management server as it appears in the configuration file" + } + }, + "configurationTemplate": { + "type": "string", + "metadata": { + "description": "A name of a template as it appears in the configuration file" + } + }, + "adminEmail": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Email address to notify if there are any scaling operations" + } + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "SerialConsolePasswordHash": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "Description": "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Name of the Check Point Security Gateway scale set" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "adminShell": { + "type": "string", + "defaultValue": "/etc/cli.sh", + "allowedValues": [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ], + "metadata": { + "Description": "The default shell for the admin user" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "upgrading": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "Description": "Indicates whether the user in upgrading the CloudGuard VMSS solution" + } + }, + "floatingIP": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Deploy the Load Balancers with floating IP" + } + }, + "instanceLevelPublicIP": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "no", + "metadata": { + "description": "Deploy the VMSS with instance level Public IP address" + } + }, + "publicIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Use public IP prefix." + } + }, + "createNewIPPrefix": { + "type": "string", + "defaultValue": "no", + "allowedValues": [ + "no", + "yes" + ], + "metadata": { + "description": "Create new IP prefix or use an existing one." + } + }, + "IPv4Length": { + "type": "string", + "defaultValue": "/31 (2 addresses)", + "allowedValues": [ + "/28 (16 addresses)", + "/29 (8 addresses)", + "/30 (4 addresses)", + "/31 (2 addresses)" + ], + "metadata": { + "description": "Choose the IP prefix length for IP v4." + } + }, + "ipPrefixExistingResourceId": { + "type": "string", + "metadata": { + "description": "The resource id of the existing IP prefix." + }, + "defaultValue": "" + }, + "lbsTargetRGName": { + "type": "string", + "metadata": { + "description": "The name of the Target Load Balancers Resource Group." + }, + "defaultValue": "" + }, + "elbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target External Load Balancer." + }, + "defaultValue": "" + }, + "elbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target External Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "ilbResourceId": { + "type": "string", + "metadata": { + "description": "The Resource ID of the Target Internal Load Balancer." + }, + "defaultValue": "" + }, + "ilbTargetBEAddressPoolName": { + "type": "string", + "metadata": { + "description": "The name of the new Target Internal Load Balancer's Backend Pool." + }, + "defaultValue": "" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.4" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "[resourceGroup().name]" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "mgmtInterfaceOpt1": { + "type": "string", + "allowedValues": [ + "eth0-public", + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtInterfaceOpt2": { + "type": "string", + "allowedValues": [ + "eth0-private", + "eth1-private" + ], + "defaultValue": "eth1-private", + "metadata": { + "description": "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address." + } + }, + "mgmtIPaddress": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The IP address used to manage the VMSS instances." + } + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "appLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The External Load Balancer distribution method" + } + }, + "ilbLoadDistribution": { + "type": "string", + "allowedValues": [ + "Default", + "SourceIP", + "SourceIPProtocol" + ], + "defaultValue": "Default", + "metadata": { + "description": "The Internal Load Balancer distribution method" + } + }, + "deploymentMode": { + "type": "string", + "allowedValues": [ + "Standard", + "ILBOnly", + "ELBOnly" + ], + "defaultValue": "Standard", + "metadata": { + "description": "Solution deployment architecture." + } + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "availabilityZonesNum": { + "type": "int", + "allowedValues": [ + 0, + 1, + 2, + 3 + ], + "defaultValue": 0, + "metadata": { + "description": "The number of availability zones" + } + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "Use the following URI when deploying a custom template: https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "customMetrics": { + "type": "string", + "allowedValues": [ + "no", + "yes" + ], + "defaultValue": "yes", + "metadata": { + "Description": "Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring" + } + }, + "rbacGuid": { + "type": "string", + "defaultValue": "[newGuid()]" + }, + "tagsByResource": { + "type": "object", + "defaultValue": {} + }, + "deployNewNSG": { + "type": "bool", + "defaultValue": true + }, + "ExistingNSG": { + "type": "object", + "defaultValue": {} + }, + "NewNsgName": { + "type": "string", + "defaultValue": "[concat(parameters('vmName'),'-nsg')]" + }, + "addStorageAccountIpRules": { + "type": "bool", + "metadata": { + "description": "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, based on https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux#use-serial-console-with-custom-boot-diagnostics-storage-account-firewall-enabled" + }, + "defaultValue" : false + }, + "storageAccountAdditionalIps":{ + "type": "array", + "metadata": { + "description": "IPs/CIDRs that are allowed access to the Storage Account" + }, + "defaultValue" : [] + } + }, + "variables": { + "resourceGroup": "[resourceGroup()]", + "resourceGroupName": "[resourceGroup().name]", + "templateName": "vmss-v2", + "templateVersion": "20230910", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "SerialConsoleGeographies": { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"]}, + "serialConsoleIps": "[if(contains(variables('serialConsoleGeographies'),variables('location')),variables('serialConsoleGeographies')[variables('location')],createArray())]", + "storageAccountIps" : "[concat(variables('SerialConsoleIps'),parameters('storageAccountAdditionalIps'))]", + "isBlink": true, + "subnet2Name": "[parameters('subnet2Name')]", + "storageAccountName": "[concat('bootdiag', uniqueString(variables('resourceGroup').id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "additionalDiskSizeGB": "[if(contains('R8040 R81', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", + "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTP-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp-v2", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceNGTX-V2": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx-v2", + "version": "latest" + }, + "imageReferenceMarketplace": "[if(equals(variables('offer'), 'BYOL'), variables('imageReferenceBYOL'), if(equals(variables('offer'), 'NGTP'), variables('imageReferenceNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('imageReferenceNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('imageReferenceNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('imageReferenceNGTX-V2'), json('null'))))))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "linuxConfigurationpassword": { + "disablePasswordAuthentication": "false" + }, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), variables('linuxConfigurationpassword'), variables('linuxConfigurationsshPublicKey'))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX-V2": { + "name": "sg-ngtx-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[if(equals(variables('offer'), 'BYOL') , variables('planBYOL'), if(equals(variables('offer'), 'NGTP'), variables('planNGTP'), if(equals(variables('offer'), 'NGTP-V2'), variables('planNGTP-V2'), if(equals(variables('offer'), 'NGTX'), variables('planNGTX'), if(equals(variables('offer'), 'NGTX-V2'), variables('planNGTX-V2'), json('null'))))))]", + "vmssID": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "sicKey": "[parameters('sicKey')]", + "installationType": "vmss", + "upgrading": "[equals(parameters('upgrading'), 'yes')]", + "_artifactsLocation": "[if(contains(parameters('_artifactsLocation'),'raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/marketplace'),'https://raw.githubusercontent.com/CheckPointSW/CloudGuardIaaS/master/azure/templates/',parameters('_artifactsLocation'))]", + "networkSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/vnet-2-subnet-ha-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "loadBalacerSetupURL": "[uri(variables('_artifactsLocation'), concat('nestedtemplates/load-balancers.json', parameters('_artifactsLocationSasToken')))]", + "lbsTargetRGName": "[parameters('lbsTargetRGName')]", + "lbRGName": "[if(variables('upgrading'), variables('lbsTargetRGName'), resourceGroup().name)]", + "loadBalancerSetupId": "[resourceId(variables('lbRGName'), 'Microsoft.Resources/deployments', 'loadBalancerSetup')]", + "deployNewVnet": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "vnetRGName": "[if(variables('deployNewVnet'), variables('resourceGroupName'), parameters('virtualNetworkExistingRGName'))]", + "vnetID": "[if(variables('deployNewVnet'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkNewSetup'), resourceId(variables('vnetRGName'), 'Microsoft.Resources/deployments', 'networkExistingSetup'))]", + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", + "customImageId": "[variables('imageReferenceCustomUri').id]", + "availabilityZonesLocations": [ + "brazilsouth", + "canadacentral", + "centralus", + "eastus", + "eastus2", + "southcentralus", + "usgovvirginia", + "westus2", + "westus3", + "francecentral", + "germanywestcentral", + "northeurope", + "norwayeast", + "uksouth", + "westeurope", + "swedencentral", + "switzerlandnorth", + "qatarcentral", + "uaenorth", + "southafricanorth", + "australiaeast", + "centralindia", + "japaneast", + "koreacentral", + "southeastasia", + "eastasia", + "italynorth" + ], + "availabilityZonesProperty": "[range(1, parameters('availabilityZonesNum'))]", + "mgmtInterface": "[if(equals(parameters('instanceLevelPublicIP'), 'yes'), parameters('mgmtInterfaceOpt1'), parameters('mgmtInterfaceOpt2'))]", + "mgmtIpAddressType": "[split(variables('mgmtInterface'), '-')[1]]", + "mgmtInterfaceName": "[split(variables('mgmtInterface'), '-')[0]]", + "mgmtIPaddress": "[if(equals(variables('mgmtInterfaceName'), 'eth0'), parameters('mgmtIPaddress'), '')]", + "commomTags": { + "x-chkp-management": "[parameters('managementServer')]", + "x-chkp-template": "[parameters('configurationTemplate')]", + "x-chkp-ip-address": "[variables('mgmtIpAddressType')]", + "x-chkp-management-interface": "[variables('mgmtInterfaceName')]", + "x-chkp-topology": "eth0:external,eth1:internal", + "x-chkp-anti-spoofing": "eth0:false,eth1:false", + "x-chkp-srcImageUri": "[parameters('sourceImageVhdUri')]" + }, + "uniqueTags": { + "x-chkp-management-address": "[variables('mgmtIPaddress')]" + }, + "vmssTags": "[if(equals(variables('mgmtIPaddress'), ''), variables('commomTags'), union(variables('commomTags'), variables('uniqueTags')))]", + "customMetrics": "[parameters('customMetrics')]", + "monitoringMetricsPublisher": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', '3913510d-42f4-4e42-8a64-420c390055eb')]", + "identity": "[json('{\"type\": \"SystemAssigned\"}')]", + "IPv4Lengths": { + "/28 (16 addresses)": "28", + "/29 (8 addresses)": "29", + "/30 (4 addresses)": "30", + "/31 (2 addresses)": "31" + }, + "ipPrefixNewName": "[concat(parameters('vmName'), '-ipprefix')]", + "ipPrefixExistingResourceId": "[if(equals(parameters('publicIPPrefix'), 'yes'), parameters('ipPrefixExistingResourceId'), json('null'))]", + "ipPrefixId": "[resourceId('Microsoft.Network/publicipprefixes',variables('ipPrefixNewName'))]", + "publicIPPrefixId": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('ipPrefixId'), json('null'))]", + "usePublicIPPrefix": "[if(equals(parameters('createNewIPPrefix'),'yes'), variables('publicIPPrefixId'), variables('ipPrefixExistingResourceId'))]", + "publicIPPropertiesWithPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15, + "PublicIpPrefix": { + "Id": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('usePublicIPPrefix'), json('null'))]" + } + } + }, + "publicIPPropertiesWithoutPrefix": { + "name": "instancePublicIP", + "properties": { + "idleTimeoutInMinutes": 15 + } + }, + "publicIPPrefixLength": "[variables('IPv4Lengths')[parameters('IPv4Length')]]", + "useIpPrefix": "[if(equals(parameters('publicIPPrefix'), 'yes'), variables('publicIPPropertiesWithPrefix'), variables('publicIPPropertiesWithoutPrefix'))]", + "NewNsgReference": {"id": "[resourceId(variables('vnetRGName'),'Microsoft.Network/networkSecurityGroups', parameters('NewNsgName'))]"} + }, + "resources": [ + { + "condition": "[and(equals(parameters('createNewIPPrefix'), 'yes'), equals(parameters('publicIPPrefix'), 'yes'))]", + "apiVersion": "2020-06-01", + "type": "Microsoft.Network/publicipprefixes", + "name": "[variables('ipPrefixNewName')]", + "location": "[variables('location')]", + "properties": { + "prefixLength": "[variables('publicIPPrefixLength')]", + "publicIPAddressVersion": "IPv4" + }, + "sku": { + "name": "Standard", + "tier": "Regional" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/publicipprefixes'), parameters('tagsByResource')['Microsoft.Network/publicipprefixes'], json('{}')) ]" + }, + { + "apiVersion": "2020-06-01", + "name": "pid-6f13b00a-7546-4ab2-be9f-c66815cc6c8b-partnercenter", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + }, + { + "condition": "[equals(variables('customMetrics'), 'yes')]", + "apiVersion": "2020-04-01-preview", + "type": "Microsoft.Authorization/roleAssignments", + "name": "[parameters('rbacGuid')]", + "properties": { + "roleDefinitionId": "[variables('monitoringMetricsPublisher')]", + "principalId": "[reference(variables('vmssID'), '2021-07-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]" + }, + "dependsOn": [ + "[variables('vmssID')]" + ], + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Authorization/roleAssignments'), parameters('tagsByResource')['Microsoft.Authorization/roleAssignments'], json('{}')) ]" + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'new')]", + "name": "networkNewSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "condition": "[equals(parameters('vnetNewOrExisting'), 'existing')]", + "name": "networkExistingSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2020-06-01", + "resourceGroup": "[variables('vnetRGName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkExistingRGName": { + "value": "[variables('vnetRGName')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "deployNsg": { + "value": "[parameters('deployNewNSG')]" + }, + "NewNsgName": + { + "value":"[parameters('NewNsgName')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "name": "loadBalancerSetup", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('lbRGName')]", + "apiVersion": "2020-06-01", + "dependsOn": [ + "[variables('vnetID')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('loadBalacerSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentMode": { + "value": "[parameters('deploymentMode')]" + }, + "location": { + "value": "[variables('location')]" + }, + "vmName": { + "value": "[parameters('vmName')]" + }, + "appLoadDistribution": { + "value": "[parameters('appLoadDistribution')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "subnet2Id": { + "value": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), variables('subnet2Name'))]" + }, + "ilbLoadDistribution": { + "value": "[parameters('ilbLoadDistribution')]" + }, + "elbResourceId": { + "value": "[parameters('elbResourceId')]" + }, + "elbTargetBEAddressPoolName": { + "value": "[parameters('elbTargetBEAddressPoolName')]" + }, + "ilbResourceId": { + "value": "[parameters('ilbResourceId')]" + }, + "ilbTargetBEAddressPoolName": { + "value": "[parameters('ilbTargetBEAddressPoolName')]" + }, + "upgrading": { + "value": "[variables('upgrading')]" + }, + "floatingIp": { + "value": "[variables('enableFloatingIP')]" + }, + "tagsByResource": { + "value": "[parameters('tagsByResource')]" + } + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "2021-04-01", + "properties": { + "supportsHttpsTrafficOnly": true, + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "None", + "defaultAction": "[if(parameters('addStorageAccountIpRules'), 'Deny', 'Allow')]", + "ipRules": "[if(parameters('addStorageAccountIpRules'), map(variables('storageAccountIps'), lambda('ip',createObject('action','Allow','value',lambdaVariables('ip')))), createArray())]" + } + }, + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2020-06-01", + "name": "[variables('customImage')]", + "location": "[variables('resourceGroup').location]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + }, + "hyperVGeneration": "V1" + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/images'), parameters('tagsByResource')['Microsoft.Compute/images'], json('{}')) ]" + }, + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "apiVersion": "2021-07-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "identity": "[if(equals(variables('customMetrics'), 'yes'), variables('identity'), json('null'))]", + "zones": "[if(and(contains(variables('availabilityZonesLocations'), variables('location')), greater(parameters('availabilityZonesNum'), 0)), variables('availabilityZonesProperty'), json('null'))]", + "tags": "[union(variables('vmssTags'),if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachineScaleSets'), parameters('tagsByResource')['Microsoft.Compute/virtualMachineScaleSets'], json('{}')))]", + "dependsOn": [ + "[variables('vnetID')]", + "[variables('loadBalancerSetupId')]", + "[variables('storageAccountId')]", + "[variables('customImageId')]" + ], + "sku": { + "name": "[parameters('vmSize')]", + "tier": "Standard", + "capacity": "[parameters('instanceCount')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + }, + "imageReference": "[variables('imageReference')]" + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[concat('not','used')]", + "computerNamePrefix": "[toLower(parameters('vmName'))]", + "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefixes.value[0], reference('networkExistingSetup').outputs.vnetAddressPrefixes.value[0]), '\"', '\n' ))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "eth0", + "properties": { + "primary": true, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "networkSecurityGroup":"[if(parameters('deployNewNSG') , variables('NewNsgReference') , parameters('ExistingNSG'))]", + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "publicIpAddressConfiguration": "[if(equals(parameters('instanceLevelPublicIP'),'yes'), variables('useIpPrefix'), json('null'))]", + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.elbId.value), json('null'), reference('loadBalancerSetup').outputs.elbBEAddressPoolProperties.value)]" + } + } + ] + } + }, + { + "name": "eth1", + "properties": { + "primary": false, + "enableIPForwarding": true, + "enableAcceleratedNetworking": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "subnet": { + "id": "[resourceId(variables('vnetRGName'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('Subnet2Name'))]" + }, + "loadBalancerBackendAddressPools": "[if(empty(reference('loadBalancerSetup').outputs.ilbId.value), json('null'), reference('loadBalancerSetup').outputs.ilbBEAddressPoolProperties.value)]" + } + } + ] + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(variables('storageAccountId'), '2021-04-01').primaryEndpoints.blob]" + } + } + }, + "overprovision": false + } + }, + { + "type": "Microsoft.Insights/autoscaleSettings", + "apiVersion": "2015-04-01", + "name": "[parameters('vmName')]", + "location": "[variables('location')]", + "dependsOn": [ + "[variables('vmssID')]" + ], + "properties": { + "name": "[parameters('vmName')]", + "targetResourceUri": "[variables('vmssID')]", + "notifications": [ + { + "operation": "Scale", + "email": { + "sendToSubscriptionAdministrator": false, + "sendToSubscriptionCoAdministrators": false, + "customEmails": "[if(empty(parameters('adminEmail')), json('null'), array(parameters('adminEmail')))]" + } + } + ], + "enabled": true, + "profiles": [ + { + "name": "Profile1", + "capacity": { + "minimum": "[parameters('instanceCount')]", + "maximum": "[parameters('maxInstanceCount')]", + "default": "[parameters('instanceCount')]" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + }, + { + "metricTrigger": { + "metricName": "Percentage CPU", + "metricResourceUri": "[variables('vmssID')]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT5M", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT5M" + } + } + ] + } + ] + }, + "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Insights/autoscaleSettings'), parameters('tagsByResource')['Microsoft.Insights/autoscaleSettings'], json('{}')) ]" + } + ], + "outputs": { + "ApplicationAddress": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationAddress.value]" + }, + "ApplicationFQDN": { + "type": "string", + "value": "[reference('loadBalancerSetup').outputs.ApplicationFQDN.value]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/README.MD b/deprecated/azure/templates/README.MD new file mode 100644 index 00000000..54bccf0a --- /dev/null +++ b/deprecated/azure/templates/README.MD @@ -0,0 +1,5 @@ +# Deprecated Azure Resource Manager templates +This directory contains deprecated CloudGuard IaaS solution templates. + +# How to deploy the templates +To deploy the ARM templates follow the instructions in the README.MD file in each directory. diff --git a/deprecated/azure/templates/stack-R8030/stack-ha/createUiDefinition.json b/deprecated/azure/templates/stack-R8030/stack-ha/createUiDefinition.json new file mode 100644 index 00000000..5f68c32c --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-ha/createUiDefinition.json @@ -0,0 +1,438 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the Check Point CloudGuard Cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Cluster Object settings", + "subLabel": { + "preValidation": "Configure CloudGuard Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R8030Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[equals(steps('chkp').cloudGuardVersion, 'R80.30')]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R8030Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R8030Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R8030Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R8030Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8030/stack-ha/mainTemplate.json b/deprecated/azure/templates/stack-R8030/stack-ha/mainTemplate.json new file mode 100644 index 00000000..7e65c2fa --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-ha/mainTemplate.json @@ -0,0 +1,703 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "cluster-stack", + "templateName": "stack-ha", + "templateVersion": "20190626", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP", + "R80.30 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8030": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n', 'subnet1Prefix=\"', first(split(parameters('subnet1Prefix'), '/')), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n')]", + "imageOfferR8030": "check-point-cg-stack-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack-ha', '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]" + ], + "Subnet2PrivateAddresses": [ + "[parameters('subnet2StartAddress')]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]" + ], + "publicIPAddressName1": "[concat(parameters('vmName'), 1)]", + "publicIPAddressId1": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName1'))]", + "publicIPAddressName2": "[concat(parameters('vmName'), 2)]", + "publicIPAddressId2": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName2'))]", + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "elbBEAddressPool": "[concat(variables('lbName'), '-pool')]", + "elbBEAddressPoolID": "[concat(variables('lbId'),'/backendAddressPools/',variables('elbBEAddressPool'))]", + "appProbeName": "health_prob_port", + "elbPublicIPName": "frontend-lb-address", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "lbId": "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "lbName": "frontend-lb" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet1StartAddress": { + "value": "[parameters('subnet1StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', copyIndex(1), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId1')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 1))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId2')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 2))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "interface2Copy", + "count": "[variables('count')]" + }, + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('Subnet2PrivateAddresses')[copyIndex(0)]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('lbName')]", + "location": "[variables('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8081, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId1')).IpAddress]" + }, + "Member1FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId1')).dnsSettings.fqdn]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId2')).IpAddress]" + }, + "Member2FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId2')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8030/stack-mgmt/createUiDefinition.json b/deprecated/azure/templates/stack-R8030/stack-mgmt/createUiDefinition.json new file mode 100644 index 00000000..ec280647 --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-mgmt/createUiDefinition.json @@ -0,0 +1,371 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point CloudGuard Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Security Management Server settings", + "subLabel": { + "preValidation": "Configure CloudGuard Security Management Server settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[equals(substring(steps('chkp').cloudGuardVersion,0,3), 'R80')]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiMGMT25, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8030/stack-mgmt/mainTemplate.json b/deprecated/azure/templates/stack-R8030/stack-mgmt/mainTemplate.json new file mode 100644 index 00000000..f639f774 --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-mgmt/mainTemplate.json @@ -0,0 +1,472 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (MGMT25)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Management Server" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the management subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the management subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the management subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + } + }, + "variables": { + "installationType": "management-stack", + "templateName": "stack-management", + "templateVersion": "20190626", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (MGMT25)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": false, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8030": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8030": "check-point-cg-stack-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-1-subnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "notused", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "FQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8030/stack-single/createUiDefinition.json b/deprecated/azure/templates/stack-R8030/stack-single/createUiDefinition.json new file mode 100644 index 00000000..4227b4f5 --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-single/createUiDefinition.json @@ -0,0 +1,441 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Compute.MultiVm", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard Gateway.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Gateway settings", + "subLabel": { + "preValidation": "Configure CloudGuard Gateway settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Gateway settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R80.30", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.30", + "value": "R80.30" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": "[equals(substring(steps('chkp').cloudGuardVersion,0,3), 'R80')]", + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8030vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8030vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.30'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-stack-r8030", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "VMDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "toolTip": "Type of CloudGuard disk.", + "visible": "[or(contains(steps('chkp').R8030vmSizeUiBYOL, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTP, 'DS'), contains(steps('chkp').R8030vmSizeUiNGTX, 'DS'))]", + "defaultValue": "Standard", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard_LRS" + }, + { + "label": "Premium", + "value": "Premium_LRS" + } + ] + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8030vmSizeUiBYOL, steps('chkp').R8030vmSizeUiNGTP, steps('chkp').R8030vmSizeUiNGTX)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "diskType": "[coalesce(steps('chkp').VMDiskType, 'Standard_LRS')]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8030/stack-single/mainTemplate.json b/deprecated/azure/templates/stack-R8030/stack-single/mainTemplate.json new file mode 100644 index 00000000..1d88f17c --- /dev/null +++ b/deprecated/azure/templates/stack-R8030/stack-single/mainTemplate.json @@ -0,0 +1,556 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.30 - Bring Your Own License", + "R80.30 - Pay As You Go (NGTP)", + "R80.30 - Pay As You Go (NGTX)" + ], + "defaultValue": "R80.30 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the backend subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "gateway-stack", + "templateName": "stack-single", + "templateVersion": "20190626", + "location": "[parameters('location')]", + "offers": { + "R80.30 - Bring Your Own License": "BYOL", + "R80.30 - Pay As You Go (NGTP)": "NGTP", + "R80.30 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.30 - Bring Your Own License": "R8030", + "R80.30 - Pay As You Go (NGTP)": "R8030", + "R80.30 - Pay As You Go (NGTX)": "R8030" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSizeGBR8030": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables(concat('diskSizeGB', variables('osVersion'))))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8030": "check-point-cg-stack-r8030", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(toLower(parameters('vmName')), '-', uniquestring(resourceGroup().id, deployment().name))]" + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + }, + "GatewayFQDN": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).dnsSettings.fqdn]" + } + } +} diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..e8491d12 --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/createUiDefinition.json @@ -0,0 +1,763 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "clusterObjectNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Cluster Object Name", + "toolTip": "The name of the Check Point CloudGuard Cluster object.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Cluster Object settings", + "subLabel": { + "preValidation": "Configure CloudGuard Cluster Object settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard cluster Object settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R8040vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R8040vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R81vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtx" + }, + "count": 2 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the cluster object and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + }, + "visible": "true" + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 2, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('clusterObjectNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiNGTP, steps('chkp').R8040vmSizeUiNGTX, steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiNGTP, steps('chkp').R81vmSizeUiNGTX)]", + "sicKey": "[steps('chkp').sicKeyUi]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", + "subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..0847143c --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json @@ -0,0 +1,699 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Cluster object" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefixes": { + "type": "array", + "metadata": { + "description": "The address prefixes of the virtual network" + }, + "defaultValue": [ + "10.0.0.0/16" + ] + }, + "subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the 2nd subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "cluster-stack", + "templateName": "stack-ha", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n', 'subnet1Prefix=\"', first(split(parameters('subnet1Prefix'), '/')), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'tenantId=\"', subscription().tenantId, '\"', '\n', 'virtualNetwork=\"', parameters('virtualNetworkName'), '\"', '\n', 'clusterName=\"', parameters('vmName'), '\"', '\n')]", + "imageOfferR8040": "check-point-cg-r8040", + "imageOfferR81": "check-point-cg-r81", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "eth0", + "nic2Name": "eth1", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack-ha', '.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "", + "externalPrivateAddresses": [ + "[parameters('Subnet1StartAddress')]", + "[concat(split(parameters('subnet1StartAddress'), '.')[0],'.', split(parameters('subnet1StartAddress'), '.')[1],'.', split(parameters('subnet1StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet1StartAddress'), '.')[3]),1)))]" + ], + "Subnet2PrivateAddresses": [ + "[parameters('subnet2StartAddress')]", + "[concat(split(parameters('subnet2StartAddress'), '.')[0],'.', split(parameters('subnet2StartAddress'), '.')[1],'.', split(parameters('subnet2StartAddress'), '.')[2],'.', string(add(int(split(parameters('subnet2StartAddress'), '.')[3]),1)))]" + ], + "publicIPAddressName1": "[concat(parameters('vmName'), 1)]", + "publicIPAddressId1": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName1'))]", + "publicIPAddressName2": "[concat(parameters('vmName'), 2)]", + "publicIPAddressId2": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName2'))]", + "availabilitySetName": "[concat(parameters('vmName'), '-AvailabilitySet')]", + "count": 2, + "frontEndIPConfMember1Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "frontEndIPConfMember2Id": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "member1IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd1')]", + "member2IPConfigId": "[concat(variables('lbId'), '/frontendIPConfigurations/LoadBalancerFrontEnd2')]", + "elbBEAddressPool": "[concat(variables('lbName'), '-pool')]", + "elbBEAddressPoolID": "[concat(variables('lbId'),'/backendAddressPools/',variables('elbBEAddressPool'))]", + "appProbeName": "health_prob_port", + "elbPublicIPName": "frontend-lb-address", + "elbPublicIPId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('elbPublicIPName'))]", + "lbId": "[resourceId('Microsoft.Network/loadBalancers', variables('lbName'))]", + "lbName": "frontend-lb" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefixes": { + "value": "[parameters('virtualNetworkAddressPrefixes')]" + }, + "subnet1Name": { + "value": "[parameters('subnet1Name')]" + }, + "subnet1Prefix": { + "value": "[parameters('subnet1Prefix')]" + }, + "subnet1StartAddress": { + "value": "[parameters('subnet1StartAddress')]" + }, + "subnet2Name": { + "value": "[parameters('subnet2Name')]" + }, + "subnet2Prefix": { + "value": "[parameters('subnet2Prefix')]" + }, + "subnet2StartAddress": { + "value": "[parameters('subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Compute/availabilitySets", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(variables('availabilitySetName'))]", + "properties": { + "platformFaultDomainCount": 2 + }, + "sku": { + "name": "Aligned" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('elbPublicIPName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "publicAddressCopy", + "count": "[variables('count')]" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId1')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '1-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[0]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 1))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('lbId')]", + "[variables('publicIPAddressId2')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), '2-', variables('nic1Name'))]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('externalPrivateAddresses')[1]]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables(concat('publicIPAddressId', 2))]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + }, + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('elbBEAddressPoolID')]" + } + ] + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name'))]", + "copy": { + "name": "interface2Copy", + "count": "[variables('count')]" + }, + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[variables('Subnet2PrivateAddresses')[copyIndex(0)]]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "copy": { + "name": "virtualMachineCopy", + "count": "[variables('count')]" + }, + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "availabilitySet": { + "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic1Name')))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(parameters('vmName'), copyIndex(1), '-', variables('nic2Name')))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[concat(toLower(parameters('vmName')), copyIndex(1))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[concat(parameters('vmName'), copyIndex(1))]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[variables('elbPublicIPId')]" + ], + "name": "[variables('lbName')]", + "location": "[variables('location')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontend", + "properties": { + "publicIPAddress": { + "id": "[variables('elbPublicIPId')]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "[variables('elbBEAddressPool')]" + } + ], + "probes": [ + { + "name": "[variables('appProbeName')]", + "properties": { + "protocol": "tcp", + "port": 8081, + "intervalInSeconds": 5, + "numberOfProbes": 2 + } + } + ] + } + } + ], + "outputs": { + "Member1IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId1')).IpAddress]" + }, + "Member2IPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId2')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..0ce4fcf5 --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/createUiDefinition.json @@ -0,0 +1,366 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "Server Name", + "toolTip": "The name of the Check Point CloudGuard Security Management Server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Security Management Server settings", + "subLabel": { + "preValidation": "Configure CloudGuard Security Management Server settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Security Management settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + }, + { + "label": "Pay As You Go (MGMT25)", + "value": "Pay As You Go (MGMT25)" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "mgmt-25" + }, + "count": 1 + }, + { + "name": "managementGUIClientNetwork", + "type": "Microsoft.Common.TextBox", + "label": "Allowed GUI clients", + "toolTip": "GUI clients network CIDR", + "defaultValue": "0.0.0.0/0", + "constraints": { + "required": true, + "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", + "validationMessage": "Enter a valid IPv4 network CIDR" + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnet" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "The subnet to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/20" + }, + "constraints": { + "minAddressPrefixSize": "/29" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Management subnet", + "defaultValue": { + "name": "Management", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiMGMT25, steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiMGMT25)]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..d2e59edb --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json @@ -0,0 +1,472 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (MGMT25)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (MGMT25)", + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Management Server" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the management subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the management subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the management subnet" + }, + "defaultValue": "10.0.1.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + }, + "msi": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Configure managed service identity for the VM" + } + } + }, + "variables": { + "installationType": "management-stack", + "templateName": "stack-management", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (MGMT25)": "MGMT25", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (MGMT25)": "MGMT25" + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (MGMT25)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (MGMT25)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": false, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8040": "check-point-cg-r8040", + "imageOfferR81": "check-point-cg-r81", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-byol", + "version": "latest" + }, + "imageReferenceMGMT25": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "mgmt-25", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "mgmt-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planMGMT25": { + "name": "mgmt-25", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack-mgmt.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "notused", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]", + "identity": "[if(parameters('msi'), json('{\"type\": \"SystemAssigned\"}'), json('null'))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[variables('location')]", + "name": "[variables('publicIPAddressName')]", + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "identity": "[variables('identity')]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "IPAddress": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/createUiDefinition.json b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/createUiDefinition.json new file mode 100644 index 00000000..cff833ef --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/createUiDefinition.json @@ -0,0 +1,763 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "basics": [ + { + "name": "gatewayNameUi", + "type": "Microsoft.Common.TextBox", + "label": "VM Name", + "toolTip": "The name of the Check Point CloudGuard Gateway.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{1,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the name must be 1-30 characters long." + } + }, + { + "name": "auth", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "The user 'admin' password", + "sshPublicKey": "Paste an OpenSSH public key. You can generate a key pair using ssh-keygen (Linux, OS X, Cygwin) or PuttyGen (Windows)" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false, + "hidePassword": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "chkp", + "label": "Check Point CloudGuard Gateway settings", + "subLabel": { + "preValidation": "Configure CloudGuard Gateway settings", + "postValidation": "Done" + }, + "bladeTitle": "CloudGuard Gateway settings", + "elements": [ + { + "name": "cloudGuardVersion", + "type": "Microsoft.Common.DropDown", + "label": "Check Point CloudGuard version", + "defaultValue": "R81", + "toolTip": "The version of Check Point CloudGuard Gateway.", + "constraints": { + "allowedValues": [ + { + "label": "R80.40", + "value": "R80.40" + }, + { + "label": "R81", + "value": "R81" + } + ] + } + }, + { + "name": "R80Offer", + "type": "Microsoft.Common.DropDown", + "label": "License type", + "toolTip": "The type of license.", + "defaultValue": "Bring Your Own License", + "visible": true, + "constraints": { + "allowedValues": [ + { + "label": "Bring Your Own License", + "value": "Bring Your Own License" + } + ] + } + }, + { + "name": "R8040vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R8040vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R80.40'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r8040", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R81vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R81'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D3_v2", + "Standard_DS3_v2" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r81", + "sku": "sg-ngtx" + }, + "count": 1 + }, + { + "name": "sicKeyUi", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "SIC key", + "confirmPassword": "Confirm SIC key" + }, + "toolTip": "Set the Secure Internal Communication one time secret used to set up trust between the gateway and the management server.", + "constraints": { + "required": true, + "regex": "^[a-z0-9A-Z]{8,30}$", + "validationMessage": "Only alphanumeric characters are allowed, and the value must be 8-30 characters long." + }, + "options": { + "hideConfirmation": true + } + }, + { + "name": "bootstrapScript", + "type": "Microsoft.Common.FileUpload", + "label": "Bootstrap script", + "toolTip": "An optional script to run on the initial boot", + "constraints": { + "required": false, + "accept": ".sh,text/plain" + }, + "options": { + "multiple": false, + "uploadMode": "file", + "openMode": "text", + "encoding": "UTF-8" + } + }, + { + "name": "allowUploadDownload", + "type": "Microsoft.Common.OptionsGroup", + "label": "Allow download from/upload to Check Point", + "defaultValue": "Yes", + "toolTip": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "true" + }, + { + "label": "No", + "value": "false" + } + ] + } + }, + { + "name": "additionalDiskSizeGB", + "type": "Microsoft.Common.TextBox", + "label": "Additional disk space (GB)", + "defaultValue": "0", + "toolTip": "Additional disk space (in GB), Initial disk size is 100 GB.", + "constraints": { + "regex": "^([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-8][0-9][0-9]|399[0-5])$", + "validationMessage": "Select a number between 0 and 3995" + } + }, + { + "name": "useCustomImageUri", + "type": "Microsoft.Common.OptionsGroup", + "label": "Use development image uri", + "defaultValue": "No", + "toolTip": "", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "Yes" + }, + { + "label": "No", + "value": "No" + } + ], + "required": true + }, + "visible": false + }, + { + "name": "sourceImageVhdUri", + "type": "Microsoft.Common.TextBox", + "label": "Development Image URI", + "toolTip": "The URI of the blob containing the development image", + "constraints": { + "required": "[equals(steps('chkp').useCustomImageUri, 'Yes')]", + "regex": "^[a-z0-9A-Z_\\-\\.\\:\\/]{1,500}.vhd$", + "validationMessage": "Only alphanumeric characters and '_','-','.',':','/' are allowed, the value must be 1-500 characters long and must end with .vhd. " + }, + "visible": "[equals(steps('chkp').useCustomImageUri, 'Yes')]" + } + ] + }, + { + "name": "network", + "label": "Network settings", + "subLabel": { + "preValidation": "Configure network settings", + "postValidation": "Done" + }, + "bladeTitle": "Network settings", + "elements": [ + { + "name": "virtualNetwork", + "type": "Microsoft.Network.VirtualNetworkCombo", + "label": { + "virtualNetwork": "Virtual network", + "subnets": "Subnets" + }, + "toolTip": { + "virtualNetwork": "Virtual Network Name", + "subnets": "List of subnets to deploy into" + }, + "defaultValue": { + "name": "vnet01", + "addressPrefixSize": "/16" + }, + "constraints": { + "minAddressPrefixSize": "/28" + }, + "options": { + "hideExisting": false + }, + "subnets": { + "subnet1": { + "label": "Frontend subnet", + "defaultValue": { + "name": "Frontend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + }, + "subnet2": { + "label": "Backend subnet", + "defaultValue": { + "name": "Backend", + "addressPrefixSize": "/24" + }, + "constraints": { + "minAddressPrefixSize": "/29", + "minAddressCount": 1, + "requireContiguousAddresses": true + } + } + } + } + ] + } + ], + "outputs": { + "location": "[location()]", + "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "adminPassword": "[basics('auth').password]", + "authenticationType": "[basics('auth').authenticationType]", + "sshPublicKey": "[basics('auth').sshPublicKey]", + "vmName": "[basics('gatewayNameUi')]", + "vmSize": "[coalesce(steps('chkp').R8040vmSizeUiBYOL, steps('chkp').R8040vmSizeUiNGTP, steps('chkp').R8040vmSizeUiNGTX,steps('chkp').R81vmSizeUiBYOL, steps('chkp').R81vmSizeUiNGTP, steps('chkp').R81vmSizeUiNGTX)]", + "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", + "virtualNetworkName": "[steps('network').virtualNetwork.name]", + "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", + "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", + "Subnet1Prefix": "[steps('network').virtualNetwork.subnets.subnet1.addressPrefix]", + "Subnet1StartAddress": "[steps('network').virtualNetwork.subnets.subnet1.startAddress]", + "Subnet2Name": "[steps('network').virtualNetwork.subnets.subnet2.name]", + "Subnet2Prefix": "[steps('network').virtualNetwork.subnets.subnet2.addressPrefix]", + "Subnet2StartAddress": "[steps('network').virtualNetwork.subnets.subnet2.startAddress]", + "vnetNewOrExisting": "[steps('network').virtualNetwork.newOrExisting]", + "virtualNetworkExistingRGName": "[steps('network').virtualNetwork.resourceGroup]", + "managementGUIClientNetwork": "[steps('chkp').managementGUIClientNetwork]", + "bootstrapScript": "[steps('chkp').bootstrapScript]", + "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", + "additionalDiskSizeGB": "[int(steps('chkp').additionalDiskSizeGB)]", + "sourceImageVhdUri": "[coalesce(steps('chkp').sourceImageVhdUri, 'noCustomUri')]" + } + } +} \ No newline at end of file diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json new file mode 100644 index 00000000..50422c53 --- /dev/null +++ b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json @@ -0,0 +1,562 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Deployment location" + }, + "defaultValue": "[resourceGroup().location]" + }, + "cloudGuardVersion": { + "type": "string", + "allowedValues": [ + "R80.40 - Bring Your Own License", + "R80.40 - Pay As You Go (NGTP)", + "R80.40 - Pay As You Go (NGTX)", + "R81 - Bring Your Own License", + "R81 - Pay As You Go (NGTP)", + "R81 - Pay As You Go (NGTX)", + ], + "defaultValue": "R81 - Bring Your Own License", + "metadata": { + "description": "Version of Check Point CloudGuard" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Administrator password" + }, + "defaultValue": "" + }, + "authenticationType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "defaultValue": "password", + "metadata": { + "description": "Authentication type" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Administrator SSH public key" + } + }, + "vmName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "Name of the Check Point Security Gateway" + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D3_v2", + "metadata": { + "description": "Size of the VM" + } + }, + "sicKey": { + "type": "securestring", + "metadata": { + "description": "One time key for Secure Internal Communication" + } + }, + "virtualNetworkName": { + "type": "string", + "metadata": { + "description": "The name of the virtual network" + }, + "defaultValue": "[concat(resourceGroup().name, '-vnet')]" + }, + "virtualNetworkAddressPrefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the virtual network" + }, + "defaultValue": "10.0.0.0/16" + }, + "Subnet1Name": { + "type": "string", + "metadata": { + "description": "The name of the frontend subnet" + }, + "defaultValue": "Frontend" + }, + "Subnet1Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the frontend subnet" + }, + "defaultValue": "10.0.1.0/24" + }, + "Subnet1StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the frontend subnet" + }, + "defaultValue": "10.0.1.10" + }, + "Subnet2Name": { + "type": "string", + "metadata": { + "description": "The name of the backend subnet" + }, + "defaultValue": "Backend" + }, + "Subnet2Prefix": { + "type": "string", + "metadata": { + "description": "The address prefix of the backend subnet" + }, + "defaultValue": "10.0.2.0/24" + }, + "Subnet2StartAddress": { + "type": "string", + "metadata": { + "description": "The first available address on the backend subnet" + }, + "defaultValue": "10.0.2.10" + }, + "vnetNewOrExisting": { + "type": "string", + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "metadata": { + "Description": "Indicates whether the virtual network is new or existing" + } + }, + "virtualNetworkExistingRGName": { + "type": "string", + "metadata": { + "description": "Resource Group of the existing virtual network" + }, + "defaultValue": "" + }, + "managementGUIClientNetwork": { + "type": "string", + "metadata": { + "description": "Allowed GUI clients" + }, + "defaultValue": "0.0.0.0/0" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located including a trailing '/'" + }, + "defaultValue": "[deployment().properties.templateLink.uri]" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." + }, + "defaultValue": "" + }, + "bootstrapScript": { + "type": "string", + "metadata": { + "description": "Bootstrap script" + }, + "defaultValue": "" + }, + "allowDownloadFromUploadToCheckPoint": { + "type": "string", + "allowedValues": [ + "true", + "false" + ], + "defaultValue": "true", + "metadata": { + "description": "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + } + }, + "additionalDiskSizeGB": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Amount of additional disk space (in GB)" + }, + "minValue": 0, + "maxValue": 3995 + }, + "diskType": { + "type": "string", + "defaultValue": "Standard_LRS", + "metadata": { + "description": "The type of the OS disk. Premium is applicable only to DS machine sizes" + }, + "allowedValues": [ + "Standard_LRS", + "Premium_LRS" + ] + }, + "preview": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Deploy the staged image" + }, + "allowedValues": [ + "", + "-preview" + ] + }, + "sourceImageVhdUri": { + "type": "string", + "defaultValue": "noCustomUri", + "metadata": { + "description": "The URI of the blob containing the development image" + } + }, + "Check_PointTags": { + "type": "object", + "defaultValue": { + "provider": "30DE18BC-F9F6-4F22-9D30-54B8E74CFD5F" + } + } + }, + "variables": { + "installationType": "gateway-stack", + "templateName": "stack-single", + "templateVersion": "20230219", + "location": "[parameters('location')]", + "offers": { + "R80.40 - Bring Your Own License": "BYOL", + "R80.40 - Pay As You Go (NGTP)": "NGTP", + "R80.40 - Pay As You Go (NGTX)": "NGTX", + "R81 - Bring Your Own License": "BYOL", + "R81 - Pay As You Go (NGTP)": "NGTP", + "R81 - Pay As You Go (NGTX)": "NGTX", + }, + "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", + "osVersions": { + "R80.40 - Bring Your Own License": "R8040", + "R80.40 - Pay As You Go (NGTP)": "R8040", + "R80.40 - Pay As You Go (NGTX)": "R8040", + "R81 - Bring Your Own License": "R81", + "R81 - Pay As You Go (NGTP)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" + }, + "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", + "isBlink": true, + "computeApiVersion": "2017-03-30", + "storageApiVersion": "2016-01-01", + "networkApiVersion": "2017-10-01", + "deploymentsApiVersion": "2016-02-01", + "storageAccountName": "[concat('bootdiag', uniqueString(resourceGroup().id, deployment().name))]", + "storageAccountType": "Standard_LRS", + "diskSize100GB": 100, + "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", + "customData": "[concat('#!/usr/bin/python /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'resourceGroup=\"', resourceGroup().name, '\"', '\n', 'subscriptionId=\"', subscription().subscriptionId, '\"', '\n')]", + "imageOfferR8040": "check-point-cg-r8040", + "imageOfferR81": "check-point-cg-r81", + "imageOffer": "[concat(variables(concat('imageOffer', variables('osVersion'))), parameters('preview'))]", + "imagePublisher": "checkpoint", + "imageReferenceBYOL": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-byol", + "version": "latest" + }, + "imageReferenceNGTP": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtp", + "version": "latest" + }, + "imageReferenceNGTX": { + "offer": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]", + "sku": "sg-ngtx", + "version": "latest" + }, + "imageReferenceMarketplace": "[variables(concat('imageReference', variables('offer')))]", + "customImage": "customImage", + "imageReferenceCustomUri": { + "id": "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + }, + "imageReference": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('imageReferenceMarketplace'), variables('imageReferenceCustomUri'))]", + "nic1Name": "[concat(parameters('vmName'), '-eth0')]", + "nic2Name": "[concat(parameters('vmName'), '-eth1')]", + "linuxConfigurationpassword": {}, + "linuxConfigurationsshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]", + "path": "/home/notused/.ssh/authorized_keys" + } + ] + } + }, + "linuxConfiguration": "[variables(concat('linuxConfiguration', parameters('authenticationType')))]", + "planBYOL": { + "name": "sg-byol", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP": { + "name": "sg-ngtp", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTP-V2": { + "name": "sg-ngtp-v2", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "planNGTX": { + "name": "sg-ngtx", + "product": "[variables('imageOffer')]", + "publisher": "[variables('imagePublisher')]" + }, + "plan": "[variables(concat('plan', variables('offer')))]", + "publicIPAddressName": "[parameters('vmName')]", + "publicIPAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "bootstrapScript64": "[base64(parameters('bootstrapScript'))]", + "allowUploadDownload": "[parameters('allowDownloadFromUploadToCheckPoint')]", + "networkSetupURL": "[uri(parameters('_artifactsLocation'), concat('nestedtemplates/vnet-', parameters('vnetNewOrExisting'), '-stack.json', parameters('_artifactsLocationSasToken')))]", + "sicKey": "[parameters('sicKey')]", + "managementGUIClientNetwork": "[parameters('managementGUIClientNetwork')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('storageAccountName')]", + "apiVersion": "[variables('storageApiVersion')]", + "location": "[variables('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "Storage", + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "name": "networkSetup", + "type": "Microsoft.Resources/deployments", + "apiVersion": "[variables('deploymentsApiVersion')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('networkSetupURL')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "location": { + "value": "[variables('location')]" + }, + "apiVersion": { + "value": "[variables('networkApiVersion')]" + }, + "virtualNetworkName": { + "value": "[parameters('virtualNetworkName')]" + }, + "virtualNetworkAddressPrefix": { + "value": "[parameters('virtualNetworkAddressPrefix')]" + }, + "Subnet1Name": { + "value": "[parameters('Subnet1Name')]" + }, + "Subnet1Prefix": { + "value": "[parameters('Subnet1Prefix')]" + }, + "Subnet1StartAddress": { + "value": "[parameters('Subnet1StartAddress')]" + }, + "Subnet2Name": { + "value": "[parameters('Subnet2Name')]" + }, + "Subnet2Prefix": { + "value": "[parameters('Subnet2Prefix')]" + }, + "Subnet2StartAddress": { + "value": "[parameters('Subnet2StartAddress')]" + }, + "vnetNewOrExisting": { + "value": "[parameters('vnetNewOrExisting')]" + }, + "virtualNetworkExistingRGName": { + "value": "[parameters('virtualNetworkExistingRGName')]" + } + } + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "name": "[variables('publicIPAddressName')]", + "location": "[variables('location')]", + "sku": { + "name": "Basic" + }, + "properties": { + "idleTimeoutInMinutes": 30, + "publicIPAllocationMethod": "Static" + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]", + "[variables('publicIPAddressId')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic1Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[parameters('Subnet1StartAddress')]", + "privateIPAllocationMethod": "Static", + "PublicIpAddress": { + "Id": "[variables('publicIPAddressId')]" + }, + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet1Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'networkSetup')]" + ], + "location": "[variables('location')]", + "name": "[variables('nic2Name')]", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "ipconfig2", + "properties": { + "privateIPAddress": "[parameters('Subnet2StartAddress')]", + "privateIPAllocationMethod": "Static", + "subnet": { + "id": "[concat(reference('networkSetup').outputs.vnetId.value, '/subnets/', parameters('Subnet2Name'))]" + } + } + } + ] + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "condition": "[not(equals(parameters('sourceImageVhdUri'), 'noCustomUri'))]", + "type": "Microsoft.Compute/images", + "apiVersion": "2017-12-01", + "name": "[variables('customImage')]", + "location": "[variables('location')]", + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Linux", + "osState": "Generalized", + "blobUri": "[parameters('sourceImageVhdUri')]", + "storageAccountType": "Standard_LRS" + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "[resourceId('Microsoft.Compute/images/', variables('customImage'))]" + ], + "location": "[variables('location')]", + "name": "[parameters('vmName')]", + "plan": "[if(equals(parameters('sourceImageVhdUri'),'noCustomUri'), variables('plan'), json('null'))]", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic1Name'))]", + "properties": { + "primary": true + } + }, + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nic2Name'))]", + "properties": { + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "notused", + "computerName": "[toLower(parameters('vmName'))]", + "customData": "[base64(variables('customData'))]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": "[variables('diskSizeGB')]", + "name": "[parameters('vmName')]", + "managedDisk": { + "storageAccountType": "[parameters('diskType')]" + } + } + } + }, + "tags": { + "provider": "[toUpper(parameters('Check_PointTags').provider)]" + } + } + ], + "outputs": { + "GatewayIPAddr": { + "type": "string", + "value": "[reference(variables('publicIPAddressId')).IpAddress]" + } + } +} \ No newline at end of file diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/README.md b/deprecated/gcp/R80.30/autoscale-byol-R80.30/README.md new file mode 100644 index 00000000..45472adf --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.30 Autoscaling; | +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R80.30 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/autoscale-byol-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..00588f89 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8110-gw-byol-mig-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py b/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py new file mode 100644 index 00000000..020f3ff7 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py @@ -0,0 +1,621 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R80.30-GW': 'r8030-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20220130' + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R80.30-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + return instance_template + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + nics = create_nics(context) + gw_template = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop['gw_dependencies'], + gw_version=VERSIONS[version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py.schema b/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py.schema new file mode 100644 index 00000000..7d138e8b --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/check-point-autoscale--byol.py.schema @@ -0,0 +1,202 @@ +imports: + - path: check-point-autoscale--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - BYOL Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.10 Autoscaling + enum: + - R80.30 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string \ No newline at end of file diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/common.py b/deprecated/gcp/R80.30/autoscale-byol-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/config.yaml b/deprecated/gcp/R80.30/autoscale-byol-R80.30/config.yaml new file mode 100644 index 00000000..bc223154 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--byol + type: check-point-autoscale--byol.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--byol.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--byol.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--byol.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--byol.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--byol.cpuUsagePercentage) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/default.py b/deprecated/gcp/R80.30/autoscale-byol-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/images.py b/deprecated/gcp/R80.30/autoscale-byol-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/autoscale-byol-R80.30/password.py b/deprecated/gcp/R80.30/autoscale-byol-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-byol-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/README.md b/deprecated/gcp/R80.30/autoscale-payg-R80.30/README.md new file mode 100644 index 00000000..310ce5cf --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.30 Autoscaling;| +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R80.30 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/autoscale-payg-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..4cd5038e --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8110-gw-payg-mig-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py b/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py new file mode 100644 index 00000000..35b63cad --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py @@ -0,0 +1,621 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R80.30-GW': 'r8030-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20220130' + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R80.30-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + return instance_template + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + nics = create_nics(context) + gw_template = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop['gw_dependencies'], + gw_version=VERSIONS[version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py.schema b/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py.schema new file mode 100644 index 00000000..7eb1a0ae --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/check-point-autoscale--payg.py.schema @@ -0,0 +1,202 @@ +imports: + - path: check-point-autoscale--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - PAYG Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.10 Autoscaling + enum: + - R80.30 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string \ No newline at end of file diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/common.py b/deprecated/gcp/R80.30/autoscale-payg-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/config.yaml b/deprecated/gcp/R80.30/autoscale-payg-R80.30/config.yaml new file mode 100644 index 00000000..d0993a52 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--payg + type: check-point-autoscale--payg.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--payg.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--payg.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--payg.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--payg.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--payg.cpuUsagePercentage) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/default.py b/deprecated/gcp/R80.30/autoscale-payg-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/images.py b/deprecated/gcp/R80.30/autoscale-payg-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/autoscale-payg-R80.30/password.py b/deprecated/gcp/R80.30/autoscale-payg-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/autoscale-payg-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/README.md b/deprecated/gcp/R80.30/ha-byol-R80.30/README.md new file mode 100644 index 00000000..e81e628c --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/README.md @@ -0,0 +1,178 @@ +# GCP Deployment Manager package for Check Point High Availability BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.30 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R80.30 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/ha-byol-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..6a2bef5d --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8110-gw-byol-cluster-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py b/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py new file mode 100644 index 00000000..b60cf970 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py @@ -0,0 +1,713 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R80.30': 'r8030-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20220130' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses(prop, resources, member_a_nics, member_b_nics): + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses(prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format(prop['member_a_address_name']) + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format(prop['member_b_address_name']) + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + return common.MakeResource(resources, outputs) diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py.schema b/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py.schema new file mode 100644 index 00000000..eb2ddcb9 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/check-point-cluster--byol.py.schema @@ -0,0 +1,384 @@ +imports: + - path: check-point-cluster--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - BYOL Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.10 Cluster + enum: + - R80.30 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + generatePassword: + type: boolean + default: False + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/common.py b/deprecated/gcp/R80.30/ha-byol-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/config.yaml b/deprecated/gcp/R80.30/ha-byol-R80.30/config.yaml new file mode 100644 index 00000000..bac60311 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/config.yaml @@ -0,0 +1,69 @@ +imports: +- path: check-point-cluster--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--byol + type: check-point-cluster--byol.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE EQUAL TO ZONE A" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--byol.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--byol.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--byol.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--byol.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--byol.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--byol.vmBExternalIP) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/default.py b/deprecated/gcp/R80.30/ha-byol-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/images.py b/deprecated/gcp/R80.30/ha-byol-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/ha-byol-R80.30/password.py b/deprecated/gcp/R80.30/ha-byol-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-byol-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/README.md b/deprecated/gcp/R80.30/ha-payg-R80.30/README.md new file mode 100644 index 00000000..6b7edf0b --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/README.md @@ -0,0 +1,178 @@ +# GCP Deployment Manager package for Check Point High Availability PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.30 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R80.30 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/ha-payg-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..447c0cab --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8110-gw-payg-cluster-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py b/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py new file mode 100644 index 00000000..119d7304 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py @@ -0,0 +1,713 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R80.30': 'r8030-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20220130' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses(prop, resources, member_a_nics, member_b_nics): + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses(prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format(prop['member_a_address_name']) + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format(prop['member_b_address_name']) + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + return common.MakeResource(resources, outputs) diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py.schema b/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py.schema new file mode 100644 index 00000000..927a3fae --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/check-point-cluster--payg.py.schema @@ -0,0 +1,384 @@ +imports: + - path: check-point-cluster--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - PAYG Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.10 Cluster + enum: + - R80.30 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + generatePassword: + type: boolean + default: False + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/common.py b/deprecated/gcp/R80.30/ha-payg-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/config.yaml b/deprecated/gcp/R80.30/ha-payg-R80.30/config.yaml new file mode 100644 index 00000000..d0c671b7 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/config.yaml @@ -0,0 +1,69 @@ +imports: +- path: check-point-cluster--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--payg + type: check-point-cluster--payg.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE EQUAL TO ZONE A" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--payg.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--payg.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--payg.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--payg.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--payg.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--payg.vmBExternalIP) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/default.py b/deprecated/gcp/R80.30/ha-payg-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/images.py b/deprecated/gcp/R80.30/ha-payg-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/ha-payg-R80.30/password.py b/deprecated/gcp/R80.30/ha-payg-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/ha-payg-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/README.md b/deprecated/gcp/R80.30/single-byol-R80.30/README.md new file mode 100644 index 00000000..5b1562f9 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/README.md @@ -0,0 +1,131 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone BYOL solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone BYOL solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.30 Gateway only
R80.30 Management only
R80.30 Manual Configuration | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R80.30 Gateway only" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/single-byol-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..68fbb1a8 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8110-gw-byol-single-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py b/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py new file mode 100644 index 00000000..a7f626c9 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py @@ -0,0 +1,729 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R80.30': 'r8030', + 'R80.30-GW': 'r8030-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20220130' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Management only': { + 'tags': [MANAGEMENT], + 'description': 'Check Point Security Management', + 'canIpForward': False, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)', 'Management only'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + elif MANAGEMENT in tags: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py.schema b/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py.schema new file mode 100644 index 00000000..7e7b587b --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/check-point-vsec--byol.py.schema @@ -0,0 +1,343 @@ +imports: + - path: check-point-vsec--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - BYOL Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.10 Gateway only + enum: + - R80.30 Gateway only + - R80.30 Management only + - R80.30 Manual Configuration + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 0 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/common.py b/deprecated/gcp/R80.30/single-byol-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/config.yaml b/deprecated/gcp/R80.30/single-byol-R80.30/config.yaml new file mode 100644 index 00000000..867928b0 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/config.yaml @@ -0,0 +1,48 @@ +imports: +- path: check-point-vsec--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--byol + type: check-point-vsec--byol.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableGwNetwork: "PLEASE ENTER true or false" + network_gwNetworkSourceRanges: "PLEASE ENTER GATEWAY NETWORK SOURCE RANGES FOR MANAGEMENT, AND STANDALONE. LEAVE EMPTY DOUBLE QUOTES FOR GW" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--byol.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--byol.vmName) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/default.py b/deprecated/gcp/R80.30/single-byol-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/images.py b/deprecated/gcp/R80.30/single-byol-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/single-byol-R80.30/password.py b/deprecated/gcp/R80.30/single-byol-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/single-byol-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/README.md b/deprecated/gcp/R80.30/single-payg-R80.30/README.md new file mode 100644 index 00000000..843eddcf --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/README.md @@ -0,0 +1,131 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone PAYG solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone PAYG solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-payg). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.30 Gateway only
R80.30 Management only
R80.30 Manual Configuration | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R80.30 Gateway only" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/c2d_deployment_configuration.json b/deprecated/gcp/R80.30/single-payg-R80.30/c2d_deployment_configuration.json new file mode 100644 index 00000000..43f34062 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8110-gw-payg-single-335-985-v20220126", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py b/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py new file mode 100644 index 00000000..0ac0bb28 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py @@ -0,0 +1,729 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R80.30': 'r8030', + 'R80.30-GW': 'r8030-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20220130' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Management only': { + 'tags': [MANAGEMENT], + 'description': 'Check Point Security Management', + 'canIpForward': False, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#!/bin/bash + +generatePassword="$(echo {generatePassword} | tr 'TF' 'tf')" +allowUploadDownload="{allowUploadDownload}" + +echo "template_name: {templateName}" >> /etc/cloud-version +echo "template_version: {templateVersion}" >> /etc/cloud-version + +function get_router() {{ + local interface="$1" + local subnet_router_meta_path="computeMetadata/v1/instance/network-interfaces/$interface/gateway" + local router="$(get-cloud-data.sh ${{subnet_router_meta_path}})" + echo "${{router}}" +}} + +function set_mgmt_if() {{ + mgmtNIC="{mgmtNIC}" + local mgmt_int="eth0" + if [ "X$mgmtNIC" == "XEphemeral Public IP (eth0)" ]; then + mgmt_int="eth0" + elif [ "X$mgmtNIC" == "XPrivate IP (eth1)" ]; then + mgmt_int="eth1" + fi + local set_mgmt_if_out="$(clish -s -c "set management interface ${{mgmt_int}}")" + echo "${{set_mgmt_if_out}}" +}} + +function set_internal_static_routes() {{ + local private_cidrs='10.0.0.0/8 172.16.0.0/12 192.168.0.0/16' + #Define interface for internal networks and configure + local interface="$internalInterfaceNumber" + local router=$(get_router $interface) + clish -c 'lock database override' + #Configure static routes destined to internal networks, defined in the RFC 1918, through the internal interface + for cidr in ${{private_cidrs}}; do + echo "setting route to $cidr via gateway $router" + echo "running clish -c 'set static-route $cidr nexthop gateway address $router on' -s" + clish -c "set static-route $cidr nexthop gateway address $router on" -s + done +}} + +function create_dynamic_objects() {{ + local is_managment="$1" + local interfaces='eth0 eth1' + for interface in ${{interfaces}}; do + if ${{is_managment}}; then + dynamic_objects -n "LocalGateway" + dynamic_objects -n "LocalGatewayExternal" + dynamic_objects -n "LocalGatewayInternal" + else + local addr="$(ip addr show dev $interface | awk "/inet/{{print \$2; exit}}" | cut -d / -f 1)" + if [ "${{interface}}" == "eth0" ]; then + dynamic_objects -n "LocalGateway" -r "$addr" "$addr" -a + dynamic_objects -n "LocalGatewayExternal" -r "$addr" "$addr" -a + else + dynamic_objects -n "LocalGatewayInternal" -r "$addr" "$addr" -a + fi + fi + done +}} + + +function post_status() {{ + local is_success="$1" + local need_boot="$2" + local status + local value + local instance_id + + if "{hasInternet}" ; then + if "$is_success" ; then + status="success" + value="Success" + else + status="failure" + value="Failure" + fi + instance_id="$(get-cloud-data.sh computeMetadata/v1/instance/id)" + cat </etc/software-status + $FWDIR/scripts/gcp.py POST "{config_url}/variables" \ + --body '{{ + "name": "{config_path}/variables/status/$status/$instance_id", + "value": "$(echo $value | base64)" + }}' +EOF + fi + + create_dynamic_objects $installSecurityManagement + + if "$installSecurityGateway" ; then + + set_internal_static_routes + set_mgmt_if + + ########## + # DA Self update + + DAselfUpdateHappening=$(dbget installer:self_update_in_progress) + if [ "X$DAselfUpdateHappening" == "X1" ]; then + oldDApid=$(pidof DAService) + countdown=121 + while [ $((--countdown)) -gt 0 ] + do + sleep 1 + DApid=$(pidof DAService) + + if [ "${{DApid:-$oldDApid}}" -ne "$oldDApid" ]; then + break + fi + done + if [ $countdown -eq 0 ]; then + dbset installer:self_update_in_progress + fi + fi + + ########## + fi + + if [ "$installSecurityManagement" -a "Management only" = "{installationType}" ] ; then + public_ip="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)" + declare -i attempts=0 + declare -i max_attempts=80 + mgmt_cli -r true discard + result=$? + while [ $result -ne 0 ] && [ $attempts -lt $max_attempts ] + do + attempts=$attempts+1 + sleep 30 + mgmt_cli -r true discard + result=$? + done + generic_objects="$(mgmt_cli -r true show-generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiHostCkp details-level full -f json)" + uid="$(echo $generic_objects | jq .objects | jq .[0] | jq .uid)" + if [ ! -z "$public_ip" ] && [ ! -z "${{uid:1:-1}}" ] ; then + mgmt_cli -r true set-generic-object uid $uid ipaddr $public_ip + fi + fi + + if "$need_boot" ; then + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + fi + shutdown -r now + else + service gcpd restart + if [ "{enableMonitoring}" = "True" ] ; then + chkconfig --add gcp-statd + service gcp-statd start + fi + fi +}} +clish -c 'set user admin shell {shell}' -s + +case "{installationType}" in +"Gateway only") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +"Management only") + installSecurityGateway=false + installSecurityManagement=true + sicKey=notused + ;; +"Manual Configuration") + post_status true false + exit 0 + ;; +"Gateway and Management (Standalone)") + installSecurityGateway=true + installSecurityManagement=true + gatewayClusterMember=false + sicKey=notused + internalInterfaceNumber=1 + ;; +"Cluster") + installSecurityGateway=true + gatewayClusterMember=true + installSecurityManagement=false + sicKey="{sicKey}" + internalInterfaceNumber=2 + ;; +"AutoScale") + installSecurityGateway=true + gatewayClusterMember=false + installSecurityManagement=false + sicKey="{computed_sic_key}" + internalInterfaceNumber=1 + ;; +esac + +conf="install_security_gw=$installSecurityGateway" +if ${{installSecurityGateway}} ; then + conf="$conf&install_ppak=true" + blink_conf="gateway_cluster_member=$gatewayClusterMember" +fi +conf="$conf&install_security_managment=$installSecurityManagement" +if ${{installSecurityManagement}} ; then + if "$generatePassword" ; then + managementAdminPassword="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" + conf="$conf&mgmt_admin_name=admin" + conf="$conf&mgmt_admin_passwd=$managementAdminPassword" + else + conf="$conf&mgmt_admin_radio=gaia_admin" + fi + + managementGUIClientNetwork="{managementGUIClientNetwork}" + conf="$conf&install_mgmt_primary=true" + + if [ "0.0.0.0/0" = "$managementGUIClientNetwork" ]; then + conf="$conf&mgmt_gui_clients_radio=any" + else + conf="$conf&mgmt_gui_clients_radio=network" + ManagementGUIClientBase="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 1)" + ManagementGUIClientMaskLength="$(echo ${{managementGUIClientNetwork}} | \ + cut -d / -f 2)" + conf="$conf&mgmt_gui_clients_ip_field=$ManagementGUIClientBase" + conf="$conf&mgmt_gui_clients_subnet_field=$ManagementGUIClientMaskLength" + fi + +fi + +blink_conf="$blink_conf&ftw_sic_key=$sicKey" +blink_conf="$blink_conf&download_info=$allowUploadDownload" +blink_conf="$blink_conf&upload_info=$allowUploadDownload" + +conf="$conf&$blink_conf" + +if "$generatePassword" ; then + blink_password="$(get-cloud-data.sh \ + computeMetadata/v1/instance/attributes/adminPasswordSourceMetadata)" +else + blink_password="$(dd if=/dev/urandom count=1 \ + 2>/dev/null | sha256sum | cut -c -28)" +fi +blink_conf="$blink_conf&admin_password_regular=$blink_password" + +if [ "Gateway only" = "{installationType}" ] || [ "Cluster" = "{installationType}" ] || [ "AutoScale" = "{installationType}" ]; then + config_cmd="blink_config -s $blink_conf" +else + config_cmd="config_system -s $conf" +fi + +if ${{config_cmd}} ; then + if "$installSecurityManagement" ; then + post_status true "$installSecurityGateway" + elif [ "Cluster" = "{installationType}" ] ; then + mgmt_subnet_gw="$(get-cloud-data.sh computeMetadata/v1/instance/network-interfaces/1/gateway)" + sed -i 's/__CLUSTER_PUBLIC_IP_NAME__/'"{primary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + sed -i 's/__SECONDARY_PUBLIC_IP_NAME__/'"{secondary_cluster_address_name}"'/g' /etc/fw/conf/gcp-ha.json + clish -c 'set static-route '"{managementNetwork}"' nexthop gateway address '"$mgmt_subnet_gw"' on' -s + post_status true true + else + post_status true false + fi +else + post_status false false +fi + +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)', 'Management only'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + elif MANAGEMENT in tags: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py.schema b/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py.schema new file mode 100644 index 00000000..b153a8fd --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/check-point-vsec--payg.py.schema @@ -0,0 +1,343 @@ +imports: + - path: check-point-vsec--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - PAYG Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.10 Gateway only + enum: + - R80.30 Gateway only + - R80.30 Management only + - R80.30 Manual Configuration + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 0 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/common.py b/deprecated/gcp/R80.30/single-payg-R80.30/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/config.yaml b/deprecated/gcp/R80.30/single-payg-R80.30/config.yaml new file mode 100644 index 00000000..a3edcb04 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/config.yaml @@ -0,0 +1,46 @@ +imports: +- path: check-point-vsec--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--payg + type: check-point-vsec--payg.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--payg.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--payg.vmName) \ No newline at end of file diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/default.py b/deprecated/gcp/R80.30/single-payg-R80.30/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/images.py b/deprecated/gcp/R80.30/single-payg-R80.30/images.py new file mode 100644 index 00000000..2811fa30 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/images.py @@ -0,0 +1,10 @@ +IMAGES = { + "check-point-r8030-payg": "check-point-r8030-payg-200-773-v20201208", + "check-point-r8030-gw-payg-single": "check-point-r8030-gw-payg-single-273-904-v20210715", + "check-point-r8030-gw-payg-mig": "check-point-r8030-gw-payg-mig-273-904-v20210715", + "check-point-r8030-gw-payg-cluster": "check-point-r8030-gw-payg-cluster-273-904-v20210715", + "check-point-r8030-gw-byol-single": "check-point-r8030-gw-byol-single-273-904-v20210715", + "check-point-r8030-gw-byol-mig": "check-point-r8030-gw-byol-mig-273-904-v20210715", + "check-point-r8030-gw-byol-cluster": "check-point-r8030-gw-byol-cluster-273-904-v20210715", + "check-point-r8030-byol": "check-point-r8030-byol-200-773-v20201208" +} diff --git a/deprecated/gcp/R80.30/single-payg-R80.30/password.py b/deprecated/gcp/R80.30/single-payg-R80.30/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.30/single-payg-R80.30/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/README.md b/deprecated/gcp/R80.40-R81/autoscale-byol/README.md new file mode 100644 index 00000000..d11c9a1b --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R81.10 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/autoscale-byol/c2d_deployment_configuration.json new file mode 100644 index 00000000..67d45592 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-byol-mig-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py b/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py new file mode 100644 index 00000000..0c65f374 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py @@ -0,0 +1,381 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R80.40-GW': 'r8040-gw', + 'R81-GW': 'r81-gw', + 'R81.10-GW': 'r8110-gw', + 'R81.20-GW': 'r8120-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20231221' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R81.20-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + passwd = '' + if context.properties['generatePassword']: + passwd = password.GeneratePassword(12, False) + metadata['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + return instance_template, passwd + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + prop['osVersion'] = prop['autoscalingVersion'].split(' ')[0].replace( + ".", "") + nics = create_nics(context) + gw_template, passwd = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop[ + 'gw_dependencies'], + gw_version=VERSIONS[ + version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py.schema b/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py.schema new file mode 100644 index 00000000..0c5117b2 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/check-point-autoscale--byol.py.schema @@ -0,0 +1,215 @@ +imports: + - path: check-point-autoscale--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - BYOL Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + - generatePassword + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.20 Autoscaling + enum: + - R80.40 Autoscaling + - R81 Autoscaling + - R81.10 Autoscaling + - R81.20 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string + password: + type: string \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/common.py b/deprecated/gcp/R80.40-R81/autoscale-byol/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/config.yaml b/deprecated/gcp/R80.40-R81/autoscale-byol/config.yaml new file mode 100644 index 00000000..bc223154 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--byol + type: check-point-autoscale--byol.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--byol.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--byol.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--byol.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--byol.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--byol.cpuUsagePercentage) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/default.py b/deprecated/gcp/R80.40-R81/autoscale-byol/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/images.py b/deprecated/gcp/R80.40-R81/autoscale-byol/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-byol/password.py b/deprecated/gcp/R80.40-R81/autoscale-byol/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/README.md b/deprecated/gcp/R80.40-R81/autoscale-payg/README.md new file mode 100644 index 00000000..9dfa6b83 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R81.10 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/autoscale-payg/c2d_deployment_configuration.json new file mode 100644 index 00000000..4141cb87 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-payg-mig-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py b/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py new file mode 100644 index 00000000..05acbfdc --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py @@ -0,0 +1,381 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R80.40-GW': 'r8040-gw', + 'R81-GW': 'r81-gw', + 'R81.10-GW': 'r8110-gw', + 'R81.20-GW': 'r8120-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20231221' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R81.20-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + passwd = '' + if context.properties['generatePassword']: + passwd = password.GeneratePassword(12, False) + metadata['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + return instance_template, passwd + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + prop['osVersion'] = prop['autoscalingVersion'].split(' ')[0].replace( + ".", "") + nics = create_nics(context) + gw_template, passwd = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop[ + 'gw_dependencies'], + gw_version=VERSIONS[ + version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py.schema b/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py.schema new file mode 100644 index 00000000..b3ab0980 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/check-point-autoscale--payg.py.schema @@ -0,0 +1,215 @@ +imports: + - path: check-point-autoscale--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - PAYG Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + - generatePassword + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.20 Autoscaling + enum: + - R80.40 Autoscaling + - R81 Autoscaling + - R81.10 Autoscaling + - R81.20 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string + password: + type: string \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/common.py b/deprecated/gcp/R80.40-R81/autoscale-payg/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/config.yaml b/deprecated/gcp/R80.40-R81/autoscale-payg/config.yaml new file mode 100644 index 00000000..d0993a52 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--payg + type: check-point-autoscale--payg.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--payg.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--payg.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--payg.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--payg.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--payg.cpuUsagePercentage) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/default.py b/deprecated/gcp/R80.40-R81/autoscale-payg/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/images.py b/deprecated/gcp/R80.40-R81/autoscale-payg/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/autoscale-payg/password.py b/deprecated/gcp/R80.40-R81/autoscale-payg/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/autoscale-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/ha-byol/README.md b/deprecated/gcp/R80.40-R81/ha-byol/README.md new file mode 100644 index 00000000..f915c4b4 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/README.md @@ -0,0 +1,187 @@ +# GCP Deployment Manager package for Check Point High Availability BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **deployWithPublicIPs** | Deploy HA with public IPs | boolean | true;
false; | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **smart1CloudTokenA** | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **smart1CloudTokenB** | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R81.10 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + smart1CloudTokenA: "xxxxxxxxxxxxxxxxxxxxxxxx" + smart1CloudTokenB: "xxxxxxxxxxxxxxxxxxxxxxxx" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + deployWithPublicIPs: true + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-byol/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/ha-byol/c2d_deployment_configuration.json new file mode 100644 index 00000000..5af767bf --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-byol-cluster-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py b/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py new file mode 100644 index 00000000..61a2e521 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py @@ -0,0 +1,494 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R80.40': 'r8040-gw', + 'R81': 'r81-gw', + 'R81.10': 'r8110-gw', + 'R81.20': 'r8120-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20231221' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +NO_PUBLIC_IP = 'no-public-ip' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None, + smart1cloudToken=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + context.properties['smart1CloudToken'] = smart1cloudToken + context.properties['name'] = name + context.properties['zoneConfig'] = zone + context.properties['osVersion'] = cg_version.replace(".", "") + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics): + if not prop['deployWithPublicIPs']: + prop['primary_cluster_address_name'] = NO_PUBLIC_IP + prop['secondary_cluster_address_name'] = NO_PUBLIC_IP + else: + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +def validate_both_tokens(token_a, token_b): + if (not token_a and token_b) or (not token_b and token_a) or \ + (token_a and token_a == token_b): + raise common.Error('To connect to Smart-1 Cloud, \ + you must provide two tokens (one per member)') + + +def validate_mgmt_network_if_required(token_a, mgmt_network): + if not token_a and mgmt_network == "S1C": + raise common.Error( + 'Public address of the Security Management Server is required') + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + validate_both_tokens(prop['smart1CloudTokenA'], prop['smart1CloudTokenB']) + validate_mgmt_network_if_required( + prop['smart1CloudTokenA'], prop['managementNetwork']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies, + prop['smart1CloudTokenA']) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies, + prop['smart1CloudTokenB']) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + if prop['deployWithPublicIPs']: + outputs += [ + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_a_address_name']) + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_b_address_name']) + } + ] + + return common.MakeResource(resources, outputs) diff --git a/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py.schema b/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py.schema new file mode 100644 index 00000000..fcc01058 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/check-point-cluster--byol.py.schema @@ -0,0 +1,400 @@ +imports: + - path: check-point-cluster--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - BYOL Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + deployWithPublicIPs: + type: boolean + default: True + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + smart1CloudTokenA: + type: string + default: '' + smart1CloudTokenB: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.20 Cluster + enum: + - R80.40 Cluster + - R81 Cluster + - R81.10 Cluster + - R81.20 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^((?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))|(S1C)$ + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/deprecated/gcp/R80.40-R81/ha-byol/common.py b/deprecated/gcp/R80.40-R81/ha-byol/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/ha-byol/config.yaml b/deprecated/gcp/R80.40-R81/ha-byol/config.yaml new file mode 100644 index 00000000..e8012a71 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/config.yaml @@ -0,0 +1,73 @@ +imports: +- path: check-point-cluster--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--byol + type: check-point-cluster--byol.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE IN THE SAME REGION AS MEMBER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + #To connect to Smart-1 Cloud you must provide two valid tokens (one per member) + smart1CloudTokenA: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER A OR LEAVE EMPTY DOUBLE QUOTES" + smart1CloudTokenB: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER B OR LEAVE EMPTY DOUBLE QUOTES" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP, if using Smart-1 Cloud insert 'S1C'" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + deployWithPublicIPs: "PLEASE ENTER true or false" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--byol.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--byol.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--byol.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--byol.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--byol.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--byol.vmBExternalIP) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-byol/default.py b/deprecated/gcp/R80.40-R81/ha-byol/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/ha-byol/images.py b/deprecated/gcp/R80.40-R81/ha-byol/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-byol/password.py b/deprecated/gcp/R80.40-R81/ha-byol/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/ha-payg/README.md b/deprecated/gcp/R80.40-R81/ha-payg/README.md new file mode 100644 index 00000000..4f8405cd --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/README.md @@ -0,0 +1,187 @@ +# GCP Deployment Manager package for Check Point High Availability PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **deployWithPublicIPs** | Deploy HA with public IPs | boolean | true;
false; | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **smart1CloudTokenA** | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **smart1CloudTokenB** | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R81.10 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + smart1CloudTokenA: "xxxxxxxxxxxxxxxxxxxxxxxx" + smart1CloudTokenB: "xxxxxxxxxxxxxxxxxxxxxxxx" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + deployWithPublicIPs: true + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-payg/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/ha-payg/c2d_deployment_configuration.json new file mode 100644 index 00000000..81bed1f6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-payg-cluster-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py b/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py new file mode 100644 index 00000000..6c554aac --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py @@ -0,0 +1,494 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R80.40': 'r8040-gw', + 'R81': 'r81-gw', + 'R81.10': 'r8110-gw', + 'R81.20': 'r8120-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20231221' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +NO_PUBLIC_IP = 'no-public-ip' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None, + smart1cloudToken=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + context.properties['smart1CloudToken'] = smart1cloudToken + context.properties['name'] = name + context.properties['zoneConfig'] = zone + context.properties['osVersion'] = cg_version.replace(".", "") + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics): + if not prop['deployWithPublicIPs']: + prop['primary_cluster_address_name'] = NO_PUBLIC_IP + prop['secondary_cluster_address_name'] = NO_PUBLIC_IP + else: + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +def validate_both_tokens(token_a, token_b): + if (not token_a and token_b) or (not token_b and token_a) or \ + (token_a and token_a == token_b): + raise common.Error('To connect to Smart-1 Cloud, \ + you must provide two tokens (one per member)') + + +def validate_mgmt_network_if_required(token_a, mgmt_network): + if not token_a and mgmt_network == "S1C": + raise common.Error( + 'Public address of the Security Management Server is required') + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + validate_both_tokens(prop['smart1CloudTokenA'], prop['smart1CloudTokenB']) + validate_mgmt_network_if_required( + prop['smart1CloudTokenA'], prop['managementNetwork']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies, + prop['smart1CloudTokenA']) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies, + prop['smart1CloudTokenB']) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + if prop['deployWithPublicIPs']: + outputs += [ + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_a_address_name']) + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_b_address_name']) + } + ] + + return common.MakeResource(resources, outputs) diff --git a/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py.schema b/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py.schema new file mode 100644 index 00000000..9c674034 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/check-point-cluster--payg.py.schema @@ -0,0 +1,400 @@ +imports: + - path: check-point-cluster--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - PAYG Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + deployWithPublicIPs: + type: boolean + default: True + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + smart1CloudTokenA: + type: string + default: '' + smart1CloudTokenB: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.20 Cluster + enum: + - R80.40 Cluster + - R81 Cluster + - R81.10 Cluster + - R81.20 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^((?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))|(S1C)$ + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/deprecated/gcp/R80.40-R81/ha-payg/common.py b/deprecated/gcp/R80.40-R81/ha-payg/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/ha-payg/config.yaml b/deprecated/gcp/R80.40-R81/ha-payg/config.yaml new file mode 100644 index 00000000..de203447 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/config.yaml @@ -0,0 +1,73 @@ +imports: +- path: check-point-cluster--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--payg + type: check-point-cluster--payg.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE IN THE SAME REGION AS MEMBER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + #To connect to Smart-1 Cloud you must provide two valid tokens (one per member) + smart1CloudTokenA: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER A OR LEAVE EMPTY DOUBLE QUOTES" + smart1CloudTokenB: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER B OR LEAVE EMPTY DOUBLE QUOTES" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP, if using Smart-1 Cloud insert 'S1C'" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + deployWithPublicIPs: "PLEASE ENTER true or false" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--payg.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--payg.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--payg.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--payg.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--payg.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--payg.vmBExternalIP) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-payg/default.py b/deprecated/gcp/R80.40-R81/ha-payg/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/ha-payg/images.py b/deprecated/gcp/R80.40-R81/ha-payg/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/ha-payg/password.py b/deprecated/gcp/R80.40-R81/ha-payg/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/ha-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/single-byol/README.md b/deprecated/gcp/R80.40-R81/single-byol/README.md new file mode 100644 index 00000000..4c14d447 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/README.md @@ -0,0 +1,134 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone BYOL solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone BYOL solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| | | | | | +| **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R81.10 Gateway only" + smart1CloudToken: "xxxxxxxxxxxxxxxxxxxxxxxx" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-byol/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/single-byol/c2d_deployment_configuration.json new file mode 100644 index 00000000..006d39c7 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8120-gw-byol-single-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py b/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py new file mode 100644 index 00000000..d1fd7411 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py @@ -0,0 +1,479 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R80.40': 'r8040', + 'R80.40-GW': 'r8040-gw', + 'R81': 'r81', + 'R81-GW': 'r81-gw', + 'R81.10': 'r8110', + 'R81.10-GW': 'r8110-gw', + 'R81.20': 'r8120', + 'R81.20-GW': 'r8120-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20231221' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Management only': { + 'tags': [MANAGEMENT], + 'description': 'Check Point Security Management', + 'canIpForward': False, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + if prop['smart1CloudToken'] and prop['installationType'] != 'Gateway only': + raise Exception('Use of Smart-1 Cloud token is allowed only\ + for Gateway development.') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['osVersion'] = prop['cloudguardVersion'].replace(".", "") + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)', 'Management only'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + elif MANAGEMENT in tags: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py.schema b/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py.schema new file mode 100644 index 00000000..f08b551a --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/check-point-vsec--byol.py.schema @@ -0,0 +1,363 @@ +imports: + - path: check-point-vsec--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - BYOL Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + smart1CloudToken: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.20 Gateway only + enum: + - R80.40 Gateway only + - R80.40 Management only + - R80.40 Manual Configuration + - R80.40 Gateway and Management (Standalone) + - R81 Gateway only + - R81 Management only + - R81 Manual Configuration + - R81 Gateway and Management (Standalone) + - R81.10 Gateway only + - R81.10 Management only + - R81.10 Manual Configuration + - R81.10 Gateway and Management (Standalone) + - R81.20 Gateway only + - R81.20 Management only + - R81.20 Manual Configuration + - R81.20 Gateway and Management (Standalone) + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 1 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/deprecated/gcp/R80.40-R81/single-byol/common.py b/deprecated/gcp/R80.40-R81/single-byol/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/single-byol/config.yaml b/deprecated/gcp/R80.40-R81/single-byol/config.yaml new file mode 100644 index 00000000..3301dada --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-vsec--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--byol + type: check-point-vsec--byol.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableGwNetwork: "PLEASE ENTER true or false" + network_gwNetworkSourceRanges: "PLEASE ENTER GATEWAY NETWORK SOURCE RANGES FOR MANAGEMENT, AND STANDALONE. LEAVE EMPTY DOUBLE QUOTES FOR GW" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + #Connecting to Smart-1 Cloud is only available for Gateway only installation + smart1CloudToken: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD OR LEAVE EMPTY DOUBLE QUOTES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--byol.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--byol.vmName) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-byol/default.py b/deprecated/gcp/R80.40-R81/single-byol/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/single-byol/images.py b/deprecated/gcp/R80.40-R81/single-byol/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-byol/password.py b/deprecated/gcp/R80.40-R81/single-byol/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/R80.40-R81/single-payg/README.md b/deprecated/gcp/R80.40-R81/single-payg/README.md new file mode 100644 index 00000000..c3f9443a --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/README.md @@ -0,0 +1,133 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone PAYG solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone PAYG solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-payg). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R81.10 Gateway only" + smart1CloudToken: "xxxxxxxxxxxxxxxxxxxxxxxx" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-payg/c2d_deployment_configuration.json b/deprecated/gcp/R80.40-R81/single-payg/c2d_deployment_configuration.json new file mode 100644 index 00000000..e6af487e --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8120-gw-payg-single-631-991001475-v20231221", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py b/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py new file mode 100644 index 00000000..7165477d --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py @@ -0,0 +1,474 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R80.40': 'r8040', + 'R80.40-GW': 'r8040-gw', + 'R81': 'r81', + 'R81-GW': 'r81-gw', + 'R81.10': 'r8110', + 'R81.10-GW': 'r8110-gw', + 'R81.20': 'r8120', + 'R81.20-GW': 'r8120-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20231221' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + if prop['smart1CloudToken'] and prop['installationType'] != 'Gateway only': + raise Exception('Use of Smart-1 Cloud token is allowed only\ + for Gateway development.') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['osVersion'] = prop['cloudguardVersion'].replace(".", "") + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + elif MANAGEMENT in tags: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py.schema b/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py.schema new file mode 100644 index 00000000..8383e1c7 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/check-point-vsec--payg.py.schema @@ -0,0 +1,359 @@ +imports: + - path: check-point-vsec--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - PAYG Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + smart1CloudToken: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.20 Gateway only + enum: + - R80.40 Gateway only + - R80.40 Manual Configuration + - R80.40 Gateway and Management (Standalone) + - R81 Gateway only + - R81 Manual Configuration + - R81 Gateway and Management (Standalone) + - R81.10 Gateway only + - R81.10 Manual Configuration + - R81.10 Gateway and Management (Standalone) + - R81.20 Gateway only + - R81.20 Manual Configuration + - R81.20 Gateway and Management (Standalone) + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 1 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/deprecated/gcp/R80.40-R81/single-payg/common.py b/deprecated/gcp/R80.40-R81/single-payg/common.py new file mode 100644 index 00000000..e123c502 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/deprecated/gcp/R80.40-R81/single-payg/config.yaml b/deprecated/gcp/R80.40-R81/single-payg/config.yaml new file mode 100644 index 00000000..33316f05 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/config.yaml @@ -0,0 +1,48 @@ +imports: +- path: check-point-vsec--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--payg + type: check-point-vsec--payg.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + #Connecting to Smart-1 Cloud is only available for Gateway only installation + smart1CloudToken: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD OR LEAVE EMPTY DOUBLE QUOTES" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--payg.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--payg.vmName) \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-payg/default.py b/deprecated/gcp/R80.40-R81/single-payg/default.py new file mode 100644 index 00000000..0c7dd919 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/deprecated/gcp/R80.40-R81/single-payg/images.py b/deprecated/gcp/R80.40-R81/single-payg/images.py new file mode 100644 index 00000000..7b04bee0 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/deprecated/gcp/R80.40-R81/single-payg/password.py b/deprecated/gcp/R80.40-R81/single-payg/password.py new file mode 100644 index 00000000..273210a6 --- /dev/null +++ b/deprecated/gcp/R80.40-R81/single-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/deprecated/gcp/README.MD b/deprecated/gcp/README.MD new file mode 100644 index 00000000..5ea437ca --- /dev/null +++ b/deprecated/gcp/README.MD @@ -0,0 +1,5 @@ +# Deprecated CloudGuard IaaS GCP Deployment Manager packages +This directory contains deprecated CloudGuard IaaS solution templates. + +# How to deploy the templates +To deploy the Deployment Manager packages follow the instructions in the README.MD file in each directory. \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/README.md b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/README.md new file mode 100644 index 00000000..c26e307a --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/README.md @@ -0,0 +1,239 @@ +# Check Point CloudGuard IaaS High Availability Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS High Availability solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- System assigned identity +- Availability Set - conditional creation + +For additional information, +please see the [CloudGuard Network for Azure High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/high-availability-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**", "**User Access Administrator**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/high-availability-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a | + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" | + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a | + | | | | | | + | **cluster_name** | The name of the Check Point Cluster Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a | + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a | + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a | + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a | + | | | | | | + | **frontend_IP_addresses** | A list of three whole numbers representing the private ip addresses of the members eth0 NICs and the cluster vip ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given frontend subnet prefix. The IP addresses are defined by their position in the frontend subnet | list(number) | | n/a + | | | | | | + | **backend_IP_addresses** | A list of three whole numbers representing the private ip addresses of the members eth1 NICs and the backend lb ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given backend subnet prefix. The IP addresses are defined by their position in the backend subnet | list(number) | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a | + | | | | | | + | **smart_1_cloud_token_a** | Smart-1 Cloud token to connect automatically ***Member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart_1_cloud_token_b** | Smart-1 Cloud token to connect automatically ***Member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a | + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20"; | n/a | + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a | + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a | + | | | | | | + | **availability_type** | Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone | string | "Availability Zone";
"Availability Set"; | "Availability Zone" | + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for Cluster members monitoring | boolean | true;
false; | true | + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false | + | | | | | | + | **use_public_ip_prefix** | Indicates whether the public IP resources will be deployed with public IP prefix | boolean | true;
false; | false | + | | | | | | + | **create_public_ip_prefix** | Indicates whether the public IP prefix will created or an existing will be used | boolean | true;
false; | false | + | | | | | | + | **existing_public_ip_prefix_id** | The existing public IP prefix resource id | string | Existing public IP prefix resource id | n/a | + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | n/a | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To deploy the solution based on Azure Availability Set and create a new Availability Set for the virtual machines: +``` +availability_type = "Availability Set" +``` + Otherwise, to deploy the solution based on Azure Availability Zone: +``` +availability_type = "Availability Zone" +``` +- To enable CloudGuard metrics in order to send statuses and statistics collected from HA instances to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` +- To create new public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = true + ``` +- To use an existing public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = false + existing_public_ip_prefix_id = "public IP prefix resource id" + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-ha-terraform" + cluster_name = "checkpoint-ha-terraform" + location = "eastus" + vnet_name = "checkpoint-ha-vnet" + vnet_resource_group = "existing-vnet" + frontend_subnet_name = "frontend" + backend_subnet_name = "backend" + frontend_IP_addresses = [5, 6, 7] + backend_IP_addresses = [5, 6, 7] + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token_a = "xxxxxxxxxxxx" + smart_1_cloud_token_b = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_type = "Availability Zone" + enable_custom_metrics = true + enable_floating_ip = false + use_public_ip_prefix = false + create_public_ip_prefix = false + existing_public_ip_prefix_id = "" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230212 | - Added Smart-1 Cloud support | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells. | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment into an existing Vnet in Azure. | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files. | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/cloud-init.sh new file mode 100644 index 00000000..0609bfcf --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/cloud-init.sh @@ -0,0 +1,22 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +tenantId="${tenant_id}" +virtualNetwork="${virtual_network}" +clusterName="${cluster_name}" +externalPrivateAddresses="${external_private_addresses}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +smart1CloudToken="${smart_1_cloud_token}" +Vips='[{"name": "cluster-vip", "privateIPAddress": "${external_private_addresses}", "publicIPAddress": "${cluster_name}"}]' +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/main.tf new file mode 100644 index 00000000..cd020475 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/main.tf @@ -0,0 +1,531 @@ +//********************** Providers **************************// +provider "azurerm" { + + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip_prefix" "public_ip_prefix" { + count = var.use_public_ip_prefix && var.create_public_ip_prefix ? 1 : 0 + name = "${module.common.resource_group_name}-ipprefix" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + prefix_length = 30 +} + +data "azurerm_subnet" "frontend" { + name = var.frontend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend" { + name = var.backend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + count = 2 + name = "${var.cluster_name}${count.index+1}_IP" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${count.index+1}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_public_ip" "cluster-vip" { + name = var.cluster_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-vip-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_network_interface" "nic_vip" { + depends_on = [ + azurerm_public_ip.cluster-vip, + azurerm_public_ip.public-ip] + name = "${var.cluster_name}1-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[0]) + public_ip_address_id = azurerm_public_ip.public-ip.0.id + } + ip_configuration { + name = "cluster-vip" + subnet_id = data.azurerm_subnet.frontend.id + primary = false + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[2]) + public_ip_address_id = azurerm_public_ip.cluster-vip.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_vip_lb_association" { + depends_on = [azurerm_network_interface.nic_vip, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic_vip.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip, + azurerm_lb.frontend-lb] + name = "${var.cluster_name}2-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[1]) + public_ip_address_id = azurerm_public_ip.public-ip.1.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_lb_association" { + depends_on = [azurerm_network_interface.nic, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [ + azurerm_lb.backend-lb] + count = 2 + name = "${var.cluster_name}${count.index+1}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0], var.backend_IP_addresses[count.index+1]) + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic1_lb_association" { + depends_on = [azurerm_network_interface.nic1, azurerm_lb_backend_address_pool.backend-lb-pool] + count = 2 + network_interface_id = azurerm_network_interface.nic1[count.index].id + ip_configuration_name = "ipconfig2" + backend_address_pool_id = azurerm_lb_backend_address_pool.backend-lb-pool.id +} + +//********************** Load Balancers **************************// +resource "azurerm_public_ip" "public-ip-lb" { + name = "frontend_lb_ip" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_lb" "frontend-lb" { + depends_on = [ + azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "LoadBalancerFrontend" + public_ip_address_id = azurerm_public_ip.public-ip-lb.id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + loadbalancer_id = azurerm_lb.frontend-lb.id + name = "frontend-lb-pool" +} + +resource "azurerm_lb" "backend-lb" { + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0], var.backend_IP_addresses[0]) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb.id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = 2 + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb.id : azurerm_lb.backend-lb.id + name = var.lb_probe_name + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +resource "azurerm_lb_rule" "backend_lb_rules" { + loadbalancer_id = azurerm_lb.backend-lb.id + name = "backend-lb" + protocol = "All" + frontend_port = 0 + backend_port = 0 + frontend_ip_configuration_name = "backend-lb" + load_distribution = "Default" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool.id] + probe_id = azurerm_lb_probe.azure_lb_healprob[1].id + enable_floating_ip = var.enable_floating_ip +} + +//********************** Availability Set **************************// +locals { + availability_set_condition = var.availability_type == "Availability Set" ? true : false + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false +} +resource "azurerm_availability_set" "availability-set" { + count = local.availability_set_condition ? 1 : 0 + name = "${var.cluster_name}-AvailabilitySet" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + platform_fault_domain_count = 2 + platform_update_domain_count = 5 + managed = true +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} +resource "azurerm_virtual_machine" "vm-instance-availability-set" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? module.common.number_of_vm_instances : 0 + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + availability_set_id = local.availability_set_condition ? azurerm_availability_set.availability-set[0].id : "" + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = var.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} + +resource "azurerm_virtual_machine" "vm-instance-availability-zone" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? 0 : module.common.number_of_vm_instances + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + zones = [ + count.index+1] + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = var.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} +//********************** Role Assigments **************************// +data "azurerm_role_definition" "virtual_machine_contributor_role_definition" { + name = "Virtual Machine Contributor" +} +data "azurerm_role_definition" "reader_role_definition" { + name = "Reader" +} +data "azurerm_client_config" "client_config" { +} +resource "azurerm_role_assignment" "cluster_virtual_machine_contributor_assignment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.virtual_machine_contributor_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} +resource "azurerm_role_assignment" "cluster_reader_assigment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.reader_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/terraform.tfvars new file mode 100644 index 00000000..e235eaa9 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/terraform.tfvars @@ -0,0 +1,38 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-ha-terraform" +cluster_name = "PLEASE ENTER CLUSTER NAME" # "checkpoint-ha-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-ha-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +frontend_subnet_name = "PLEASE ENTER EXTERNAL SUBNET NAME" # "frontend" +backend_subnet_name = "PLEASE ENTER INTERNAL SUBNET NAME" # "backend" +frontend_IP_addresses = "PLEASE ENTER 3 FRONTEND IP ADDRESS POSITIONAL NUMBER" # [5, 6, 7] +backend_IP_addresses = "PLEASE ENTER 3 BACKEND IP ADDRESSES POSITIONAL NUMBERS" # [5, 6, 7] +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_type = "PLEASE ENTER AVAILABILITY TYPE" # "Availability Zone" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +use_public_ip_prefix = "PLEASE ENTER true or false" # false +create_public_ip_prefix = "PLEASE ENTER true or false" # false +existing_public_ip_prefix_id = "PLEASE ENTER IP PREFIX RESOURCE ID" # "" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/variables.tf new file mode 100644 index 00000000..c11fa238 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/variables.tf @@ -0,0 +1,339 @@ +//********************** Basic Configuration Variables **************************// +variable "cluster_name" { + description = "Cluster name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "availability_type" { + description = "Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone." + type = string + default = "Availability Zone" +} + +locals { // locals for 'availability_type' allowed values + availability_type_allowed_values = [ + "Availability Zone", + "Availability Set" + ] + // will fail if [var.availability_type] is invalid: + validate_availability_type_value = index(local.availability_type_allowed_values, var.availability_type) +} + +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token_a" { + description = "Smart-1 Cloud Token, for configuring member A" + type = string +} + +variable "smart_1_cloud_token_b" { + description = "Smart-1 Cloud Token, for configuring member B" + type = string +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "ha_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "cluster" +} + +variable "number_of_vm_instances" { + description = "Number of VM instances to deploy " + type = string + default = "2" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "frontend_subnet_name" { + description = "Frontend subnet name" + type = string +} + +variable "backend_subnet_name" { + description = "Backend subnet name" + type = string +} + +variable "frontend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth0 NICs and the cluster vip ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given frontend subnet prefix. The IP addresses are defined by their position in the frontend subnet." + type = list(number) +} + +variable "backend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth1 NICs and the backend lb ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given backend subnet prefix. The IP addresses are defined by their position in the backend subnet." + type = list(number) +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "lb_probe_name" { + description = "Name to be used for lb health probe" + default = "health_prob_port" +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "use_public_ip_prefix" { + description = "Indicates whether the public IP resources will be deployed with public IP prefix." + type = bool + default = false +} + +variable "create_public_ip_prefix" { + description = "Indicates whether the public IP prefix will created or an existing will be used." + type = bool + default = false +} + +variable "existing_public_ip_prefix_id" { + description = "The existing public IP prefix resource id." + type = string + default = "" +} + +locals{ + # Validate both s1c tokens are used or both empty + is_both_tokens_used = length(var.smart_1_cloud_token_a) > 0 == length(var.smart_1_cloud_token_b) > 0 + validation_message_both = "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" + _ = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.smart_1_cloud_token_a) > 0 + # Validate both s1c tokens are unqiue + token_parts_a = split(" ",var.smart_1_cloud_token_a) + token_parts_b = split(" ",var.smart_1_cloud_token_b) + acutal_token_a = local.token_parts_a[length(local.token_parts_a) - 1] + acutal_token_b = local.token_parts_b[length(local.token_parts_b) - 1] + is_both_tokens_the_same = local.acutal_token_a == local.acutal_token_b + validation_message_unique = "Same Smart-1 Cloud token used for both memeber, you must provide unique token for each member" + __ = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/README.md b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/README.md new file mode 100644 index 00000000..51153c0a --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/README.md @@ -0,0 +1,242 @@ +# Check Point CloudGuard IaaS High Availability Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS High Availability solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- System assigned identity +- Availability Set - conditional creation + +For additional information, +please see the [CloudGuard Network for Azure High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/high-availability-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**", "**User Access Administrator**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/high-availability-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a | + | | | | | | + | **cluster_name** | The name of the Check Point Cluster Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a | + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.0.0.0/16" | + | | | | | | + | **subnet_prefixes** | The address prefixes to be used for created subnets | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | ["10.0.0.0/24", "10.0.1.0/24"] | + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a | + | | | | | | + | **smart_1_cloud_token_a** | Smart-1 Cloud token to connect automatically ***Member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart_1_cloud_token_b** | Smart-1 Cloud token to connect automatically ***Member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a | + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license;| n/a | + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a | + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a | + | | | | | | + | **availability_type** | Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone | string | "Availability Zone";
"Availability Set"; | "Availability Zone" | + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for Cluster members monitoring | boolean | true;
false; | true | + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false | + | | | | | | + | **use_public_ip_prefix** | Indicates whether the public IP resources will be deployed with public IP prefix | boolean | true;
false; | false| + | | | | | | + | **create_public_ip_prefix** | Indicates whether the public IP prefix will created or an existing will be used | boolean | true;
false; | false | + | | | | | | + | **existing_public_ip_prefix_id** | The existing public IP prefix resource id | string | Existing public IP prefix resource id | ""| + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" | + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Conditional creation +- To deploy the solution based on Azure Availability Set and create a new Availability Set for the virtual machines: +``` +availability_type = "Availability Set" +``` + Otherwise, to deploy the solution based on Azure Availability Zone: +``` +availability_type = "Availability Zone" +``` +- To enable CloudGuard metrics in order to send statuses and statistics collected from HA instances to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` +- To create new public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = true + ``` +- To use an exisiting public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = false + existing_public_ip_prefix_id = "public IP prefix resource id" + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-ha-terraform" + cluster_name = "checkpoint-ha-terraform" + location = "eastus" + vnet_name = "checkpoint-ha-vnet" + address_space = "10.0.0.0/16" + subnet_prefixes = ["10.0.1.0/24","10.0.2.0/24"] + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token_a = "xxxxxxxxxxxx" + smart_1_cloud_token_b = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_type = "Availability Zone" + enable_custom_metrics = true + enable_floating_ip = false + use_public_ip_prefix = false + create_public_ip_prefix = false + existing_public_ip_prefix_id = "" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230212 | - Added Smart-1 Cloud support | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Merge ha-availability-set-new-vnet and ha-availability-zones-new-vnet deployments to one deployment.
- Adding support for R81.
- Add support to CloudGuards metrics.
- Update resources for NSG https://github.com/CheckPointSW/CloudGuardIaaS/issues/67
- The cluster member current state is kept when redeploying.
- Avoid role-assignment re-creation when re-apply | +| | | | +| 20200508 |- Add backend load balancer rules resource.
- Rename the health probe for the backend load balancer.
- Rename the template name to "ha" | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/cloud-init.sh new file mode 100644 index 00000000..0609bfcf --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/cloud-init.sh @@ -0,0 +1,22 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +tenantId="${tenant_id}" +virtualNetwork="${virtual_network}" +clusterName="${cluster_name}" +externalPrivateAddresses="${external_private_addresses}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +smart1CloudToken="${smart_1_cloud_token}" +Vips='[{"name": "cluster-vip", "privateIPAddress": "${external_private_addresses}", "publicIPAddress": "${cluster_name}"}]' +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/main.tf new file mode 100644 index 00000000..56495095 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/main.tf @@ -0,0 +1,550 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id + address_space = var.address_space + subnet_prefixes = var.subnet_prefixes +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip_prefix" "public_ip_prefix" { + count = var.use_public_ip_prefix && var.create_public_ip_prefix ? 1 : 0 + name = "${module.common.resource_group_name}-ipprefix" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + prefix_length = 30 +} + +resource "azurerm_public_ip" "public-ip" { + count = 2 + name = "${var.cluster_name}${count.index+1}_IP" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${count.index+1}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_public_ip" "cluster-vip" { + name = var.cluster_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-vip-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_network_interface" "nic_vip" { + depends_on = [ + azurerm_public_ip.cluster-vip, + azurerm_public_ip.public-ip] + name = "${var.cluster_name}1-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 5) + public_ip_address_id = azurerm_public_ip.public-ip.0.id + } + ip_configuration { + name = "cluster-vip" + subnet_id = module.vnet.vnet_subnets[0] + primary = false + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 7) + public_ip_address_id = azurerm_public_ip.cluster-vip.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_vip_lb_association" { + depends_on = [azurerm_network_interface.nic_vip, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic_vip.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip, + azurerm_lb.frontend-lb] + name = "${var.cluster_name}2-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 6) + public_ip_address_id = azurerm_public_ip.public-ip.1.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_lb_association" { + depends_on = [azurerm_network_interface.nic, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [ + azurerm_lb.backend-lb] + count = 2 + name = "${var.cluster_name}${count.index+1}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], count.index+5) + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic1_lb_association" { + depends_on = [azurerm_network_interface.nic1, azurerm_lb_backend_address_pool.backend-lb-pool] + count = 2 + network_interface_id = azurerm_network_interface.nic1[count.index].id + ip_configuration_name = "ipconfig2" + backend_address_pool_id = azurerm_lb_backend_address_pool.backend-lb-pool.id +} + +//********************** Load Balancers **************************// +resource "azurerm_public_ip" "public-ip-lb" { + name = "frontend_lb_ip" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_lb" "frontend-lb" { +// depends_on = [ +// azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "LoadBalancerFrontend" + public_ip_address_id = azurerm_public_ip.public-ip-lb.id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + loadbalancer_id = azurerm_lb.frontend-lb.id + name = "frontend-lb-pool" +} + +resource "azurerm_lb" "backend-lb" { + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], 4) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb.id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = 2 + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb.id : azurerm_lb.backend-lb.id + name = var.lb_probe_name + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +resource "azurerm_lb_rule" "backend_lb_rules" { + loadbalancer_id = azurerm_lb.backend-lb.id + name = "backend-lb" + protocol = "All" + frontend_port = 0 + backend_port = 0 + frontend_ip_configuration_name = "backend-lb" + load_distribution = "Default" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool.id] + probe_id = azurerm_lb_probe.azure_lb_healprob[1].id + enable_floating_ip = var.enable_floating_ip +} + +//********************** Availability Set **************************// +locals { + availability_set_condition = var.availability_type == "Availability Set" ? true : false + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false +} +resource "azurerm_availability_set" "availability-set" { + count = local.availability_set_condition ? 1 : 0 + name = "${var.cluster_name}-AvailabilitySet" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + platform_fault_domain_count = 2 + platform_update_domain_count = 5 + managed = true +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} +resource "azurerm_virtual_machine" "vm-instance-availability-set" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? module.common.number_of_vm_instances : 0 + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + availability_set_id = local.availability_set_condition ? azurerm_availability_set.availability-set[0].id : "" + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = module.vnet.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} + +resource "azurerm_virtual_machine" "vm-instance-availability-zone" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? 0 : module.common.number_of_vm_instances + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + zones = [ + count.index+1] + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${var.cluster_name}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = module.vnet.vnet_name + cluster_name = var.cluster_name + external_private_addresses = cidrhost(module.vnet.subnet_prefixes[0], 7) + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} +//********************** Role Assigments **************************// +data "azurerm_role_definition" "virtual_machine_contributor_role_definition" { + name = "Virtual Machine Contributor" +} +data "azurerm_role_definition" "reader_role_definition" { + name = "Reader" +} +data "azurerm_client_config" "client_config" { +} +resource "azurerm_role_assignment" "cluster_virtual_machine_contributor_assignment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.virtual_machine_contributor_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} +resource "azurerm_role_assignment" "cluster_reader_assigment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.reader_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/terraform.tfvars new file mode 100644 index 00000000..7cd8490e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/terraform.tfvars @@ -0,0 +1,36 @@ +//#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-ha-terraform" +cluster_name = "PLEASE ENTER CLUSTER NAME" # "checkpoint-ha-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-ha-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefixes = "PLEASE ENTER ADDRESS PREFIXES FOR SUBNETS" # ["10.0.1.0/24","10.0.2.0/24"] +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_type = "PLEASE ENTER AVAILABILITY TYPE" # "Availability Zone" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +use_public_ip_prefix = "PLEASE ENTER true or false" # false +create_public_ip_prefix = "PLEASE ENTER true or false" # false +existing_public_ip_prefix_id = "PLEASE ENTER IP PREFIX RESOURCE ID" # "" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/variables.tf new file mode 100644 index 00000000..6bb79338 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/variables.tf @@ -0,0 +1,328 @@ +//********************** Basic Configuration Variables **************************// +variable "cluster_name" { + description = "Cluster name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "availability_type" { + description = "Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone." + type = string + default = "Availability Zone" +} + +locals { // locals for 'availability_type' allowed values + availability_type_allowed_values = [ + "Availability Zone", + "Availability Set" + ] + // will fail if [var.availability_type] is invalid: + validate_availability_type_value = index(local.availability_type_allowed_values, var.availability_type) +} + +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Macine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token_a" { + description = "Smart-1 Cloud Token, for configuring member A" + type = string +} + +variable "smart_1_cloud_token_b" { + description = "Smart-1 Cloud Token, for configuring member B" + type = string +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "ha_terraform" +} + +variable "template_version" { + description = "Template version. It is reccomended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "cluster" +} + +variable "number_of_vm_instances" { + description = "Number of VM instances to deploy " + type = string + default = "2" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Natworking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefixes" { + description = "Address prefix to be used for netwok subnets" + type = list(string) + default = [ + "10.0.0.0/24", + "10.0.1.0/24"] +} + +variable "lb_probe_name" { + description = "Name to be used for lb health probe" + default = "health_prob_port" +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule perfoms a check" + default = 5 +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Aplication ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "use_public_ip_prefix" { + description = "Indicates whether the public IP resources will be deployed with public IP prefix." + type = bool + default = false +} + +variable "create_public_ip_prefix" { + description = "Indicates whether the public IP prefix will created or an existing will be used." + type = bool + default = false +} + +variable "existing_public_ip_prefix_id" { + description = "The existing public IP prefix resource id." + type = string + default = "" +} + +locals{ + # Validate both s1c tokens are used or both empty + is_both_tokens_used = length(var.smart_1_cloud_token_a) > 0 == length(var.smart_1_cloud_token_b) > 0 + validation_message_both = "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" + _ = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.smart_1_cloud_token_a) > 0 + # Validate both s1c tokens are unqiue + token_parts_a = split(" ",var.smart_1_cloud_token_a) + token_parts_b = split(" ",var.smart_1_cloud_token_b) + acutal_token_a = local.token_parts_a[length(local.token_parts_a) - 1] + acutal_token_b = local.token_parts_b[length(local.token_parts_b) - 1] + is_both_tokens_the_same = local.acutal_token_a == local.acutal_token_b + validation_message_unique = "Same Smart-1 Cloud token used for both memeber, you must provide unique token for each member" + __ = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/high-availability-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/README.md b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/README.md new file mode 100644 index 00000000..3ab73dbd --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/README.md @@ -0,0 +1,189 @@ +# Check Point CloudGuard IaaS Management Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS Management solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/management-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/management-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mgmt_name** | Management name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **management_subnet_name** | Management subnet name | string | The exact name of the existing subnet | n/a + | | | | | | + | **subnet_1st_Address** | The first available address of the subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mgmt_enable_api** | Enable api access to the management | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mgmt-terraform" + mgmt_name = "checkpoint-mgmt-terraform" + location = "eastus" + vnet_name = "checkpoint-mgmt-vnet" + vnet_resource_group = "existing-vnet" + management_subnet_name = "mgmt-subnet" + subnet_1st_Address = "10.0.1.4" + management_GUI_client_network = "0.0.0.0/0" + mgmt_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS Management Terraform deployment into an existing Vnet in Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/cloud-init.sh new file mode 100644 index 00000000..4639554e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/cloud-init.sh @@ -0,0 +1,16 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/main.tf new file mode 100644 index 00000000..7b0d1ffe --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/main.tf @@ -0,0 +1,312 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "mgmt_subnet" { + name = var.management_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mgmt_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mgmt_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mgmt_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.mgmt_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mgmt-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mgmt_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.mgmt_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mgmt_enable_api + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mgmt_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/terraform.tfvars new file mode 100644 index 00000000..ea2f8f7e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/terraform.tfvars @@ -0,0 +1,30 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mgmt-terraform" +mgmt_name = "PLEASE ENTER MANAGEMENT NAME" # "checkpoint-mgmt-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mgmt-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +management_subnet_name = "PLEASE ENTER MGMT SUBNET NAME" # "mgmt-subnet" +subnet_1st_Address = "PLEASE ENTER AVAILABLE ADDRESS OF THE SUBNET" # "10.0.1.4" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mgmt_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/variables.tf new file mode 100644 index 00000000..6030652b --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/variables.tf @@ -0,0 +1,251 @@ +//********************** Basic Configuration Variables **************************// +variable "mgmt_name" { + description = "Management name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss)" + type = string + default = "mgmt_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "management" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "management_subnet_name" { + description = "management subnet name" + type = string +} + +variable "subnet_1st_Address" { + description = "The first available address of the subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "mgmt_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + mgmt_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mgmt_enable_api] is invalid: + validate_mgmt_enable_api_value = index(local.mgmt_enable_api_allowed_values, var.mgmt_enable_api) + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_1st_Address) == var.subnet_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/deprecated/terraform/azure/R8040-R81/management-existing-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/README.md b/deprecated/terraform/azure/R8040-R81/management-new-vnet/README.md new file mode 100644 index 00000000..f744dccc --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/README.md @@ -0,0 +1,187 @@ +# Check Point CloudGuard IaaS Management Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/management-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/management-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mgmt_name** | Management name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address space that is used by a Virtual Network | string | A valid address in CIDR notation | "10.0.0.0/16" + | | | | | | + | **subnet_prefix** | Address prefix to be used for network subnet | string | A valid address in CIDR notation | "10.0.0.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mgmt_enable_api** | Enable api access to the management | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mgmt-terraform" + mgmt_name = "checkpoint-mgmt-terraform" + location = "eastus" + vnet_name = "checkpoint-mgmt-vnet" + address_space = "10.0.0.0/16" + subnet_prefix = "10.0.0.0/24" + management_GUI_client_network = "0.0.0.0/0" + mgmt_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS Management Terraform deployment into a new Vnet in Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/management-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/management-new-vnet/cloud-init.sh new file mode 100644 index 00000000..4639554e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/cloud-init.sh @@ -0,0 +1,16 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/management-new-vnet/main.tf new file mode 100644 index 00000000..969a62cc --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/main.tf @@ -0,0 +1,316 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.subnet_prefix] + subnet_names = ["${var.mgmt_name}-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mgmt_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mgmt_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mgmt_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mgmt-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mgmt_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.mgmt_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mgmt_enable_api + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mgmt_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/management-new-vnet/terraform.tfvars new file mode 100644 index 00000000..163314eb --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/terraform.tfvars @@ -0,0 +1,29 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mgmt-terraform" +mgmt_name = "PLEASE ENTER MANAGEMENT NAME" # "checkpoint-mgmt-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mgmt-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR SUBNET" # "10.0.0.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mgmt_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/management-new-vnet/variables.tf new file mode 100644 index 00000000..63839bd0 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/variables.tf @@ -0,0 +1,249 @@ +//********************** Basic Configuration Variables **************************// +variable "mgmt_name" { + description = "Management name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Macine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss)" + type = string + default = "mgmt_terraform" +} + +variable "template_version" { + description = "Template version. It is reccomended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "management" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120", + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Natworking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefix" { + description = "Address prefix to be used for network subnet" + type = string + default = "10.0.0.0/24" +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "mgmt_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + mgmt_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mgmt_enable_api] is invalid: + validate_mgmt_enable_api_value = index(local.mgmt_enable_api_allowed_values, var.mgmt_enable_api) + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_subnet_prefix = regex(local.regex_valid_network_cidr, var.subnet_prefix) == var.subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Aplication ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/deprecated/terraform/azure/R8040-R81/management-new-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/management-new-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/management-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/README.md b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/README.md new file mode 100644 index 00000000..7c8003fd --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/README.md @@ -0,0 +1,195 @@ +# Check Point CloudGuard Network Security MDS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/mds-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/mds-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mds_name** | MDS name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **management_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **subnet_1st_Address** | First available address in management subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mds_enable_api** | Enable api access to the mds | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on the mds | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **sic_key** | Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **installation_type** | Enables to select installation type - gateway/standalone | string | mds-primary;
mds-secondary;
mds-logserver; | n/a + | | | | | | + | **primary** | Indicates if the installation type is mds-primary | boolean | true;
false; | n/a + | | | | | | + | **secondary** | Indicates if the installation type is mds-secondary | boolean | true;
false; | n/a + | | | | | | + | **logserver** | Indicates if the installation type is mds-logserver | boolean | true;
false; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mds-rg-terraform" + mds_name = "checkpoint-mds-terraform" + location = "eastus" + vnet_name = "checkpoint-mds-vnet" + vnet_resource_group = "existing-vnet" + management_subnet_name = "mgmt-subnet" + subnet_1st_Address = "10.0.1.4" + management_GUI_client_network = "0.0.0.0/0" + mds_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + sic_key = "xxxxxxxxxxxx" + installation_type = "mds-primary" + primary = "true" + secondary = "false" + logserver = "false" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/cloud-init.sh new file mode 100644 index 00000000..627de012 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/cloud-init.sh @@ -0,0 +1,20 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +primary="${primary}" +secondary="${secondary}" +logserver="${logserver}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/main.tf new file mode 100644 index 00000000..ff654c86 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/main.tf @@ -0,0 +1,316 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + template_name = var.template_name + installation_type = var.installation_type + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "mds_subnet" { + name = var.management_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mds_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mds_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mds_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.mds_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mds-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mds_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.mds_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = var.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mds_enable_api + admin_shell = var.admin_shell + sic_key = var.sic_key + primary = var.primary + secondary = var.secondary + logserver = var.logserver + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mds_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/terraform.tfvars new file mode 100644 index 00000000..61547ee1 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/terraform.tfvars @@ -0,0 +1,35 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mds-rg-terraform" +mds_name = "PLEASE ENTER MDS NAME" # "checkpoint-mds-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mds-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK RESOURCE GROUP NAME" # "existing-vnet" +management_subnet_name = "PLEASE ENTER MANAGEMENT SUBNET NAME" # "mgmt-subnet" +subnet_1st_Address = "PLEASE ENTER SUBNET FIRST ADDRESS" # "10.0.1.4" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mds_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "mds-primary" +primary = "PLEASE ENTER true or false" # "true" +secondary = "PLEASE ENTER true or false" # "false" +logserver = "PLEASE ENTER true or false" # "false" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/variables.tf new file mode 100644 index 00000000..8896ceae --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/variables.tf @@ -0,0 +1,280 @@ +//********************** Basic Configuration Variables **************************// +variable "mds_name" { + description = "MDS name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mds, ha, vmss)" + type = string + default = "mds_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "mds-primary" +} + +variable "primary" { + type = string +} + +variable "secondary" { + type = string +} + +variable "logserver" { + type = string +} + +locals { //locals for 'installation_type' + isntallation_type_allowed_values = [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "management_subnet_name" { + description = "management subnet name" + type = string +} + +variable "subnet_1st_Address" { + description = "The first available address of the subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string + validation { + condition = can(regex("(^0\\.0\\.0\\.0\\/0$)|(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", var.management_GUI_client_network)) && var.management_GUI_client_network != "0.0.0.0/32" + error_message = "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)." + } +} + +variable "mds_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + mds_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mds_enable_api] is invalid: + validate_mds_enable_api_value = index(local.mds_enable_api_allowed_values, var.mds_enable_api) + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_1st_Address) == var.subnet_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable sic_key { + description = "sic_key" + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/README.md b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/README.md new file mode 100644 index 00000000..293c3862 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/README.md @@ -0,0 +1,188 @@ +# Check Point CloudGuard Network Security MDS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/mds-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/mds-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mds_name** | MDS name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address space that is used by a Virtual Network | string | A valid address in CIDR notation | "10.0.0.0/16" + | | | | | | + | **subnet_prefix** | Address prefix to be used for network subnet | string | A valid address in CIDR notation | "10.0.0.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mds_enable_api** | Enable api access to the mds | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on the mds | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **sic_key** | Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | mds-primary;
mds-secondary;
mds-logserver; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mds-rg-terraform" + mds_name = "checkpoint-mds-terraform" + location = "eastus" + vnet_name = "checkpoint-mds-vnet" + address_space = "10.0.0.0/16" + subnet_prefix = "10.0.0.0/24" + management_GUI_client_network = "0.0.0.0/0" + mds_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + sic_key = "xxxxxxxxxxxx" + installation_type = "mds-primary" + primary = "true" + secondary = "false" + logserver = "false" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/cloud-init.sh new file mode 100644 index 00000000..627de012 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/cloud-init.sh @@ -0,0 +1,20 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +primary="${primary}" +secondary="${secondary}" +logserver="${logserver}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/main.tf new file mode 100644 index 00000000..f3162e70 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/main.tf @@ -0,0 +1,321 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.subnet_prefix] + subnet_names = ["${var.mds_name}-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mds_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mds_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mds_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mds-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mds_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.mds_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = var.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mds_enable_api + admin_shell = var.admin_shell + sic_key = var.sic_key + primary = var.primary + secondary = var.secondary + logserver = var.logserver + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mds_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/terraform.tfvars new file mode 100644 index 00000000..7a1045b3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/terraform.tfvars @@ -0,0 +1,34 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mds-rg-terraform" +mds_name = "PLEASE ENTER MDS NAME" # "checkpoint-mds-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mds-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR SUBNET" # "10.0.0.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mds_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "mds-primary" +primary = "PLEASE ENTER true or false" # "true" +secondary = "PLEASE ENTER true or false" # "false" +logserver = "PLEASE ENTER true or false" # "false" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/variables.tf new file mode 100644 index 00000000..9ce9d0ba --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/variables.tf @@ -0,0 +1,278 @@ +//********************** Basic Configuration Variables **************************// +variable "mds_name" { + description = "MDS name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mds, ha, vmss)" + type = string + default = "mds_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "mds-primary" +} + +variable "primary" { + type = string +} + +variable "secondary" { + type = string +} + +variable "logserver" { + type = string +} + +locals { //locals for 'installation_type' + isntallation_type_allowed_values = [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefix" { + description = "Address prefix to be used for network subnet" + type = string + default = "10.0.0.0/24" +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string + validation { + condition = can(regex("(^0\\.0\\.0\\.0\\/0$)|(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", var.management_GUI_client_network)) && var.management_GUI_client_network != "0.0.0.0/32" + error_message = "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)." + } +} + +variable "mds_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + mds_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mds_enable_api] is invalid: + validate_mds_enable_api_value = index(local.mds_enable_api_allowed_values, var.mds_enable_api) + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_subnet_prefix = regex(local.regex_valid_network_cidr, var.subnet_prefix) == var.subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + description = "sic key" + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/mds-new-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/versions.tf new file mode 100644 index 00000000..de940e72 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/mds-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/deprecated/terraform/azure/R8040-R81/modules/add-routing-intent.py b/deprecated/terraform/azure/R8040-R81/modules/add-routing-intent.py new file mode 100644 index 00000000..87437061 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/add-routing-intent.py @@ -0,0 +1,29 @@ +import json +import requests +import sys + + +def perform_put_request(url, data, headers=None): + """ + This function perform the PUT request to Azure in order to edit the vWAN Hub Routing-Intent + """ + result = {"status": "success", "message": ""} + try: + response = requests.put(url, json=data, headers=headers) + result["message"] = response.text + except Exception as e: + result["status"] = "error" + result["message"] = f"An error occurred: {str(e)}" + return result + + +if __name__ == "__main__": + """ + This script receives url, body, and authorization token as arguments and set vWAN Hub Routing-Intent + """ + api_url = sys.argv[1] + api_data = eval(sys.argv[2]) + auth_token = sys.argv[3] + api_headers = {"Authorization": f'Bearer {auth_token}'} + result = perform_put_request(api_url, api_data, api_headers) + print(json.dumps(result)) diff --git a/deprecated/terraform/azure/R8040-R81/modules/common/main.tf b/deprecated/terraform/azure/R8040-R81/modules/common/main.tf new file mode 100644 index 00000000..08bc5f97 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/common/main.tf @@ -0,0 +1,5 @@ +resource "azurerm_resource_group" "resource_group" { + name = var.resource_group_name + location = var.location +} + diff --git a/deprecated/terraform/azure/R8040-R81/modules/common/outputs.tf b/deprecated/terraform/azure/R8040-R81/modules/common/outputs.tf new file mode 100644 index 00000000..1d4ad2b0 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/common/outputs.tf @@ -0,0 +1,130 @@ +output "resource_group_name" { + value = azurerm_resource_group.resource_group.name +} + +output "resource_group_id" { + value = azurerm_resource_group.resource_group.id +} + +output "resource_group_location" { + value = azurerm_resource_group.resource_group.location +} + +output "azurerm_resource_group_id" { + value = azurerm_resource_group.resource_group.id +} + +output "admin_username" { + value = var.admin_username +} + +output "admin_password"{ + value = var.admin_password +} + +output "vm_instance_identity" { + value = var.vm_instance_identity_type +} + +output "template_name"{ + value = var.template_name +} + +output "template_version" { + value = var.template_version +} + +output "bootstrap_script"{ + value = var.bootstrap_script +} + +output "os_version" { + value = var.os_version +} + +output "installation_type" { + value = var.installation_type +} + +output "number_of_vm_instances" { + value = var.number_of_vm_instances +} + +output "allow_upload_download" { + value = var.allow_upload_download +} + +output "is_blink" { + value = var.is_blink +} + +output "vm_size" { + value = var.vm_size +} + +output "delete_os_disk_on_termination" { + value = var.delete_os_disk_on_termination +} + +output "vm_os_offer" { + value = var.vm_os_offer +} + +output "vm_os_sku" { + value = var.vm_os_sku +} + +output "vm_os_version" { + value = var.vm_os_version +} + +output "storage_account_type" { + value = var.storage_account_type +} + +output "storage_account_tier" { + value = var.storage_account_tier +} + +output "account_replication_type" { + value = var.account_replication_type +} + +output "disk_size" { + value = var.disk_size +} + +output "publisher" { + value = var.publisher +} + +output "storage_os_disk_create_option" { + value = var.storage_os_disk_create_option +} + +output "storage_os_disk_caching" { + value = var.storage_os_disk_caching +} + +output "managed_disk_type" { + value = var.managed_disk_type +} + +output "authentication_type" { + value = var.authentication_type +} + +output "tags" { + value = var.tags +} + +output "boot_diagnostics" { + value = var.boot_diagnostics +} + +output "storage_account_ip_rules" { + value = local.storage_account_ip_rules +} +output "role_definition" { + value = var.role_definition +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/common/variables.tf b/deprecated/terraform/azure/R8040-R81/modules/common/variables.tf new file mode 100644 index 00000000..e768159b --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/common/variables.tf @@ -0,0 +1,369 @@ +//************** Basic config variables**************// +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "resource_group_id" { + description = "Azure Resource Group ID to use." + type = string + default = "" +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} +//************** Virtual machine instance variables ************** +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + type = string + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "tags" { + type = map(string) + description = "A map of the tags to use on the resources that are deployed with this module." + default = {} +} + +variable "boot_diagnostics" { + type = bool + description = "Enable or Disable boot diagnostics" + default = true +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] + validation { + condition = !contains(var.storage_account_additional_ips, "0.0.0.0") && can([for ip in var.storage_account_additional_ips: regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", ip)]) + error_message = "Invalid IPv4 address." + } +} +locals { + serial_console_ips_per_location = { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"] + } + serial_console_ips = contains(keys(local.serial_console_ips_per_location),var.location) ? local.serial_console_ips_per_location[var.location] : [] + storage_account_ip_rules = concat(local.serial_console_ips, var.storage_account_additional_ips) +} +variable "vm_instance_identity_type" { + description = "Managed Service Identity type" + type = string + default = "SystemAssigned" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string +} + +variable "template_version"{ + description = "Template name. Should be defined according to deployment type(e.g. ha, vmss)" + type = string +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + type = string + default = "" +} + +variable "os_version"{ + description = "GAIA OS version" + type = string +} + +locals { // locals for 'os_version' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.installation_type] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "installation_type"{ + description = "Installation type. Allowed values: cluster, vmss" + type = string +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "cluster", + "vmss", + "management", + "standalone", + "gateway", + "mds-primary", + "mds-secondary", + "mds-logserver" + ] + // will fail if [var.installation_type] is invalid: + validate_installation_type_value = index(local.installation_type_allowed_values, var.installation_type) +} + +variable "number_of_vm_instances"{ + description = "Number of VM instances to deploy" + type = string +} + +variable "allow_upload_download" { + description = "Allow upload/download to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +locals {// locals for 'vm_size' allowed values + allowed_vm_sizes = ["Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", + "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", + "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", + "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", + "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", + "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", + "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", + "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", + "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", + "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", + "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", + "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", + "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", + "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", + "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" + ] + // will fail if [var.vm_size] is invalid: + validate_vm_size_value = index(local.allowed_vm_sizes, var.vm_size) +} +variable "delete_os_disk_on_termination" { + type = bool + description = "Delete datadisk when VM is terminated" + default = true +} + +variable "publisher" { + description = "CheckPoint publisher" + default = "checkpoint" +} + +//************** Storage image reference and plan variables ****************// +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) + validate_os_version_match = regex(split("-", var.vm_os_offer)[3], lower(var.os_version)) +} + +variable "vm_os_sku" { + /* + Choose from: + - "sg-byol" + - "sg-ngtp" (for R80.40 and above) + - "sg-ngtx" (for R80.40 and above) + - "mgmt-byol" + - "mgmt-25" + */ + description = "The sku of the image to be deployed" + type = string +} + +locals { // locals for 'vm_os_sku' allowed values + vm_os_sku_allowed_values = [ + "sg-byol", + "sg-ngtp", + "sg-ngtx", + "mgmt-byol", + "mgmt-25" + ] + // will fail if [var.vm_os_sku] is invalid: + validate_vm_os_sku_value = index(local.vm_os_sku_allowed_values, var.vm_os_sku) +} + +variable "vm_os_version" { + description = "The version of the image that you want to deploy. " + type = string + default = "latest" +} + +variable "storage_account_type" { + description = "Defines the type of storage account to be created. Valid options is Standard_LRS, Premium_LRS" + type = string + default = "Standard_LRS" +} + +locals { // locals for 'storage_account_type' allowed values + storage_account_type_allowed_values = [ + "Standard_LRS", + "Premium_LRS" + ] + // will fail if [var.storage_account_type] is invalid: + validate_storage_account_type_value = index(local.storage_account_type_allowed_values, var.storage_account_type) +} + +variable "storage_account_tier" { + description = "Defines the Tier to use for this storage account.Valid options are Standard and Premium" + default = "Standard" +} + +locals { // locals for 'storage_account_tier' allowed values + storage_account_tier_allowed_values = [ + "Standard", + "Premium" + ] + // will fail if [var.storage_account_tier] is invalid: + validate_storage_account_tier_value = index(local.storage_account_tier_allowed_values, var.storage_account_tier) +} + +variable "account_replication_type" { + description = "Defines the type of replication to use for this storage account.Valid options are LRS, GRS, RAGRS and ZRS" + type = string + default = "LRS" +} + +locals { // locals for 'account_replication_type' allowed values + account_replication_type_allowed_values = [ + "LRS", + "GRS", + "RAGRS", + "ZRS" + ] + // will fail if [var.account_replication_type] is invalid: + validate_account_replication_type_value = index(local.account_replication_type_allowed_values, var.account_replication_type) +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 3995 + count = tonumber(var.disk_size) >= 100 && tonumber(var.disk_size) <= 3995 ? 0 : "variable disk_size must be a number between 100 and 3995" +} + +//************** Storage OS disk variables **************// +variable "storage_os_disk_create_option" { + description = "The method to use when creating the managed disk" + type = string + default = "FromImage" +} + +variable "storage_os_disk_caching" { + description = "Specifies the caching requirements for the OS Disk" + default = "ReadWrite" +} + +variable "managed_disk_type" { + description = "Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS" + type = string + default = "Standard_LRS" +} + +locals { // locals for 'managed_disk_type' allowed values + managed_disk_type_allowed_values = [ + "Standard_LRS", + "Premium_LRS" + ] + // will fail if [var.managed_disk_type] is invalid: + validate_managed_disk_type_value = index(local.managed_disk_type_allowed_values, var.managed_disk_type) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + + +//********************** Role Assignments variables**************************// +variable "role_definition" { + description = "Role definition. The full list of Azure Built-in role descriptions can be found at https://docs.microsoft.com/bs-latn-ba/azure/role-based-access-control/built-in-roles" + type = string + default = "Contributor" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/common/versions.tf b/deprecated/terraform/azure/R8040-R81/modules/common/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/common/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/network-security-group/main.tf b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/main.tf new file mode 100644 index 00000000..1beeaf14 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/main.tf @@ -0,0 +1,23 @@ +resource "azurerm_network_security_group" "nsg" { + name = var.security_group_name + location = var.location + resource_group_name = var.resource_group_name + tags = var.tags + } + +//************ Security Rule Example **************// +resource "azurerm_network_security_rule" "security_rule" { + count = length(var.security_rules) + name = lookup(var.security_rules[count.index], "name") + priority = lookup(var.security_rules[count.index], "priority", 4096 - length(var.security_rules) + count.index) + direction = lookup(var.security_rules[count.index], "direction") + access = lookup(var.security_rules[count.index], "access") + protocol = lookup(var.security_rules[count.index], "protocol") + source_port_range = lookup(var.security_rules[count.index], "source_port_ranges") + destination_port_range = lookup(var.security_rules[count.index], "destination_port_ranges") + description = lookup(var.security_rules[count.index], "description") + source_address_prefix = lookup(var.security_rules[count.index], "source_address_prefix") + destination_address_prefix = lookup(var.security_rules[count.index], "destination_address_prefix") + resource_group_name = var.resource_group_name + network_security_group_name = azurerm_network_security_group.nsg.name +} diff --git a/deprecated/terraform/azure/R8040-R81/modules/network-security-group/output.tf b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/output.tf new file mode 100644 index 00000000..c1aa127d --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/output.tf @@ -0,0 +1,7 @@ +output "network_security_group_id" { + value = azurerm_network_security_group.nsg.id +} + +output "network_security_group_name" { + value = azurerm_network_security_group.nsg.name +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/network-security-group/variables.tf b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/variables.tf new file mode 100644 index 00000000..363489e3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/variables.tf @@ -0,0 +1,43 @@ +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + type = string + description = "The location/region where Network Security Group will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" +} + +variable "security_group_name" { + description = "Network Security Group name" + default = "nsg" +} + +variable "tags" { + description = "The tags to associate with Network Security Group" + type = map(string) + default = {} +} + +# Security Rules definition + +variable "security_rules" { + description = "Security rules for the Network Security Group using this format name = [priority, direction, access, protocol, source_port_range, destination_port_range, source_address_prefix, destination_address_prefix, description]" + type = list(any) + default = [] +} + +variable "source_address_prefix" { + description = "Source address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/24"] or ["VirtualNetwork"] +} + +variable "destination_address_prefix" { + description = "Destination address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/32","10.0.3.128/32"] or ["VirtualNetwork"] +} + diff --git a/deprecated/terraform/azure/R8040-R81/modules/network-security-group/versions.tf b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/network-security-group/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/vnet/main.tf b/deprecated/terraform/azure/R8040-R81/modules/vnet/main.tf new file mode 100644 index 00000000..2c67fc4f --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/vnet/main.tf @@ -0,0 +1,80 @@ +resource "azurerm_virtual_network" "vnet" { + name = var.vnet_name + location = var.location + address_space = [var.address_space] + resource_group_name = var.resource_group_name + dns_servers = var.dns_servers + tags = var.tags +} + +resource "azurerm_subnet" "subnet" { + depends_on = [azurerm_virtual_network.vnet] + count = length(var.subnet_names) + name = var.subnet_names[count.index] + virtual_network_name = azurerm_virtual_network.vnet.name + resource_group_name = var.resource_group_name + address_prefixes = [var.subnet_prefixes[count.index]] +} + +resource "azurerm_subnet_network_security_group_association" "security_group_frontend_association" { + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[0]] + subnet_id = azurerm_subnet.subnet[0].id + network_security_group_id = var.nsg_id +} +resource "azurerm_subnet_network_security_group_association" "security_group_backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[1]] + subnet_id = azurerm_subnet.subnet[1].id + network_security_group_id = var.nsg_id +} + +locals { // locals for 'next_hop_type' allowed values + next_hop_type_allowed_values = [ + "VirtualNetworkGateway", + "VnetLocal", + "Internet", + "VirtualAppliance", + "None" + ] +} + +resource "azurerm_route_table" "frontend" { + name = azurerm_subnet.subnet[0].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "Local-Subnet" + address_prefix = azurerm_subnet.subnet[0].address_prefixes[0] + next_hop_type = local.next_hop_type_allowed_values[1] + } + route { + name = "To-Internal" + address_prefix = var.address_space + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "frontend_association" { + subnet_id = azurerm_subnet.subnet[0].id + route_table_id = azurerm_route_table.frontend.id +} + +resource "azurerm_route_table" "backend" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + name = azurerm_subnet.subnet[1].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "To-Internet" + address_prefix = "0.0.0.0/0" + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + subnet_id = azurerm_subnet.subnet[1].id + route_table_id = azurerm_route_table.backend[count.index].id +} diff --git a/deprecated/terraform/azure/R8040-R81/modules/vnet/outputs.tf b/deprecated/terraform/azure/R8040-R81/modules/vnet/outputs.tf new file mode 100644 index 00000000..9dc8e206 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/vnet/outputs.tf @@ -0,0 +1,27 @@ +output "vnet_id" { + value = azurerm_virtual_network.vnet.id +} + +output "vnet_name" { + value = azurerm_virtual_network.vnet.name +} + +output "vnet_location" { + value = azurerm_virtual_network.vnet.location +} + +output "vnet_address_space" { + value = azurerm_virtual_network.vnet.address_space +} + +output "vnet_subnets" { + value = azurerm_subnet.subnet.*.id +} + +output "subnet_prefixes" { + value = var.subnet_prefixes +} + +output "allocation_method" { + value = var.allocation_method +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/modules/vnet/variables.tf new file mode 100644 index 00000000..1f64d28e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/vnet/variables.tf @@ -0,0 +1,63 @@ +variable "vnet_name" { + description = "Name of Virtual Network" + type = string + default = "vnet01" +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where the core network will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +variable "address_space" { + description = "The address prefixes of the virtual network" + type = string + default = "10.0.0.0/16" +} + +variable "dns_servers" { + description = " DNS servers to be used with a Virtual Network. If no values specified, this defaults to Azure DNS" + type = list(string) + default = [] +} + +variable "subnet_prefixes" { + description = "The address prefixes to be used for subnets" + type = list(string) + default = ["10.0.0.0/24","10.0.1.0/24"] +} + +variable "subnet_names" { + description = "A list of subnet names in a Virtual Network" + type = list(string) + default = ["Frontend","Backend"] +} + +variable "tags" { + description = "Tags to be associated with Virtual Network and subnets" + type = map(string) + default = {} +} +variable "nsg_id" { + description = "Network security group to be associated with a Virtual Network and subnets" + type = string +} + +variable "allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +locals { // locals for 'allocation_method' allowed values + allocation_method_allowed_values = [ + "Static" + ] + // will fail if [var.allocation_method] is invalid: + validate_method_allowed_value = index(local.allocation_method_allowed_values, var.allocation_method) +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/modules/vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/modules/vnet/versions.tf new file mode 100644 index 00000000..0ec4dcca --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/modules/vnet/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/README.md b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/README.md new file mode 100644 index 00000000..a2765298 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/README.md @@ -0,0 +1,172 @@ +# Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into an existing vWAN Hub in Azure. +As part of the deployment the following resources are created: +- Resource groups +- Azure Managed Application: + - NVA + - Managed identity + +For additional information, +please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_vWAN/Default.htm) + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure). +- In order to configure hub routing-intent policies it is **required** to have Python and 'requests' library installed. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the versions.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/nva-into-existing-hub/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | + | **authentication_method** | The authentication method used to deploy the solution | string | "Service Principal";
"Azure CLI"; | n/a + | | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **resource-group-name** | The name of the resource group that will contain the managed application | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period| "tf-managed-app-resource-group" | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of supported Azure regions can be found at https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-locations-partners#locations | "westcentralus" | + | | | | | | + | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **vwan-hub-resource-group** | The virtual WAN hub resource group name | string | | n/a | + | | | | | | + | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-managed-app-nva" | + | | | | | | + | **nva-name** | The name of the NVA that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-nva" | + | | | | | | + | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | "tf-vwan-nva-rg"| + | | | | | | + | **os-version** | The GAIA os version | string | "R8110"
"R8120" | "R8120" | + | | | | | | + | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | + | | | | | | | | | | + | **scale-unit** | The scale unit determines the size and number of resources deployed. The higher the scale unit, the greater the amount of traffic that can be handled. | string | "2"
"4"
"10"
"20"
"30"
"60"
"80"
| "2" | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | | | | | | + | **sic-key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **ssh-public-key** | The public ssh key used for ssh connection to the NVA GW instances | string | ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx generated-by-azure; | n/a | | string | gateway;
standalone; | + | | | | | | + | **bgp-asn** | The BGP autonomous system number | string | 64512 | "64512" || + | | | | | | + | **custom-metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | string | yes;
no; | "yes" | + | | | | | | + | **routing-intent-internet-traffic** | Set routing intent policy to allow internet traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | | | | | | + | **routing-intent-private-traffic** | Set routing intent policy to allow private traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | | | | | | + | **smart1-cloud-token-a** | Smart-1 Cloud token to connect automatically ***NVA instance a*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-b** | Smart-1 Cloud token to connect automatically ***NVA instance b*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-c** | Smart-1 Cloud token to connect automatically ***NVA instance c*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-d** | Smart-1 Cloud token to connect automatically ***NVA instance d*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-e** | Smart-1 Cloud token to connect automatically ***NVA instance e*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + custom-metrics = yes + ``` + +## Example + authentication_method = "Service Principal" + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + resource-group-name = "tf-managed-app-resource-group" + location = "westcentralus" + vwan-hub-name = "tf-vwan-hub" + vwan-hub-resource-group = "tf-vwan-hub-rg" + managed-app-name = "tf-vwan-managed-app-nva" + nva-rg-name = "tf-vwan-nva-rg" + nva-name = "tf-vwan-nva" + os-version = "R8120" + license-type = "Security Enforcement (NGTP)" + scale-unit = "2" + bootstrap-script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + admin-shell = "/etc/cli.sh" + sic-key = "xxxxxxxxxxxx" + ssh-public-key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + bgp-asn = "64512" + custom-metrics = "yes" + routing-intent-internet-traffic = "yes" + routing-intent-private-traffic = "yes" + smart1-cloud-token-a = "" + smart1-cloud-token-b = "" + smart1-cloud-token-c = "" + smart1-cloud-token-d = "" + smart1-cloud-token-e = "" + existing-public-ip = "" + new-public-ip = "yes" + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------| +| 20240613 | Cosmetic fixes & default values | +| 20240228 | Added public IP for ingress support | | | +| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/main.tf b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/main.tf new file mode 100644 index 00000000..5987c76b --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/main.tf @@ -0,0 +1,195 @@ +//********************** Basic Configuration **************************// +resource "azurerm_resource_group" "managed-app-rg" { + name = var.resource-group-name + location = var.location +} + +data "azurerm_virtual_hub" "vwan-hub" { + name = var.vwan-hub-name + resource_group_name = var.vwan-hub-resource-group +} + +//********************** Image Version **************************// + +data "external" "az_access_token" { + count = var.authentication_method == "Azure CLI" ? 1 : 0 + program = ["az", "account", "get-access-token", "--resource=https://management.azure.com", "--query={accessToken: accessToken}", "--output=json"] +} + +data "http" "azure_auth" { + count = var.authentication_method == "Service Principal" ? 1 : 0 + url = "https://login.microsoftonline.com/${var.tenant_id}/oauth2/v2.0/token" + method = "POST" + request_headers = { + "Content-Type" = "application/x-www-form-urlencoded" + } + request_body = "grant_type=client_credentials&client_id=${var.client_id}&client_secret=${var.client_secret}&scope=https://management.azure.com/.default" +} + +locals { + access_token = var.authentication_method == "Service Principal" ? jsondecode(data.http.azure_auth[0].response_body).access_token : data.external.az_access_token[0].result.accessToken +} + +data "http" "image-versions" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSKUs/checkpoint${var.license-type == "Full Package (NGTX + S1C)" ? "-ngtx" : var.license-type == "Full Package Premium (NGTX + S1C++)" ? "-premium" : ""}?api-version=2020-05-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +locals { + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + routing_intent-internet-policy = { + "name": "InternetTraffic", + "destinations": [ + "Internet" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing_intent-private-policy = { + "name": "PrivateTrafficPolicy", + "destinations": [ + "PrivateTraffic" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing-intent-policies = var.routing-intent-internet-traffic == "yes" ? (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-internet-policy, local.routing_intent-private-policy]) : tolist([local.routing_intent-internet-policy])) : (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-private-policy]) : []) + req_body = jsonencode({"properties": {"routingPolicies": local.routing-intent-policies}}) + req_url = "https://management.azure.com/subscriptions/${var.subscription_id}/resourceGroups/${var.vwan-hub-resource-group}/providers/Microsoft.Network/virtualHubs/${var.vwan-hub-name}/routingIntent/hubRoutingIntent?api-version=2022-01-01" +} + +//********************** Marketplace Terms & Solution Registration **************************// +data "http" "accept-marketplace-terms-existing-agreement" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.MarketplaceOrdering/agreements/checkpoint/offers/cp-vwan-managed-app/plans/vwan-app?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_marketplace_agreement" "accept-marketplace-terms" { + count = can(jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).id) ? (jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).properties.state == "Active" ? 0 : 1) : 1 + publisher = "checkpoint" + offer = "cp-vwan-managed-app" + plan = "vwan-app" +} + +data "http" "azurerm_resource_provider_registration-exist" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Solutions?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_resource_provider_registration" "solutions" { + count = jsondecode(data.http.azurerm_resource_provider_registration-exist.response_body).registrationState == "Registered" ? 0 : 1 + name = "Microsoft.Solutions" +} + + +//********************** Managed Application Configuration **************************// +resource "azurerm_managed_application" "nva" { + depends_on = [azurerm_marketplace_agreement.accept-marketplace-terms, azurerm_resource_provider_registration.solutions] + name = var.managed-app-name + location = azurerm_resource_group.managed-app-rg.location + resource_group_name = azurerm_resource_group.managed-app-rg.name + kind = "MarketPlace" + managed_resource_group_name = var.nva-rg-name + + plan { + name = "vwan-app" + product = "cp-vwan-managed-app" + publisher = "checkpoint" + version = "1.0.14" + } + parameter_values = jsonencode({ + location = { + value = azurerm_resource_group.managed-app-rg.location + }, + hubId = { + value = data.azurerm_virtual_hub.vwan-hub.id + }, + osVersion = { + value = var.os-version + }, + LicenseType = { + value = var.license-type + }, + imageVersion = { + value = element(local.image_versions, length(local.image_versions) -1) + }, + scaleUnit = { + value = var.scale-unit + }, + bootstrapScript = { + value = var.bootstrap-script + }, + adminShell = { + value = var.admin-shell + }, + sicKey = { + value = var.sic-key + }, + sshPublicKey = { + value = var.ssh-public-key + }, + BGP = { + value = var.bgp-asn + }, + NVA = { + value = var.nva-name + }, + customMetrics = { + value = var.custom-metrics + }, + hubASN = { + value = data.azurerm_virtual_hub.vwan-hub.virtual_router_asn + }, + hubPeers = { + value = data.azurerm_virtual_hub.vwan-hub.virtual_router_ips + }, + smart1CloudTokenA = { + value = var.smart1-cloud-token-a + }, + smart1CloudTokenB = { + value = var.smart1-cloud-token-b + }, + smart1CloudTokenC = { + value = var.smart1-cloud-token-c + }, + smart1CloudTokenD = { + value = var.smart1-cloud-token-d + }, + smart1CloudTokenE = { + value = var.smart1-cloud-token-e + }, + publicIPIngress = { + value = (var.new-public-ip == "yes" || length(var.existing-public-ip) > 0) ? "yes" : "no" + }, + createNewIPIngress = { + value = var.new-public-ip + } + ipIngressExistingResourceId = { + value = var.existing-public-ip + } + }) +} + +//********************** Routing Intent **************************// + + +data "external" "update-routing-intent" { + count = length(local.routing-intent-policies) != 0 ? 1 : 0 + depends_on = [azurerm_managed_application.nva] + program = ["python", "../modules/add-routing-intent.py", "${local.req_url}", "${local.req_body}", "${local.access_token}"] +} + +output "api_request_result" { + value = length(local.routing-intent-policies) != 0 ? data.external.update-routing-intent[0].result : {routing-intent: "not changed"} +} + diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/terraform.tfvars new file mode 100644 index 00000000..268fb4c1 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/terraform.tfvars @@ -0,0 +1,31 @@ +#PLEASE refer to the README.md for accepted values for the variables below +authentication_method = "PLEASE ENTER AUTHENTICATION METHOD" # "Service Principal" +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +resource-group-name = "PLEASE ENTER RESOURCE GROUP NAME" # "tf-managed-app-resource-group" +location = "PLEASE ENTER LOCATION" # "westcentralus" +vwan-hub-name = "PLEASE ENTER VWAN HUB NAME" # "tf-vwan-hub" +vwan-hub-resource-group = "PLEASE ENTER VWAN HUB RESOURCE GROUP" # "tf-vwan-hub-rg" +managed-app-name = "PLEASE ENTER MANAGED APPLICATION NAME" # "tf-vwan-managed-app-nva" +nva-rg-name = "PLEASE ENTER NVA RESOURCE GROUP NAME" # "tf-vwan-nva-rg" +nva-name = "PLEASE ENTER NVA NAME" # "tf-vwan-nva" +os-version = "PLEASE ENTER GAIA OS VERSION" # "R8120" +license-type = "PLEASE ENTER LICENSE TYPE" # "Security Enforcement (NGTP)" +scale-unit = "PLEASE ENTER SCALE UNIT" # "2" +bootstrap-script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +admin-shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic-key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxx" +ssh-public-key = "PLEASE ENTER SSH PUBLIC KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +bgp-asn = "PLEASE ENTER BGP AUTONOMOUS SYSTEM NUMBER" # "64512" +custom-metrics = "PLEASE ENTER yes or no" # "yes" +routing-intent-internet-traffic = "PLEASE ENTER yes or no" # "yes" +routing-intent-private-traffic = "PLEASE ENTER yes or no" # "yes" +smart1-cloud-token-a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE A OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE B OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-c = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE C OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-d = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE D OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-e = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE E OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +existing-public-ip = "PLEASE ENTER THE RESOURCE ID OF A PUBLIC IP RESOURCE OR LEAVE EMPTY DOUBLE QUOTES" # "/subscription/123/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1" +new-public-ip = "PLEASE ENTER yes or no" # "no" \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/variables.tf b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/variables.tf new file mode 100644 index 00000000..d00283d4 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/variables.tf @@ -0,0 +1,198 @@ +variable "authentication_method" { + description = "Azure authentication method" + type = string + validation { + condition = contains(["Azure CLI", "Service Principal"], var.authentication_method) + error_message = "Valid values for authentication_method are 'Azure CLI','Service Principal'" + } +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "resource-group-name" { + type = string + default = "tf-managed-app-resource-group" +} + +variable "location" { + type = string + default = "westcentralus" +} + +variable "managed-app-name" { + type = string + default = "tf-vwan-managed-app-nva" +} + +variable "vwan-hub-name" { + type = string +} + +variable "vwan-hub-resource-group" { + type = string +} + +variable "nva-rg-name" { + type = string + default = "tf-vwan-nva-rg" +} + +variable "nva-name" { + type = string + default = "tf-vwan-nva" +} + +variable "os-version" { + description = "GAIA OS version" + type = string + default = "R8120" + validation { + condition = contains(["R8110", "R8120"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120'" + } +} + +variable "license-type" { + type = string + default = "Security Enforcement (NGTP)" + validation { + condition = contains(["Security Enforcement (NGTP)", "Full Package (NGTX + S1C)", "Full Package Premium (NGTX + S1C++)"], var.license-type) + error_message = "Allowed values for License Type are 'Security Enforcement (NGTP)', 'Full Package (NGTX + S1C)', 'Full Package Premium (NGTX + S1C++)'" + } +} + +variable "scale-unit" { + type = string + default = "2" + validation { + condition = contains(["2", "4", "10", "20", "30", "60", "80"], var.scale-unit) + error_message = "Valid values for CloudGuard version are '2', '4', '10', '20', '30', '60', '80'" + } +} + +variable "bootstrap-script" { + type = string + default = "" +} + +variable "admin-shell" { + type = string + default = "/etc/cli.sh" + validation { + condition = contains(["/etc/cli.sh", "/bin/bash", "/bin/tcsh", "/bin/csh"], var.admin-shell) + error_message = "Valid shells are '/etc/cli.sh', '/bin/bash', '/bin/tcsh', '/bin/csh'" + } +} + +variable "sic-key" { + type = string + default = "" + sensitive = true + validation { + condition = can(regex("^[a-z0-9A-Z]{12,30}$", var.sic-key)) + error_message = "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + } +} + +variable "ssh-public-key" { + type = string + default = "" +} + +variable "bgp-asn" { + type = string + default = "64512" + validation { + condition = tonumber(var.bgp-asn) >= 64512 && tonumber(var.bgp-asn) <= 65534 && !contains([65515, 65520], tonumber(var.bgp-asn)) + error_message = "Only numbers between 64512 to 65534 are allowed excluding 65515, 65520." + } +} + +variable "custom-metrics" { + type = string + default = "yes" + validation { + condition = contains(["yes", "no"], var.custom-metrics) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-internet-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-internet-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-private-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-private-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "smart1-cloud-token-a" { + type = string + default = "" +} + +variable "smart1-cloud-token-b" { + type = string + default = "" +} + +variable "smart1-cloud-token-c" { + type = string + default = "" +} + +variable "smart1-cloud-token-d" { + type = string + default = "" +} + +variable "smart1-cloud-token-e" { + type = string + default = "" +} + +variable "existing-public-ip" { + type = string + default = "" +} + +variable "new-public-ip" { + type = string + default = "no" + validation { + condition = contains(["yes", "no"], var.new-public-ip) + error_message = "Valid options are string('yes' or 'no')" + } +} + +locals{ + # Validate that new-public-ip is false when existing-public-ip is used + is_both_params_used = length(var.existing-public-ip) > 0 && var.new-public-ip == "yes" + validation_message_both = "Only one parameter of existing-public-ip or new-public-ip can be used" + _ = regex("^$", (!local.is_both_params_used ? "" : local.validation_message_both)) +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/versions.tf b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/versions.tf new file mode 100644 index 00000000..1c68a298 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-existing-hub/versions.tf @@ -0,0 +1,17 @@ +terraform { + required_version = ">= 1.5.0" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = " 3.79.0" + } + } +} + +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + features {} +} diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/README.md b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/README.md new file mode 100644 index 00000000..52cc1b17 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/README.md @@ -0,0 +1,182 @@ +# Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into a new vWAN Hub in Azure. +As part of the deployment the following resources are created: +- Resource groups +- Virtual WAN +- Virtual WAN Hub +- Azure Managed Application: + - NVA + - Managed identity + +For additional information, +please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_vWAN/Default.htm) + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure). +- In order to configure hub routing-intent policies it is **required** to have Python and 'requests' library installed. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the versions.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/nva-into-new-vwan/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | + | **authentication_method** | The authentication method used to deploy the solution | string | "Service Principal";
"Azure CLI"; | n/a + | | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | || | | | + | **resource-group-name** | The name of the resource group that will contain the managed application | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | "managed-app-resource-group" | + | || | | | + | **location** | The region where the resources will be deployed at | string | The full list of supported Azure regions can be found at https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-locations-partners#locations | "westcentralus" | + | || | | | + | **vwan-name** | The name of the virtual WAN that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan" | + | || | | | + | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-hub" | + | || | | | + | **vwan-hub-address-prefix** | The address prefixes of the virtual hub | string | Valid CIDR block | "10.0.0.0/16" | + | || | | | + | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | tf-vwan-managed-app | + | || | | | + | **nva-name** | The name of the NVA that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | tf-vwan-nva | + | || | | | + | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | tf-vwan-nva-rg | + | || | | | + | **os-version** | The GAIA os version| string | "R8110"
"R8120" | "R8120" | + | || | | | + | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | + | || | | | + | **scale-unit** | The scale unit determines the size and number of resources deployed. The higher the scale unit, the greater the amount of traffic that can be handled. | string | "2"
"4"
"10"
"20"
"30"
"60"
"80"
| "2" | + | || | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | || | | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | || | | | + | **sic-key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | || | | | + | **ssh-public-key** | The public ssh key used for ssh connection to the NVA GW instances | string | ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx generated-by-azure; | n/a | | string | gateway;
standalone; | + | || | | | + | **bgp-asn** | The BGP autonomous system number. | string | 64512 | "64512" || + | || | | | + | **custom-metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | string | yes;
no; | "yes" | + | || | | | + | **routing-intent-internet-traffic** | Set routing intent policy to allow internet traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | || | | | + | **routing-intent-private-traffic** | Set routing intent policy to allow private traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | || | | | + | **smart1-cloud-token-a** | Smart-1 Cloud token to connect automatically ***NVA instance a*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-b** | Smart-1 Cloud token to connect automatically ***NVA instance b*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-c** | Smart-1 Cloud token to connect automatically ***NVA instance c*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-d** | Smart-1 Cloud token to connect automatically ***NVA instance d*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-e** | Smart-1 Cloud token to connect automatically ***NVA instance e*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | + | **existing-public-ip** | Existing public IP reosurce to attach to the newly deployed NVA | string | A resource ID of the public IP resource | | + | | | | | | + | **new-public-ip** | Deploy a new public IP resource as part of the managed app and attach to the NVA | string | yes;
no;| | + | | + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + custom-metrics = yes + ``` + +## Example + authentication_method = "Service Principal" + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + resource-group-name = "tf-managed-app-resource-group" + location = "westcentralus" + vwan-name = "tf-vwan" + vwan-hub-name = "tf-vwan-hub" + vwan-hub-address-prefix = "10.0.0.0/16" + managed-app-name = "tf-vwan-managed-app-nva" + nva-rg-name = "tf-vwan-nva-rg" + nva-name = "tf-vwan-nva" + os-version = "R8120" + license-type = "Security Enforcement (NGTP)" + scale-unit = "2" + bootstrap-script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + admin-shell = "/etc/cli.sh" + sic-key = "xxxxxxxxxxxx" + ssh-public-key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + bgp-asn = "64512" + custom-metrics = "yes" + routing-intent-internet-traffic = "yes" + routing-intent-private-traffic = "yes" + smart1-cloud-token-a = "" + smart1-cloud-token-b = "" + smart1-cloud-token-c = "" + smart1-cloud-token-d = "" + smart1-cloud-token-e = "" + existing-public-ip = "" + new-public-ip = "yes" + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-----------------------------------------------------------------------------------------------| +| 20240613 | Cosmetic fixes & default values | +| 20240228 | Added public IP for ingress support | | | +| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/main.tf b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/main.tf new file mode 100644 index 00000000..43a409c3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/main.tf @@ -0,0 +1,202 @@ +//********************** Basic Configuration **************************// +resource "azurerm_resource_group" "managed-app-rg" { + name = var.resource-group-name + location = var.location +} + +resource "azurerm_virtual_wan" "vwan" { + name = var.vwan-name + resource_group_name = azurerm_resource_group.managed-app-rg.name + location = var.location +} + +resource "azurerm_virtual_hub" "vwan-hub" { + name = var.vwan-hub-name + resource_group_name = azurerm_resource_group.managed-app-rg.name + location = azurerm_resource_group.managed-app-rg.location + address_prefix = var.vwan-hub-address-prefix + virtual_wan_id = azurerm_virtual_wan.vwan.id +} + +//********************** Image Version **************************// + +data "external" "az_access_token" { + count = var.authentication_method == "Azure CLI" ? 1 : 0 + program = ["az", "account", "get-access-token", "--resource=https://management.azure.com", "--query={accessToken: accessToken}", "--output=json"] +} + +data "http" "azure_auth" { + count = var.authentication_method == "Service Principal" ? 1 : 0 + url = "https://login.microsoftonline.com/${var.tenant_id}/oauth2/v2.0/token" + method = "POST" + request_headers = { + "Content-Type" = "application/x-www-form-urlencoded" + } + request_body = "grant_type=client_credentials&client_id=${var.client_id}&client_secret=${var.client_secret}&scope=https://management.azure.com/.default" +} + +locals { + access_token = var.authentication_method == "Service Principal" ? jsondecode(data.http.azure_auth[0].response_body).access_token : data.external.az_access_token[0].result.accessToken +} + +data "http" "image-versions" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSKUs/checkpoint${var.license-type == "Full Package (NGTX + S1C)" ? "-ngtx" : var.license-type == "Full Package Premium (NGTX + S1C++)" ? "-premium" : ""}?api-version=2020-05-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +locals { + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + routing_intent-internet-policy = { + "name": "InternetTraffic", + "destinations": [ + "Internet" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing_intent-private-policy = { + "name": "PrivateTrafficPolicy", + "destinations": [ + "PrivateTraffic" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing-intent-policies = var.routing-intent-internet-traffic == "yes" ? (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-internet-policy, local.routing_intent-private-policy]) : tolist([local.routing_intent-internet-policy])) : (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-private-policy]) : []) + req_body = jsonencode({"properties": {"routingPolicies": local.routing-intent-policies}}) + req_url = "https://management.azure.com/subscriptions/${var.subscription_id}/resourceGroups/${azurerm_resource_group.managed-app-rg.name}/providers/Microsoft.Network/virtualHubs/${var.vwan-hub-name}/routingIntent/hubRoutingIntent?api-version=2022-01-01" + +} + +//********************** Marketplace Terms & Solution Registration **************************// +data "http" "accept-marketplace-terms-existing-agreement" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.MarketplaceOrdering/agreements/checkpoint/offers/cp-vwan-managed-app/plans/vwan-app?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_marketplace_agreement" "accept-marketplace-terms" { + count = can(jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).id) ? (jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).properties.state == "Active" ? 0 : 1) : 1 + publisher = "checkpoint" + offer = "cp-vwan-managed-app" + plan = "vwan-app" +} + + +data "http" "azurerm_resource_provider_registration-exist" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Solutions?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_resource_provider_registration" "solutions" { + count = jsondecode(data.http.azurerm_resource_provider_registration-exist.response_body).registrationState == "Registered" ? 0 : 1 + name = "Microsoft.Solutions" +} + +//********************** Managed Application Configuration **************************// +resource "azurerm_managed_application" "nva" { + depends_on = [azurerm_marketplace_agreement.accept-marketplace-terms, azurerm_resource_provider_registration.solutions] + name = var.managed-app-name + location = azurerm_resource_group.managed-app-rg.location + resource_group_name = azurerm_resource_group.managed-app-rg.name + kind = "MarketPlace" + managed_resource_group_name = var.nva-rg-name + + plan { + name = "vwan-app" + product = "cp-vwan-managed-app" + publisher = "checkpoint" + version = "1.0.14" + } + parameter_values = jsonencode({ + location = { + value = azurerm_resource_group.managed-app-rg.location + }, + hubId = { + value = azurerm_virtual_hub.vwan-hub.id + }, + osVersion = { + value = var.os-version + }, + LicenseType = { + value = var.license-type + }, + imageVersion = { + value = element(local.image_versions, length(local.image_versions) -1) + }, + scaleUnit = { + value = var.scale-unit + }, + bootstrapScript = { + value = var.bootstrap-script + }, + adminShell = { + value = var.admin-shell + }, + sicKey = { + value = var.sic-key + }, + sshPublicKey = { + value = var.ssh-public-key + }, + BGP = { + value = var.bgp-asn + }, + NVA = { + value = var.nva-name + }, + customMetrics = { + value = var.custom-metrics + }, + hubASN = { + value = azurerm_virtual_hub.vwan-hub.virtual_router_asn + }, + hubPeers = { + value = azurerm_virtual_hub.vwan-hub.virtual_router_ips + }, + smart1CloudTokenA = { + value = var.smart1-cloud-token-a + }, + smart1CloudTokenB = { + value = var.smart1-cloud-token-b + }, + smart1CloudTokenC = { + value = var.smart1-cloud-token-c + }, + smart1CloudTokenD = { + value = var.smart1-cloud-token-d + }, + smart1CloudTokenE = { + value = var.smart1-cloud-token-e + }, + publicIPIngress = { + value = (var.new-public-ip == "yes" || length(var.existing-public-ip) > 0) ? "yes" : "no" + }, + createNewIPIngress = { + value = var.new-public-ip + } + ipIngressExistingResourceId = { + value = var.existing-public-ip + } + }) +} + +//********************** Routing Intent **************************// +data "external" "update-routing-intent" { + count = length(local.routing-intent-policies) != 0 ? 1 : 0 + depends_on = [azurerm_managed_application.nva] + program = ["python", "../modules/add-routing-intent.py", "${local.req_url}", "${local.req_body}", "${local.access_token}"] +} + +output "api_request_result" { + value = length(local.routing-intent-policies) != 0 ? data.external.update-routing-intent[0].result : {routing-intent: "not changed"} +} diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/terraform.tfvars new file mode 100644 index 00000000..8473e72c --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/terraform.tfvars @@ -0,0 +1,32 @@ +#PLEASE refer to the README.md for accepted values for the variables below +authentication_method = "PLEASE ENTER AUTHENTICATION METHOD" # "Service Principal" +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +resource-group-name = "PLEASE ENTER RESOURCE GROUP NAME" # "tf-managed-app-resource-group" +location = "PLEASE ENTER LOCATION" # "westcentralus" +vwan-name = "PLEASE ENTER VIRTUAL WAN NAME" # "tf-cp-vwan" +vwan-hub-name = "PLEASE ENTER VWAN HUB NAME" # "tf-cp-vwan-hub" +vwan-hub-address-prefix = "PLEASE ENTER VWAN HUB ADDRESS PREFIX" # "10.0.0.0/16" +managed-app-name = "PLEASE ENTER MANAGED APPLICATION NAME" # "tf-vwan-managed-app-nva" +nva-rg-name = "PLEASE ENTER NVA RESOURCE GROUP NAME" # "tf-vwan-nva-rg" +nva-name = "PLEASE ENTER NVA NAME" # "tf-vwan-nva" +os-version = "PLEASE ENTER GAIA OS VERSION" # "R8120" +license-type = "PLEASE ENTER LICENSE TYPE" # "Security Enforcement (NGTP)" +scale-unit = "PLEASE ENTER SCALE UNIT" # "2" +bootstrap-script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +admin-shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic-key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxx" +ssh-public-key = "PLEASE ENTER SSH PUBLIC KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +bgp-asn = "PLEASE ENTER BGP AUTONOMOUS SYSTEM NUMBER" # "64512" +custom-metrics = "PLEASE ENTER yes or no" # "yes" +routing-intent-internet-traffic = "PLEASE ENTER yes or no" # "yes" +routing-intent-private-traffic = "PLEASE ENTER yes or no" # "yes" +smart1-cloud-token-a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE A OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE B OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-c = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE C OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-d = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE D OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-e = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE E OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +existing-public-ip = "PLEASE ENTER THE RESOURCE ID OF A PUBLIC IP RESOURCE OR LEAVE EMPTY DOUBLE QUOTES" # "/subscription/123/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1" +new-public-ip = "PLEASE ENTER yes or no" # "no" \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/variables.tf b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/variables.tf new file mode 100644 index 00000000..927592c9 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/variables.tf @@ -0,0 +1,209 @@ +variable "authentication_method" { + description = "Azure authentication method" + type = string + validation { + condition = contains(["Azure CLI", "Service Principal"], var.authentication_method) + error_message = "Valid values for authentication_method are 'Azure CLI','Service Principal'" + } +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "resource-group-name" { + type = string + default = "managed-app-resource-group" +} + +variable "location" { + type = string + default = "westcentralus" +} + +variable "vwan-name" { + type = string + default = "tf-vwan" +} + +variable "vwan-hub-name" { + type = string + default = "tf-vwan-hub" +} + +variable "vwan-hub-address-prefix" { + type = string + default = "10.0.0.0/16" + validation { + condition = can(cidrhost(var.vwan-hub-address-prefix, 0)) + error_message = "Please provide a valid CIDR specification for the VWAN address space" + } +} + +variable "managed-app-name" { + type = string + default = "tf-vwan-managed-app" +} + +variable "nva-rg-name" { + type = string + default = "tf-vwan-nva-rg" +} + +variable "nva-name" { + type = string + default = "tf-vwan-nva" +} + +variable "os-version" { + description = "GAIA OS version" + type = string + default = "R8120" + validation { + condition = contains(["R8110", "R8120"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120'" + } +} + +variable "license-type" { + type = string + default = "Security Enforcement (NGTP)" + validation { + condition = contains(["Security Enforcement (NGTP)", "Full Package (NGTX + S1C)", "Full Package Premium (NGTX + S1C++)"], var.license-type) + error_message = "Allowed values for License Type are 'Security Enforcement (NGTP)', 'Full Package (NGTX + S1C)', 'Full Package Premium (NGTX + S1C++)'" + } +} + +variable "scale-unit" { + type = string + default = "2" + validation { + condition = contains(["2", "4", "10", "20", "30", "60", "80"], var.scale-unit) + error_message = "Valid values for CloudGuard version are '2', '4', '10', '20', '30', '60', '80'" + } +} + +variable "bootstrap-script" { + type = string + default = "" +} + +variable "admin-shell" { + type = string + default = "/etc/cli.sh" + validation { + condition = contains(["/etc/cli.sh", "/bin/bash", "/bin/tcsh", "/bin/csh"], var.admin-shell) + error_message = "Valid shells are '/etc/cli.sh', '/bin/bash', '/bin/tcsh', '/bin/csh'" + } +} + +variable "sic-key" { + type = string + default = "" + sensitive = true + validation { + condition = can(regex("^[a-z0-9A-Z]{12,30}$", var.sic-key)) + error_message = "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + } +} + +variable "ssh-public-key" { + type = string + default = "" +} + +variable "bgp-asn" { + type = string + default = "64512" + validation { + condition = tonumber(var.bgp-asn) >= 64512 && tonumber(var.bgp-asn) <= 65534 && !contains([65515, 65520], tonumber(var.bgp-asn)) + error_message = "Only numbers between 64512 to 65534 are allowed excluding 65515, 65520." + } +} + +variable "custom-metrics" { + type = string + default = "yes" + validation { + condition = contains(["yes", "no"], var.custom-metrics) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-internet-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-internet-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-private-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-private-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "smart1-cloud-token-a" { + type = string + default = "" +} + +variable "smart1-cloud-token-b" { + type = string + default = "" +} + +variable "smart1-cloud-token-c" { + type = string + default = "" +} + +variable "smart1-cloud-token-d" { + type = string + default = "" +} + +variable "smart1-cloud-token-e" { + type = string + default = "" +} + +variable "existing-public-ip" { + type = string + default = "" +} + +variable "new-public-ip" { + type = string + default = "no" + validation { + condition = contains(["yes", "no"], var.new-public-ip) + error_message = "Valid options are string('yes' or 'no')" + } +} + +locals{ + # Validate that new-public-ip is false when existing-public-ip is used + is_both_params_used = length(var.existing-public-ip) > 0 && var.new-public-ip == "yes" + validation_message_both = "Only one parameter of existing-public-ip or new-public-ip can be used" + _ = regex("^$", (!local.is_both_params_used ? "" : local.validation_message_both)) +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/versions.tf b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/versions.tf new file mode 100644 index 00000000..40d04f16 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/nva-into-new-vwan/versions.tf @@ -0,0 +1,17 @@ +terraform { + required_version = ">= 1.5.0" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = " 3.79.0" + } + } +} + +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + features {} +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/README.md b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/README.md new file mode 100644 index 00000000..73fa074d --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/README.md @@ -0,0 +1,200 @@ +# Check Point CloudGuard Network Security Single Gateway Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Single Gateway solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- System assigned identity + + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/single-gateway-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/single-gateway-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- |---------| ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **single_gateway_name** | The name of the Check Point single GW Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a + | | | | | | + | **subnet_frontend_1st_Address** | First available address in frontend subnet | string | | n/a + | | | | | | + | **subnet_backend_1st_Address** | First available address in backend subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on the gateway | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **smart_1_cloud_token** | Smart-1 Cloud token to connect automatically ***Gateway*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for gateways monitoring | boolean | true;
false; | true + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | gateway;
standalone; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-single-gw-terraform" + single_gateway_name = "checkpoint-single-gw-terraform" + location = "eastus" + vnet_name = "checkpoint-single-gw-vnet" + vnet_resource_group = "existing-vnet-rg" + subnet_frontend_name = "frontend" + subnet_backend_name = "backend" + subnet_frontend_1st_Address = "10.0.1.4" + subnet_backend_1st_Address = "10.12.1.5" + management_GUI_client_network = "0.0.0.0/0" + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + enable_custom_metrics = true + admin_shell = "/etc/cli.sh" + installation_type = "gateway" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | +| | | | + + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/cloud-init.sh new file mode 100644 index 00000000..71bf3916 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/cloud-init.sh @@ -0,0 +1,18 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +managementGUIClientNetwork="${management_GUI_client_network}" +smart1CloudToken="${smart_1_cloud_token}" +customMetrics="${enable_custom_metrics}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/main.tf new file mode 100644 index 00000000..5a61f135 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/main.tf @@ -0,0 +1,257 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "frontend_subnet" { + name = var.subnet_frontend_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend_subnet" { + name = var.subnet_backend_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.single_gateway_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.single_gateway_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.single_gateway_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.frontend_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_frontend_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [] + name = "${var.single_gateway_name}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_backend_1st_Address + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "single-gateway-vm-instance" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1] + location = module.common.resource_group_location + name = var.single_gateway_name + network_interface_ids = [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.single_gateway_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + admin_shell = var.admin_shell + sic_key = var.sic_key + management_GUI_client_network = var.management_GUI_client_network + smart_1_cloud_token = var.smart_1_cloud_token + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.single_gateway_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/terraform.tfvars new file mode 100644 index 00000000..0a186633 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/terraform.tfvars @@ -0,0 +1,35 @@ + #PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-single-terraform" +single_gateway_name = "PLEASE ENTER GW NAME" # "checkpoint-single-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-single-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK RG NAME" # "existing-vnet-rg" +subnet_frontend_name = "PLEASE ENTER VIRTUAL NETWORK FRONTEND SUBNET NAME" # "frontend" +subnet_backend_name = "PLEASE ENTER VIRTUAL NETWORK BACKEND SUBNET NAME" # "backend" +subnet_frontend_1st_Address = "PLEASE ENTER VIRTUAL NETWORK FRONTEND SUBNET FIRST ADDRESS" # "10.0.1.4" +subnet_backend_1st_Address = "PLEASE ENTER VIRTUAL NETWORK BACKEND SUBNET FIRST ADDRESS" # "10.0.2.5" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +enable_custom_metrics = "PLEASE ENTER true or false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "gateway" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/variables.tf new file mode 100644 index 00000000..dd4dc15e --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/variables.tf @@ -0,0 +1,281 @@ +//********************** Basic Configuration Variables **************************// +variable "single_gateway_name" { + description = "Single gateway name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token" { + description = "Smart-1 Cloud Token" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss, sg)" + type = string + default = "single" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "gateway" +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "gateway", + "standalone" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "subnet_frontend_name" { + description = "management subnet name" + type = string +} + +variable "subnet_backend_name" { + description = "management subnet name" + type = string +} + +variable "subnet_frontend_1st_Address" { + description = "The first available address of the frontend subnet" + type = string +} + +variable "subnet_backend_1st_Address" { + description = "The first available address of the backend subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +locals { + regex_valid_single_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_single_GUI_client_network = regex(local.regex_valid_single_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_frontend_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_frontend_1st_Address) == var.subnet_frontend_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." + + regex_subnet_backend_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_backend_1st_Address) == var.subnet_backend_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/README.md b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/README.md new file mode 100644 index 00000000..d4d821ac --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/README.md @@ -0,0 +1,197 @@ +# Check Point CloudGuard Network Security Single Gateway Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Single Gateway solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- System assigned identity + + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/single-gateway-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/single-gateway-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- |----------------| ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **single_gateway_name** | The name of the Check Point single GW Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.12.0.0/16" + | | | | | | + | **frontend_subnet_prefix** | The address prefix to be used for created frontend subnet | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | "10.12.0.0/24" + | | | | | | + | **backend_subnet_prefix** | The address prefix to be used for created backend subnet | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | "10.12.1.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on the gateway | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **smart_1_cloud_token** | Smart-1 Cloud token to connect automatically ***Gateway*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | boolean | true;
false; | true + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | gateway;
standalone; | n/a | string | gateway;
standalone; | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if isn't provided will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-single-gw-terraform" + single_gateway_name = "checkpoint-single-gw-terraform" + location = "eastus" + vnet_name = "checkpoint-single-gw-vnet" + address_space = "10.0.0.0/16" + frontend_subnet_prefix = "10.0.1.0/24" + backend_subnet_prefix = "10.0.2.0/24" + management_GUI_client_network = "0.0.0.0/0" + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + enable_custom_metrics = true + admin_shell = "/etc/cli.sh" + installation_type = "gateway" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/cloud-init.sh new file mode 100644 index 00000000..71bf3916 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/cloud-init.sh @@ -0,0 +1,18 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +managementGUIClientNetwork="${management_GUI_client_network}" +smart1CloudToken="${smart_1_cloud_token}" +customMetrics="${enable_custom_metrics}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/main.tf new file mode 100644 index 00000000..b4642666 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/main.tf @@ -0,0 +1,256 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + is_blink = var.is_blink + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.frontend_subnet_prefix, var.backend_subnet_prefix] + subnet_names = ["${var.single_gateway_name}-frontend-subnet", "${var.single_gateway_name}-backend-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.single_gateway_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.single_gateway_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.single_gateway_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.frontend_subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [] + name = "${var.single_gateway_name}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.backend_subnet_prefix, 4) + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "single-gateway-vm-instance" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1] + location = module.common.resource_group_location + name = var.single_gateway_name + network_interface_ids = [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = var.single_gateway_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + admin_shell = var.admin_shell + sic_key = var.sic_key + management_GUI_client_network = var.management_GUI_client_network + smart_1_cloud_token = var.smart_1_cloud_token + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.single_gateway_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/terraform.tfvars new file mode 100644 index 00000000..636e9491 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/terraform.tfvars @@ -0,0 +1,33 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-single-terraform" +single_gateway_name = "PLEASE ENTER GW NAME" # "checkpoint-single-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-single-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +frontend_subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR FRONTEND SUBNET" # "10.0.0.0/24" +backend_subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR BACKEND SUBNET" # "10.0.1.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +enable_custom_metrics = "PLEASE ENTER true or false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "gateway" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/variables.tf new file mode 100644 index 00000000..65076afc --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/variables.tf @@ -0,0 +1,280 @@ +//********************** Basic Configuration Variables **************************// +variable "single_gateway_name" { + description = "Single gateway name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "smart_1_cloud_token" { + description = "Smart-1 Cloud Token" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss, sg)" + type = string + default = "single" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "installation type" + type = string + default = "gateway" +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "gateway", + "standalone" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.12.0.0/16" +} + +variable "frontend_subnet_prefix" { + description = "Address prefix to be used for network frontend subnet" + type = string + default = "10.12.0.0/24" +} + +variable "backend_subnet_prefix" { + description = "Address prefix to be used for network backend subnet" + type = string + default = "10.12.1.0/24" +} + +variable "vnet_subnets" { + description = "Subnets in vnet" + type = list(string) + default = ["10.12.0.0/24", "10.12.1.0/24"] +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_frontend_subnet_prefix = regex(local.regex_valid_network_cidr, var.frontend_subnet_prefix) == var.frontend_subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_backend_subnet_prefix = regex(local.regex_valid_network_cidr, var.backend_subnet_prefix) == var.backend_subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/versions.tf new file mode 100644 index 00000000..0d5ca4f3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/single-gateway-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/README.md b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/README.md new file mode 100644 index 00000000..dca0361a --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/README.md @@ -0,0 +1,247 @@ +# Check Point CloudGuard IaaS VMSS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS VMSS solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Role assignment - conditional creation + + +For additional information, +please see the [CloudGuard Network for Azure Virtual Machine Scale Sets (VMSS) Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/vmss-existing-vnet/azure_public_key file + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id, tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/vmss-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subsscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss_name name must not contain reserved words based on: sk40179 | n/a + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a + | | | | | | + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix | string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a + | | | | | | + | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | true + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false + | | | | | | + | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +To create role assignment and enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service: +``` +enable_custom_metrics = true +``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-vmss-terraform" + location = "eastus" + vmss_name = "checkpoint-vmss-terraform" + vnet_name = "checkpoint-vmss-vnet" + vnet_resource_group = "existing-vnet" + frontend_subnet_name = "frontend" + backend_subnet_name = "backend" + backend_lb_IP_address = 4 + admin_password = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "100" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_zones_num = "1" + minimum_number_of_vm_instances = 2 + maximum_number_of_vm_instances = 10 + management_name = "mgmt" + management_IP = "13.92.42.181" + management_interface = "eth1-private" + configuration_template_name = "vmss_template" + notification_email = "" + frontend_load_distribution = "Default" + backend_load_distribution = "Default" + enable_custom_metrics = true + enable_floating_ip = false + deployment_mode = "Standard" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + + +## Deploy Without Public IP + +1. By default, the VMSS is deployed with public IP +2. To deploy without public IP, remove the "public_ip_address_configuration" block in main.tf + +## Known limitations + +## Revision History + +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image
- Fix zones filed for scale set be installed as multi-zone
- Modify "management_interface" variable and tags regarding managing the Gateways in the Scale Set | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Adding support for R81.
- Add public IP addresses support.
- Add support to CloudGuards metrics.
- Avoid role-assignment re-creation when re-apply | +| | | | +| 20200323 | Remove the domain_name_label variable from the azurerm_public_ip resource; | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS VMSS Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/cloud-init.sh new file mode 100644 index 00000000..f11f72c3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/cloud-init.sh @@ -0,0 +1,17 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +vnet="${vnet}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/main.tf new file mode 100644 index 00000000..7cc4399a --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/main.tf @@ -0,0 +1,446 @@ +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// + +data "azurerm_subnet" "frontend" { + name = var.frontend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend" { + name = var.backend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +//********************** Load Balancers **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip" "public-ip-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + name = "${var.vmss_name}-app-1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.vmss_name)}-${random_id.random_id.hex}" +} + +resource "azurerm_lb" "frontend-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + depends_on = [azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "${var.vmss_name}-app-1" + public_ip_address_id = azurerm_public_ip.public-ip-lb[0].id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + count = var.deployment_mode != "Internal" ? 1 : 0 + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" +} + +resource "azurerm_lb" "backend-lb" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = "Static" + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0],var.backend_lb_IP_address) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb[0].id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = var.deployment_mode == "Standard" ? 2 : 1 + depends_on = [azurerm_lb.frontend-lb, azurerm_lb.backend-lb] + loadbalancer_id = var.deployment_mode == "Standard" ? (count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) : (var.deployment_mode == "External" ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) + name = var.deployment_mode == "Standard" ? (count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb") : (var.deployment_mode == "External" ? "${var.vmss_name}-app-1" : "backend-lb") + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +// Standard deployment +resource "azurerm_lb_rule" "lbnatrule-standard" { + count = var.deployment_mode == "Standard" ? 2 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id + name = count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb" + protocol = count.index == 0 ? "Tcp" : "All" + frontend_port = count.index == 0 ? var.frontend_port : "0" + backend_port = count.index == 0 ? var.backend_port : "0" + backend_address_pool_ids = count.index == 0 ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] : [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = count.index == 0 ? azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name : azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[count.index].id + load_distribution = count.index == 0 ? var.frontend_load_distribution : var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// External deployment +resource "azurerm_lb_rule" "lbnatrule-external" { + count = var.deployment_mode == "External" ? 1 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob] + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" + protocol = "Tcp" + frontend_port = var.frontend_port + backend_port = var.backend_port + backend_address_pool_ids = [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.frontend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// Internal deployment +resource "azurerm_lb_rule" "lbnatrule-internal" { + count = var.deployment_mode == "Internal" ? 1 : 0 + depends_on = [azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = azurerm_lb.backend-lb[0].id + name = "backend-lb" + protocol = "All" + frontend_port = "0" + backend_port = "0" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "diag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + availability_zones_num_condition = var.availability_zones_num == "0" ? null : var.availability_zones_num == "1" ? ["1"] : var.availability_zones_num == "2" ? ["1", "2"] : ["1", "2", "3"] + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true + management_interface_name = split("-", var.management_interface)[0] + management_ip_address_type = split("-", var.management_interface)[1] +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_linux_virtual_machine_scale_set" "vmss" { + name = var.vmss_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = module.common.vm_size + zones = local.availability_zones_num_condition + instances = var.number_of_vm_instances + overprovision = false + + dynamic "identity" { + for_each = var.enable_custom_metrics ? [1] : [] + content { + type = "SystemAssigned" + } + } + + dynamic "source_image_reference" { + for_each = local.custom_image_condition ? [] : [1] + content { + publisher = module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + } + source_image_id = local.custom_image_condition? azurerm_image.custom-image[0].id : null + + os_disk { + disk_size_gb = module.common.disk_size + caching = module.common.storage_os_disk_caching + storage_account_type = module.common.storage_account_type + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + computer_name_prefix = var.vmss_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = base64encode(templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + vnet = data.azurerm_subnet.frontend.address_prefixes[0] + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + })) + + + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "admin_ssh_key" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + public_key = file("azure_public_key") + username = "notused" + } + } + + + boot_diagnostics { + storage_account_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + upgrade_mode = "Manual" + + network_interface { + name = "eth0" + primary = true + enable_ip_forwarding = true + enable_accelerated_networking = true + network_security_group_id = module.network-security-group[0].network_security_group_id + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.frontend.id + load_balancer_backend_address_pool_ids = var.deployment_mode != "Internal" ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id]: null + primary = true + public_ip_address { + name = "${var.vmss_name}-public-ip" + idle_timeout_in_minutes = 15 + domain_name_label = "${lower(var.vmss_name)}-dns-name" + } + } + } + + network_interface { + name = "eth1" + primary = false + enable_ip_forwarding = true + enable_accelerated_networking = true + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend.id + load_balancer_backend_address_pool_ids = var.deployment_mode != "External" ? [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] : null + primary = true + } + } + + tags = var.management_interface == "eth0"?{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-management-address = var.management_IP, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + }:{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + } +} + +resource "azurerm_monitor_autoscale_setting" "vmss_settings" { + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + name = var.vmss_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + target_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + + profile { + name = "Profile1" + + capacity { + default = module.common.number_of_vm_instances + minimum = var.minimum_number_of_vm_instances + maximum = var.maximum_number_of_vm_instances + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "GreaterThan" + threshold = 80 + } + + scale_action { + direction = "Increase" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "LessThan" + threshold = 60 + } + + scale_action { + direction = "Decrease" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + } + + notification { + email { + send_to_subscription_administrator = false + send_to_subscription_co_administrator = false + custom_emails = var.notification_email == "" ? [] : [var.notification_email] + } + } +} + +resource "azurerm_role_assignment" "custom_metrics_role_assignment"{ + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + count = var.enable_custom_metrics ? 1 : 0 + role_definition_id = join("", ["/subscriptions/", var.subscription_id, "/providers/Microsoft.Authorization/roleDefinitions/", "3913510d-42f4-4e42-8a64-420c390055eb"]) + principal_id = lookup(azurerm_linux_virtual_machine_scale_set.vmss.identity[0], "principal_id") + scope = module.common.resource_group_id + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } +} diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/terraform.tfvars new file mode 100644 index 00000000..66836af3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/terraform.tfvars @@ -0,0 +1,43 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-vmss-terraform" +vmss_name = "PLEASE ENTER SCALE SET NAME" # "checkpoint-vmss-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-vmss-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +frontend_subnet_name = "PLEASE ENTER EXTERNAL SUBNET NAME" # "frontend" +backend_subnet_name = "PLEASE ENTER INTERNAL SUBNET NAME" # "backend" +backend_lb_IP_address = "PLEASE ENTER BACKEND LB IP ADDRESS POSITIONAL NUMBER" # 4 +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE MUST BE 100 FOR VERSIONS R81.20 AND BELOW" # "100" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_zones_num = "PLEASE ENTER NUMBER OF AVAILABILITY ZONES" # "1" +minimum_number_of_vm_instances = "PLEASE ENTER MINIMUM NUMBER OF VM INSTANCES" # 2 +maximum_number_of_vm_instances = "PLEASE ENTER MAXIMUM NUMBER OF VM INSTANCES" # 10 +management_name = "PLEASE ENTER MANAGEMENT NAME" # "mgmt" +management_IP = "PLEASE ENTER MANAGEMENT IP" # "13.92.42.181" +management_interface = "PLEASE ENTER MANAGEMENT INTERFACE" # "eth1-private" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "vmss_template" +notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "" +frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +deployment_mode = "PLEASE ENTER DEPLOYMENT MODE" # "Standard" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/variables.tf new file mode 100644 index 00000000..9ef598a3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/variables.tf @@ -0,0 +1,404 @@ +//********************** Basic Configuration Variables **************************// +variable "vmss_name"{ + description = "vmss name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "availability_zones_num" { + description = "The number of availability zones to use for Scale Set. Note that the load balancers and their IP addresses will be redundant in any case" + #Availability Zones are only supported in several regions at this time + #"centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" + #type = list(string) +} + +locals { // locals for 'availability_zones_num' allowed values + availability_zones_num_allowed_values = [ + "0", + "1", + "2", + "3" + ] + // will fail if [var.availability_zones_num] is invalid: + validate_availability_zones_num_value = index(local.availability_zones_num_allowed_values, var.availability_zones_num) +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "vmss-terraform" +} + +variable "template_version"{ + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type"{ + description = "Installation type" + type = string + default = "vmss" +} + +variable "number_of_vm_instances"{ + description = "Default number of VM instances to deploy" + type = string + default = "2" +} + +variable "minimum_number_of_vm_instances" { + description = "Minimum number of VM instances to deploy" + type = string +} + +variable "maximum_number_of_vm_instances" { + description = "Maximum number of VM instances to deploy" + type = string +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995, if you are using R81.20 or below, the disk size must be 100" + type = string + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is not 100 and the version is R81.20 or below + count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 +} +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "management_name" { + description = "The name of the management server as it appears in the configuration file" + type = string +} + +variable "management_IP" { + description = "The IP address used to manage the VMSS instances" + type = string +} + +variable "management_interface" { + description = "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address" + type = string + default = "eth1-private" +} +locals { // locals for 'management_interface' allowed values + management_interface_allowed_values = [ + "eth0-public", + "eth0-private", + "eth1-private" + ] + // will fail if [var.management_interface] is invalid: + validate_management_interface_value = index(local.management_interface_allowed_values, var.management_interface) +} + +variable "configuration_template_name" { + description = "The configuration template name as it appears in the configuration file" + type = string +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "frontend_subnet_name" { + description = "Frontend subnet name" + type = string +} + +variable "backend_subnet_name" { + description = "Backend subnet name" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************* Load Balancers Variables **********************// + +variable "deployment_mode" { + description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" + type = string + default = "Standard" +} + +locals { // locals for 'deployment_mode' allowed values + deployment_mode_allowd_values = [ + "Standard", + "External", + "Internal" + ] + // will fail if [var.deployment_mode] is invalid: + validate_deployment_mode_value = index(local.deployment_mode_allowd_values, var.deployment_mode) +} + +variable "backend_lb_IP_address" { + description = "The IP address is defined by its position in the subnet" + type = number +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "frontend_port" { + description = "Port that will be exposed to the external Load Balancer" + type = string + default = "80" +} + +variable "backend_port" { + description = "Port that will be exposed to the external Load Balance" + type = string + default = "8081" +} + +variable "frontend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the frontend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + frontend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.frontend_load_distribution] is invalid: + validate_frontend_load_distribution_value = index(local.frontend_load_distribution_allowed_values, var.frontend_load_distribution) +} + +variable "backend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the backend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + backend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.backend_load_distribution] is invalid: + validate_backend_load_distribution_value = index(local.backend_load_distribution_allowed_values, var.backend_load_distribution) +} + +//********************** Scale Set variables *******************// + +variable "vm_os_offer" { + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "bootstrap_script"{ + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "notification_email" { + description = "Specifies a list of custom email addresses to which the email notifications will be sent" + type = string +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} diff --git a/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/versions.tf new file mode 100644 index 00000000..df4caa26 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-existing-vnet/versions.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} + + diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/README.md b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/README.md new file mode 100644 index 00000000..b57e3011 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/README.md @@ -0,0 +1,247 @@ +# Check Point CloudGuard IaaS VMSS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS VMSS solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Role assignment - conditional creation + + +For additional information, +please see the [CloudGuard Network for Azure Virtual Machine Scale Sets (VMSS) Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/vmss-new-vnet/azure_public_key file + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/vmss-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- |---------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss name must not contain reserved words based on: sk40179 | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.0.0.0/16" + | | | | | | + | **subnet_prefixes** | The address prefixes to be used for created subnets | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | ["10.0.0.0/24","10.0.1.0/24"] + | | | | | | + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix| number | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a + | | | | | | + | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | n/a + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | n/a + | | | | | | + | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +To create role assignment and enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service: +``` +enable_custom_metrics = true +``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-vmss-terraform" + location = "eastus" + vmss_name = "checkpoint-vmss-terraform" + vnet_name = "checkpoint-vmss-vnet" + address_space = "10.0.0.0/16" + subnet_prefixes = ["10.0.1.0/24","10.0.2.0/24"] + backend_lb_IP_address = 4 + admin_password = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "100" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_zones_num = "1" + minimum_number_of_vm_instances = 2 + maximum_number_of_vm_instances = 10 + management_name = "mgmt" + management_IP = "13.92.42.181" + management_interface = "eth1-private" + configuration_template_name = "vmss_template" + notification_email = "" + frontend_load_distribution = "Default" + backend_load_distribution = "Default" + enable_custom_metrics = true + enable_floating_ip = false + deployment_mode = "Standard" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Deploy Without Public IP + +1. By default, the VMSS is deployed with public IP +2. To deploy without public IP, remove the "public_ip_address_configuration" block in main.tf + +## Known limitations + +## Revision History + +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | --------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image
- Fix zones filed for scale set be installed as multi-zone
- Modify "management_interface" variable and tags regarding managing the Gateways in the Scale Set | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Add support for R81.
- Add public IP addresses support.
- Add support to CloudGuards metrics.
- Update resources for NSG https://github.com/CheckPointSW/CloudGuardIaaS/issues/67
- Avoid role-assignment re-creation when re-applying | +| | | | +| 20200323 | Remove the domain_name_label variable from the azurerm_public_ip resource | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS VMSS Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/azure_public_key b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/cloud-init.sh b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/cloud-init.sh new file mode 100644 index 00000000..f11f72c3 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/cloud-init.sh @@ -0,0 +1,17 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +vnet="${vnet}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/main.tf b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/main.tf new file mode 100644 index 00000000..967fd8c8 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/main.tf @@ -0,0 +1,442 @@ +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id + address_space = var.address_space + subnet_prefixes = var.subnet_prefixes +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +//********************** Load Balancers **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip" "public-ip-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + name = "${var.vmss_name}-app-1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.vmss_name)}-${random_id.random_id.hex}" +} + +resource "azurerm_lb" "frontend-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + depends_on = [azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "${var.vmss_name}-app-1" + public_ip_address_id = azurerm_public_ip.public-ip-lb[0].id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + count = var.deployment_mode != "Internal" ? 1 : 0 + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" +} + +resource "azurerm_lb" "backend-lb" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], var.backend_lb_IP_address) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb[0].id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = var.deployment_mode == "Standard" ? 2 : 1 + depends_on = [azurerm_lb.frontend-lb, azurerm_lb.backend-lb] + loadbalancer_id = var.deployment_mode == "Standard" ? (count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) : (var.deployment_mode == "External" ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) + name = var.deployment_mode == "Standard" ? (count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb") : (var.deployment_mode == "External" ? "${var.vmss_name}-app-1" : "backend-lb") + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +// Standard deployment +resource "azurerm_lb_rule" "lbnatrule-standard" { + count = var.deployment_mode == "Standard" ? 2 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id + name = count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb" + protocol = count.index == 0 ? "Tcp" : "All" + frontend_port = count.index == 0 ? var.frontend_port : "0" + backend_port = count.index == 0 ? var.backend_port : "0" + backend_address_pool_ids = count.index == 0 ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] : [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = count.index == 0 ? azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name : azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[count.index].id + load_distribution = count.index == 0 ? var.frontend_load_distribution : var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// External deployment +resource "azurerm_lb_rule" "lbnatrule-external" { + count = var.deployment_mode == "External" ? 1 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob] + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" + protocol = "Tcp" + frontend_port = var.frontend_port + backend_port = var.backend_port + backend_address_pool_ids = [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.frontend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// Internal deployment +resource "azurerm_lb_rule" "lbnatrule-internal" { + count = var.deployment_mode == "Internal" ? 1 : 0 + depends_on = [azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = azurerm_lb.backend-lb[0].id + name = "backend-lb" + protocol = "All" + frontend_port = "0" + backend_port = "0" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "diag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + availability_zones_num_condition = var.availability_zones_num == "0" ? null : var.availability_zones_num == "1" ? ["1"] : var.availability_zones_num == "2" ? ["1", "2"] : ["1", "2", "3"] + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true + management_interface_name = split("-", var.management_interface)[0] + management_ip_address_type = split("-", var.management_interface)[1] +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_linux_virtual_machine_scale_set" "vmss" { + name = var.vmss_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = module.common.vm_size + zones = local.availability_zones_num_condition + instances = var.number_of_vm_instances + overprovision = false + + dynamic "identity" { + for_each = var.enable_custom_metrics ? [1] : [] + content { + type = "SystemAssigned" + } + } + + dynamic "source_image_reference" { + for_each = local.custom_image_condition ? [] : [1] + content { + publisher = module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + } + source_image_id = local.custom_image_condition? azurerm_image.custom-image[0].id : null + + os_disk { + disk_size_gb = module.common.disk_size + caching = module.common.storage_os_disk_caching + storage_account_type = module.common.storage_account_type + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + computer_name_prefix = var.vmss_name + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = base64encode(templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + vnet = module.vnet.subnet_prefixes[0] + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + })) + + + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "admin_ssh_key" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + public_key = file("azure_public_key") + username = "notused" + } + } + + + boot_diagnostics { + storage_account_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + upgrade_mode = "Manual" + + network_interface { + name = "eth0" + primary = true + enable_ip_forwarding = true + enable_accelerated_networking = true + network_security_group_id = module.network-security-group[0].network_security_group_id + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + load_balancer_backend_address_pool_ids = var.deployment_mode != "Internal" ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id]: null + primary = true + public_ip_address { + name = "${var.vmss_name}-public-ip" + idle_timeout_in_minutes = 15 + domain_name_label = "${lower(var.vmss_name)}-dns-name" + } + } + } + + network_interface { + name = "eth1" + primary = false + enable_ip_forwarding = true + enable_accelerated_networking = true + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + load_balancer_backend_address_pool_ids = var.deployment_mode != "External" ? [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] : null + primary = true + } + } + + tags = var.management_interface == "eth0"?{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-management-address = var.management_IP, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + }:{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + } +} + +resource "azurerm_monitor_autoscale_setting" "vmss_settings" { + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + name = var.vmss_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + target_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + + profile { + name = "Profile1" + + capacity { + default = module.common.number_of_vm_instances + minimum = var.minimum_number_of_vm_instances + maximum = var.maximum_number_of_vm_instances + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "GreaterThan" + threshold = 80 + } + + scale_action { + direction = "Increase" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "LessThan" + threshold = 60 + } + + scale_action { + direction = "Decrease" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + } + + notification { + email { + send_to_subscription_administrator = false + send_to_subscription_co_administrator = false + custom_emails = var.notification_email == "" ? [] : [var.notification_email] + } + } +} + +resource "azurerm_role_assignment" "custom_metrics_role_assignment"{ + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + count = var.enable_custom_metrics ? 1 : 0 + role_definition_id = join("", ["/subscriptions/", var.subscription_id, "/providers/Microsoft.Authorization/roleDefinitions/", "3913510d-42f4-4e42-8a64-420c390055eb"]) + principal_id = lookup(azurerm_linux_virtual_machine_scale_set.vmss.identity[0], "principal_id") + scope = module.common.resource_group_id + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } +} diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/terraform.tfvars b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/terraform.tfvars new file mode 100644 index 00000000..73266464 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/terraform.tfvars @@ -0,0 +1,42 @@ +//#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-vmss-terraform" +vmss_name = "PLEASE ENTER SCALE SET NAME" # "checkpoint-vmss-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-vmss-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefixes = "PLEASE ENTER ADDRESS PREFIXES FOR SUBNETS" # ["10.0.1.0/24","10.0.2.0/24"] +backend_lb_IP_address = "PLEASE ENTER BACKEND LB IP ADDRESS POSITIONAL NUMBER" # 4 +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE MUST BE 100 FOR VERSIONS R81.20 AND BELOW" # "100" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_zones_num = "PLEASE ENTER NUMBER OF AVAILABILITY ZONES" # "1" +minimum_number_of_vm_instances = "PLEASE ENTER MINIMUM NUMBER OF VM INSTANCES" # 2 +maximum_number_of_vm_instances = "PLEASE ENTER MAXIMUM NUMBER OF VM INSTANCES" # 10 +management_name = "PLEASE ENTER MANAGEMENT NAME" # "mgmt" +management_IP = "PLEASE ENTER MANAGEMENT IP" # "13.92.42.181" +management_interface = "PLEASE ENTER MANAGEMENT INTERFACE" # "eth1-private" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "vmss_template" +notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "" +frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +deployment_mode = "PLEASE ENTER DEPLOYMENT MODE" # "Standard" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/variables.tf b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/variables.tf new file mode 100644 index 00000000..1760b8a2 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/variables.tf @@ -0,0 +1,393 @@ +//********************** Basic Configuration Variables **************************// +variable "vmss_name"{ + description = "vmss name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "availability_zones_num" { + description = "The number of availability zones to use for Scale Set. Note that the load balancers and their IP addresses will be redundant in any case" + #Availability Zones are only supported in several regions at this time + #"centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" + #type = list(string) +} + +locals { // locals for 'availability_zones_num' allowed values + availability_zones_num_allowed_values = [ + "0", + "1", + "2", + "3" + ] + // will fail if [var.availability_zones_num] is invalid: + validate_availability_zones_num_value = index(local.availability_zones_num_allowed_values, var.availability_zones_num) +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "vmss-terraform" +} + +variable "template_version"{ + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type"{ + description = "Installation type" + type = string + default = "vmss" +} + +variable "number_of_vm_instances"{ + description = "Default number of VM instances to deploy" + type = string + default = "2" +} + +variable "minimum_number_of_vm_instances" { + description = "Minimum number of VM instances to deploy" + type = string +} + +variable "maximum_number_of_vm_instances" { + description = "Maximum number of VM instances to deploy" + type = string +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120", + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995, if you are using R81.20 or below, the disk size must be 100" + type = string + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is not 100 and the version is R81.20 or below + count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 +} +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "management_name" { + description = "The name of the management server as it appears in the configuration file" + type = string +} + +variable "management_IP" { + description = "The IP address used to manage the VMSS instances" + type = string +} + +variable "management_interface" { + description = "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address" + type = string + default = "eth1-private" +} +locals { // locals for 'management_interface' allowed values + management_interface_allowed_values = [ + "eth0-public", + "eth0-private", + "eth1-private" + ] + // will fail if [var.management_interface] is invalid: + validate_management_interface_value = index(local.management_interface_allowed_values, var.management_interface) +} + +variable "configuration_template_name" { + description = "The configuration template name as it appears in the configuration file" + type = string +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefixes" { + description = "Address prefix to be used for network subnets" + type = list(string) + default = ["10.0.0.0/24","10.0.1.0/24"] +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************* Load Balancers Variables **********************// +variable "deployment_mode" { + description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" + type = string + default = "Standard" +} + +locals { // locals for 'deployment_mode' allowed values + deployment_mode_allowd_values = [ + "Standard", + "External", + "Internal" + ] + // will fail if [var.deployment_mode] is invalid: + validate_deployment_mode_value = index(local.deployment_mode_allowd_values, var.deployment_mode) +} + +variable "backend_lb_IP_address" { + description = "The IP address is defined by its position in the subnet" + type = number +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "frontend_port" { + description = "Port that will be exposed to the external Load Balancer" + type = string + default = "80" +} + +variable "backend_port" { + description = "Port that will be exposed to the external Load Balance" + type = string + default = "8081" +} + +variable "frontend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the frontend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + frontend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.frontend_load_distribution] is invalid: + validate_frontend_load_distribution_value = index(local.frontend_load_distribution_allowed_values, var.frontend_load_distribution) +} + +variable "backend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the backend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + backend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.backend_load_distribution] is invalid: + validate_backend_load_distribution_value = index(local.backend_load_distribution_allowed_values, var.backend_load_distribution) +} + +//********************** Scale Set variables *******************// + +variable "vm_os_offer" { + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "bootstrap_script"{ + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "notification_email" { + description = "Specifies a list of custom email addresses to which the email notifications will be sent" + type = string +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} diff --git a/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/versions.tf b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/versions.tf new file mode 100644 index 00000000..df4caa26 --- /dev/null +++ b/deprecated/terraform/azure/R8040-R81/vmss-new-vnet/versions.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} + + diff --git a/deprecated/terraform/azure/README.md b/deprecated/terraform/azure/README.md new file mode 100644 index 00000000..c24588d9 --- /dev/null +++ b/deprecated/terraform/azure/README.md @@ -0,0 +1,12 @@ +# Check Point Terraform deployment modules for Azure + +This project was developed to allow Terraform deployments for Check Point CloudGuard IaaS solutions on Azure. + + +These modules use Terraform's [Azurerm provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) in order to create and provision resources on Azure. + + + ## Prerequisites + +1. [Download Terraform](https://www.terraform.io/downloads.html) and follow the instructions according to your OS. +2. Get started with Terraform Azurerm provider - refer to [Terraform Azurerm provider best practices](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs). \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/README.md b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/README.md new file mode 100644 index 00000000..1c11c3d3 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/README.md @@ -0,0 +1,233 @@ +# Check Point Autoscale into VPC (MIG) Terraform module for GCP + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into an existing VPC on GCP. + +These types of Terraform resources are supported: +* [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation +* [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) +* [Autoscaler](https://www.terraform.io/docs/providers/google/r/compute_region_autoscaler.html) + + +For additional information, +please see the [CloudGuard Network for GCP Autoscaling MIG Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_Autoscaling_MIG/Default.htm) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.autoscalers.create + compute.autoscalers.delete + compute.autoscalers.get + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instanceGroupManagers.create + compute.instanceGroupManagers.delete + compute.instanceGroupManagers.get + compute.instanceGroupManagers.use + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.setMetadata + compute.instances.setTags + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/autoscale-into-new-vpc/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/autoscale-into-existing-vpc/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in autoscale-into-existing-vpc/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +prefix = "chkp-tf-mig" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "Ephemeral Public IP (eth0)" +management_name = "tf-checkpoint-management" +configuration_template_name = "tf-asg-autoprov-tmplt" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = true +admin_shell = "/etc/cli.sh" +allow_upload_download = true + +# --- Networking --- +region = "us-central1" +external_network_name = "default" +external_subnetwork_name = "default" +internal_network_name = "tf-vpc-network" +internal_subnetwork_name = "tf-vpc-subnetwork" +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +cpu_usage = 60 +instances_min_grop_size = 2 +instances_max_grop_size = 10 +disk_type = "SSD Persistent Disk" +disk_size = 100 +enable_monitoring = false +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | +| management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | +| configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| external_network_name | The network determines what network traffic the instance can access. | string | N/A | N/A | yes | +| external_subnetwork_name | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | N/A | yes | +| internal_network_name | The network determines what network traffic the instance can access. | string | N/A | N/A | yes | +| internal_subnetwork_name | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | N/A | yes | +| ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| | | | | | +| machine_type | Machine Type. | string | N/A | "n1-standard-4" | no | +| cpu_usage | Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance. | number | number between 10 and 90 | 60 | no | +| instances_min_grop_size | The minimal number of instances | number | N/A | 2 | no | +| instances_max_grop_size | The maximal number of instances | number | N/A | 10 | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Balanced Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| management_name | Security Management server name. | +| configuration_template_name | Provisioning configuration template name. | +| instance_template_name | Instance template name. | +| instance_group_manager_name | Instance group manager name. | +| autoscaler_name | Autoscaler name. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into an existing VPC on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/locals.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/locals.tf new file mode 100644 index 00000000..058d0689 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/locals.tf @@ -0,0 +1,63 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + management_nic_allowed_values = [ + "Ephemeral Public IP (eth0)", + "Private IP (eth1)"] + // will fail if [var.management_nic] is invalid: + validate_management_nic = index(local.management_nic_allowed_values, var.management_nic) + + regex_valid_management_name = "^([ -~]+)$" + // Will fail if var.management_name is invalid + regex_management_name = regex(local.regex_valid_management_name, var.management_name) == var.management_name ? 0 : "Variable [management_name] must be a valid Security Management name including ascii characters only" + + regex_valid_configuration_template_name = "^([ -~]+)$" + // Will fail if var.configuration_template_name is invalid + regex_configuration_template_name = regex(local.regex_valid_configuration_template_name, var.configuration_template_name) == var.configuration_template_name ? 0 : "Variable [configuration_template_name] must be a valid autoprovisioing configuration template name including ascii characters only" + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regions_allowed_values = data.google_compute_regions.available_regions.names + // Will fail if var.region is invalid + validate_region = index(local.regions_allowed_values, var.region) + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) + + + + disk_type_condition = var.disk_type == "SSD Persistent Disk" ? "pd-ssd" : var.disk_type == "Balanced Persistent Disk" ? "pd-balanced" : var.disk_type == "Standard Persistent Disk" ? "pd-standard" : "" + mgmt_nic_condition = var.management_nic == "Ephemeral Public IP (eth0)" ? true : false + mgmt_nic_ip_address_condition = local.mgmt_nic_condition ? "x-chkp-ip-address--public" : "x-chkp-ip-address--private" + mgmt_nic_interface_condition = local.mgmt_nic_condition ? "x-chkp-management-interface--eth0" : "x-chkp-management-interface--eth1" + network_defined_by_routes_condition = var.network_defined_by_routes ? "x-chkp-topology-eth1--internal" : "" + network_defined_by_routes_settings_condition = var.network_defined_by_routes ? "x-chkp-topology-settings-eth1--network-defined-by-routes" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false + ICMP_traffic_condition = length(var.ICMP_traffic) == 0 ? 0 : 1 + TCP_traffic_condition = length(var.TCP_traffic) == 0 ? 0 : 1 + UDP_traffic_condition = length(var.UDP_traffic) == 0 ? 0 : 1 + SCTP_traffic_condition = length(var.SCTP_traffic) == 0 ? 0 : 1 + ESP_traffic_condition = length(var.ESP_traffic) == 0 ? 0 : 1 +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/main.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/main.tf new file mode 100644 index 00000000..24548144 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/main.tf @@ -0,0 +1,197 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +data "google_compute_network" "external_network" { + name = var.external_network_name +} +data "google_compute_network" "internal_network" { + name = var.internal_network_name +} +resource "random_string" "random_sic_key" { + length = 12 + special = false +} + +resource "google_compute_instance_template" "instance_template" { + name = "${var.prefix}-tmplt-${random_string.random_string.result}" + machine_type = var.machine_type + can_ip_forward = true + + + disk { + source_image = "checkpoint-public/${var.image_name}" + auto_delete = true + boot = true + device_name = "${var.prefix}-boot-${random_string.random_string.result}" + disk_type = local.disk_type_condition + disk_size_gb = var.disk_size + mode = "READ_WRITE" + type = "PERSISTENT" + } + + network_interface { + network = data.google_compute_network.external_network.self_link + subnetwork = var.external_subnetwork_name + dynamic "access_config" { + for_each = local.mgmt_nic_condition ? [ + 1] : [] + content { + network_tier = local.mgmt_nic_condition ? "PREMIUM" : "STANDARD" + } + } + } + + network_interface { + network = data.google_compute_network.internal_network.self_link + subnetwork = var.internal_subnetwork_name + } + + scheduling { + automatic_restart = true + on_host_maintenance = "MIGRATE" + preemptible = false + } + + service_account { + email = "default" + scopes = [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append"] + } + tags = [ + format("x-chkp-management--%s", var.management_name), + format("x-chkp-template--%s", var.configuration_template_name), + "checkpoint-gateway", + local.mgmt_nic_ip_address_condition, + local.mgmt_nic_interface_condition, + local.network_defined_by_routes_condition, + local.network_defined_by_routes_settings_condition] + + metadata_startup_script = templatefile("${path.module}/../common/startup-script.sh", { + // script's arguments + generatePassword = "false" + config_url = "" + config_path = "" + sicKey = "" + allowUploadDownload = var.allow_upload_download + templateName = "autoscale_tf" + templateVersion = "20230109" + templateType = "terraform" + mgmtNIC = var.management_nic + hasInternet = "false" + enableMonitoring = var.enable_monitoring + shell = var.admin_shell + installationType = "AutoScale" + computed_sic_key = random_string.random_sic_key.result + managementGUIClientNetwork = "" + primary_cluster_address_name = "" + secondary_cluster_address_name = "" + managementNetwork = "" + numAdditionalNICs = "" + smart_1_cloud_token = "" + name = "" + zoneConfig = "" + region = "" + }) + + metadata = local.admin_SSH_key_condition ? { + serial-port-enable = "true" + instanceSSHKey = var.admin_SSH_key + } : { + serial-port-enable = "true" + } +} + +resource "google_compute_firewall" "ICMP_firewall_rules" { + count = local.ICMP_traffic_condition + name = "${var.prefix}-icmp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "icmp" + } + source_ranges = var.ICMP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "TCP_firewall_rules" { + count = local.TCP_traffic_condition + name = "${var.prefix}-tcp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "tcp" + } + source_ranges = var.TCP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "UDP_firewall_rules" { + count = local.UDP_traffic_condition + name = "${var.prefix}-udp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "udp" + } + source_ranges = var.UDP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "SCTP_firewall_rules" { + count = local.SCTP_traffic_condition + name = "${var.prefix}-sctp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "sctp" + } + source_ranges = var.SCTP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "ESP_firewall_rules" { + count = local.ESP_traffic_condition + name = "${var.prefix}-esp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "esp" + } + source_ranges = var.ESP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_region_instance_group_manager" "instance_group_manager" { + region = var.region + name = "${var.prefix}-igm-${random_string.random_string.result}" + version { + instance_template = google_compute_instance_template.instance_template.id + name = "${var.prefix}-tmplt" + } + base_instance_name = "${var.prefix}-${random_string.random_string.result}" +} +resource "google_compute_region_autoscaler" "autoscaler" { + region = var.region + name = "${var.prefix}-autoscaler-${random_string.random_string.result}" + target = google_compute_region_instance_group_manager.instance_group_manager.id + + autoscaling_policy { + max_replicas = var.instances_max_grop_size + min_replicas = var.instances_min_grop_size + cooldown_period = 90 + + cpu_utilization { + target = var.cpu_usage/100 + } + } +} diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/output.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/output.tf new file mode 100644 index 00000000..62b1f028 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/output.tf @@ -0,0 +1,33 @@ +output "SIC_key" { + value = random_string.random_sic_key.result +} +output "management_name" { + value = var.management_name +} +output "configuration_template_name" { + value = var.configuration_template_name +} +output "instance_template_name" { + value = google_compute_instance_template.instance_template.name +} +output "instance_group_manager_name" { + value = google_compute_region_instance_group_manager.instance_group_manager.name +} +output "autoscaler_name" { + value = google_compute_region_autoscaler.autoscaler.name +} +output "ICMP_firewall_rules_name" { + value = google_compute_firewall.ICMP_firewall_rules[*].name +} +output "TCP_firewall_rules_name" { + value = google_compute_firewall.TCP_firewall_rules[*].name +} +output "UDP_firewall_rules_name" { + value = google_compute_firewall.UDP_firewall_rules[*].name +} +output "SCTP_firewall_rules_name" { + value = google_compute_firewall.SCTP_firewall_rules[*].name +} +output "ESP_firewall_rules_name" { + value = google_compute_firewall.ESP_firewall_rules[*].name +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/terraform.tfvars b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/terraform.tfvars new file mode 100644 index 00000000..dfb828db --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/terraform.tfvars @@ -0,0 +1,36 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point--- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" +management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +allow_upload_download = "PLEASE ENTER true OR false" # true + +# --- Networking --- +region = "PLEASE ENTER REGION" # "us-central1" +external_network_name = "PLEASE ENTER EXTERNAL NETWORK NAME" # "default" +external_subnetwork_name = "PLEASE ENTER EXTERNAL SUBNETWORK NAME" # "default" +internal_network_name = "PLEASE ENTER INTERNAL NETWORK NAME" # "tf-vpc-network" +internal_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK NAME" # "tf-vpc-subnetwork" +ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] + +# --- Instance Configuration --- +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +cpu_usage = "PLEASE ENTER CPU USAGE" # 60 +instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 +instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/variables.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/variables.tf new file mode 100644 index 00000000..8acd8fda --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-existing-vpc/variables.tf @@ -0,0 +1,157 @@ +# Check Point CloudGuard IaaS Autoscaling - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point--- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-mig" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "management_nic" { + type = string + description = "Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "management_name" { + type = string + description = "The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including ascii characters only)" + default = "tf-checkpoint-management" +} +variable "configuration_template_name" { + type = string + description = "Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including ascii characters only)" + default = "tf-asg-autoprov-tmplt" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "network_defined_by_routes" { + type = bool + description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." + default = true +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +# --- Networking --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} +variable "external_network_name" { + type = string + description = "The network determines what network traffic the instance can access" +} +variable "external_subnetwork_name" { + type = string + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." +} +variable "internal_network_name" { + type = string + description = "The network determines what network traffic the instance can access" +} +variable "internal_subnetwork_name" { + type = string + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." +} +variable "ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic." + default = [] +} +variable "UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} + +# --- Instance Configuration --- +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "cpu_usage" { + type = number + description = "Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance." + default = 60 +} +resource "null_resource" "cpu_usage_validation" { + // Will fail if var.cpu_usage is less than 10 or more than 90 + count = var.cpu_usage >= 10 && var.cpu_usage <= 90 ? 0 : "variable cpu_usage must be a number between 10 and 90" +} +variable "instances_min_grop_size" { + type = number + description = "The minimal number of instances" + default = 2 +} +variable "instances_max_grop_size" { + type = number + description = "The maximal number of instances" + default = 10 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 4096 + count = var.disk_size >= 100 && var.disk_size <= 4096 ? 0 : "variable disk_size must be a number between 100 and 4096" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/README.md b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/README.md new file mode 100644 index 00000000..3439418c --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/README.md @@ -0,0 +1,241 @@ +# Check Point Autoscale (MIG) Terraform module for GCP + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into a new VPC on GCP. + +These types of Terraform resources are supported: +* [Network](https://www.terraform.io/docs/providers/google/d/compute_network.html) +* [Subnetwork](https://www.terraform.io/docs/providers/google/r/compute_subnetwork.html) +* [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation +* [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) +* [Autoscaler](https://www.terraform.io/docs/providers/google/r/compute_region_autoscaler.html) + + +For additional information, +please see the [CloudGuard Network for GCP Autoscaling MIG Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_Autoscaling_MIG/Default.htm) + +This solution uses the following modules: +- /gcp/autoscale-into-existing-vpc + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.autoscalers.create + compute.autoscalers.delete + compute.autoscalers.get + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instanceGroupManagers.create + compute.instanceGroupManagers.delete + compute.instanceGroupManagers.get + compute.instanceGroupManagers.use + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.setMetadata + compute.instances.setTags + compute.networks.create + compute.networks.delete + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.create + compute.subnetworks.delete + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/autoscale-into-new-vpc/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` + ## Usage +- Fill all variables in the /gcp/autoscale-into-new-vpc/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in autoscale-into-new-vpc/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +prefix = "chkp-tf-mig" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "Ephemeral Public IP (eth0)" +management_name = "tf-checkpoint-management" +configuration_template_name = "tf-asg-autoprov-tmplt" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = true +admin_shell = "/etc/cli.sh" +allow_upload_download = true + +# --- Networking --- +region = "us-central1" +external_subnetwork_ip_cidr_range = "10.0.1.0/24" +internal_subnetwork_ip_cidr_range = "10.0.2.0/24" +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +cpu_usage = 60 +instances_min_grop_size = 2 +instances_max_grop_size = 10 +disk_type = "SSD Persistent Disk" +disk_size = 100 +enable_monitoring = false +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | +| management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | +| configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| external_subnetwork_ip_cidr_range | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| internal_subnetwork_ip_cidr_range | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| | | | | | +| machine_type | Machine Type. | string | N/A | "n1-standard-4" | no | +| cpu_usage | Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance. | number | number between 10 and 90 | 60 | no | +| instances_min_grop_size | The minimal number of instances | number | N/A | 2 | no | +| instances_max_grop_size | The maximal number of instances | number | N/A | 10 | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Balanced Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | + + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| external_network_name | The external network name in which the gateways will reside. | +| external_subnetwork_name | The external subnetwork name. | +| internal_network_name | The internal network name in which application servers reside. | +| internal_subnetwork_name | The internal subnetwork name. | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| management_name | Security Management server name. | +| configuration_template_name | Provisioning configuration template name. | +| instance_template_name | Instance template name. | +| instance_group_manager_name | Instance group manager name. | +| autoscaler_name | Autoscaler name. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into a new VPC on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/locals.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/locals.tf new file mode 100644 index 00000000..451bbd93 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/locals.tf @@ -0,0 +1,48 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + management_nic_allowed_values = [ + "Ephemeral Public IP (eth0)", + "Private IP (eth1)"] + // will fail if [var.management_nic] is invalid: + validate_management_nic = index(local.management_nic_allowed_values, var.management_nic) + + regex_valid_management_name = "^([ -~]+)$" + // Will fail if var.management_name is invalid + regex_management_name = regex(local.regex_valid_management_name, var.management_name) == var.management_name ? 0 : "Variable [management_name] must be a valid Security Management name including ascii characters only" + + regex_valid_configuration_template_name = "^([ -~]+)$" + // Will fail if var.configuration_template_name is invalid + regex_configuration_template_name = regex(local.regex_valid_configuration_template_name, var.configuration_template_name) == var.configuration_template_name ? 0 : "Variable [configuration_template_name] must be a valid autoprovisioing configuration template name including ascii characters only" + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regions_allowed_values = data.google_compute_regions.available_regions.names + // Will fail if var.region is invalid + validate_region = index(local.regions_allowed_values, var.region) + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf new file mode 100644 index 00000000..16ec2197 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf @@ -0,0 +1,73 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "mig_random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +resource "google_compute_network" "external_network" { + name = "${var.prefix}-ext-network-${random_string.mig_random_string.result}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "external_subnetwork" { + name = "${var.prefix}-ext-subnet-${random_string.mig_random_string.result}" + ip_cidr_range = var.external_subnetwork_ip_cidr_range + region = var.region + network = google_compute_network.external_network.id +} + +resource "google_compute_network" "internal_network" { + name = "${var.prefix}-int-network-${random_string.mig_random_string.result}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "internal_subnetwork" { + name = "${var.prefix}-int-subnet-${random_string.mig_random_string.result}" + ip_cidr_range = var.internal_subnetwork_ip_cidr_range + region = var.region + network = google_compute_network.internal_network.id +} + + +module "autoscale-into-existing-vpc" { + source = "../autoscale-into-existing-vpc" + + service_account_path = var.service_account_path + project = var.project + + # --- Check Point--- + prefix = var.prefix + image_name = var.image_name + management_nic = var.management_nic + management_name = var.management_name + configuration_template_name = var.configuration_template_name + admin_SSH_key = var.admin_SSH_key + network_defined_by_routes = var.network_defined_by_routes + admin_shell = var.admin_shell + allow_upload_download = var.allow_upload_download + + # --- Networking --- + region = var.region + external_network_name = google_compute_network.external_network.name + external_subnetwork_name = google_compute_subnetwork.external_subnetwork.name + internal_network_name = google_compute_network.internal_network.name + internal_subnetwork_name = google_compute_subnetwork.internal_subnetwork.name + ICMP_traffic = var.ICMP_traffic + TCP_traffic = var.TCP_traffic + UDP_traffic = var.UDP_traffic + SCTP_traffic = var.SCTP_traffic + ESP_traffic = var.ESP_traffic + + # --- Instance Configuration --- + machine_type = var.machine_type + cpu_usage = var.cpu_usage + instances_min_grop_size = var.instances_min_grop_size + instances_max_grop_size = var.instances_max_grop_size + disk_type = var.disk_type + disk_size = var.disk_size + enable_monitoring = var.enable_monitoring +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/output.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/output.tf new file mode 100644 index 00000000..ef020e27 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/output.tf @@ -0,0 +1,46 @@ +output "external_network_name" { + value = google_compute_network.external_network.name +} +output "external_subnetwork_name" { + value = google_compute_subnetwork.external_subnetwork.name +} +output "internal_network_name" { + value = google_compute_network.internal_network.name +} +output "internal_subnetwork_name" { + value = google_compute_subnetwork.internal_subnetwork.name +} + +output "SIC_key" { + value = module.autoscale-into-existing-vpc.SIC_key +} +output "management_name" { + value = var.management_name +} +output "configuration_template_name" { + value = var.configuration_template_name +} +output "instance_template_name" { + value = module.autoscale-into-existing-vpc.instance_template_name +} +output "instance_group_manager_name" { + value = module.autoscale-into-existing-vpc.instance_group_manager_name +} +output "autoscaler_name" { + value = module.autoscale-into-existing-vpc.autoscaler_name +} +output "ICMP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.ICMP_firewall_rules_name +} +output "TCP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.TCP_firewall_rules_name +} +output "UDP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.UDP_firewall_rules_name +} +output "SCTP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.SCTP_firewall_rules_name +} +output "ESP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.ESP_firewall_rules_name +} diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/terraform.tfvars b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/terraform.tfvars new file mode 100644 index 00000000..48fe765a --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/terraform.tfvars @@ -0,0 +1,34 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point--- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" +management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +allow_upload_download = "PLEASE ENTER true OR false" # true + +# --- Networking --- +region = "PLEASE ENTER REGION" # "us-central1" +external_subnetwork_ip_cidr_range = "PLEASE ENTER EXTERNAL SUBNETWORK CIDR" # "10.0.1.0/24" +internal_subnetwork_ip_cidr_range = "PLEASE ENTER INTERNAL SUBNETWORK CIDR" # "10.0.2.0/24" +ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] + +# --- Instance Configuration --- +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +cpu_usage = "PLEASE ENTER CPU USAGE" # 60 +instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 +instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/variables.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/variables.tf new file mode 100644 index 00000000..f19a77d2 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/variables.tf @@ -0,0 +1,150 @@ +# Check Point CloudGuard IaaS Autoscaling - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point--- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-mig" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "management_nic" { + type = string + description = "Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "management_name" { + type = string + description = "The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including ascii characters only)" + default = "tf-checkpoint-management" +} +variable "configuration_template_name" { + type = string + description = "Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including ascii characters only)" + default = "tf-asg-autoprov-tmplt" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "network_defined_by_routes" { + type = bool + description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." + default = true +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +# --- Networking --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} + +variable "external_subnetwork_ip_cidr_range" { + type = string + description = "The range of external addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "internal_subnetwork_ip_cidr_range" { + type = string + description = "The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic." + default = [] +} +variable "UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} + +# --- Instance Configuration --- +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "cpu_usage" { + type = number + description = "Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance." + default = 60 +} +resource "null_resource" "cpu_usage_validation" { + // Will fail if var.cpu_usage is less than 10 or more than 90 + count = var.cpu_usage >= 10 && var.cpu_usage <= 90 ? 0 : "variable cpu_usage must be a number between 10 and 90" +} +variable "instances_min_grop_size" { + type = number + description = "The minimal number of instances" + default = 2 +} +variable "instances_max_grop_size" { + type = number + description = "The maximal number of instances" + default = 10 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 4096 + count = var.disk_size >= 100 && var.disk_size <= 4096 ? 0 : "variable disk_size must be a number between 100 and 4096" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/cluster-member/main.tf b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/main.tf new file mode 100644 index 00000000..c740f8b3 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/main.tf @@ -0,0 +1,130 @@ +locals { + disk_type_condition = var.disk_type == "SSD Persistent Disk" ? "pd-ssd" : var.disk_type == "Standard Persistent Disk" ? "pd-standard" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false +} + +resource "google_compute_address" "member_ip_address" { + name = "${var.member_name}-address" + region = var.region +} + +resource "google_compute_instance" "cluster_member" { + name = var.member_name + description = "CloudGuard Highly Available Security Cluster" + zone = var.zone + tags = [ + "checkpoint-gateway"] + machine_type = var.machine_type + can_ip_forward = true + + boot_disk { + auto_delete = true + device_name = "${var.prefix}-boot" + + initialize_params { + size = var.disk_size + type = local.disk_type_condition + image = var.image_name + } + } + + network_interface { + network = var.cluster_network[0] + subnetwork = var.cluster_network_subnetwork[0] + } + network_interface { + network = var.mgmt_network[0] + subnetwork = var.mgmt_network_subnetwork[0] + access_config { + nat_ip = google_compute_address.member_ip_address.address + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 1 ? [ + 1] : [] + content { + network = var.internal_network1_network[0] + subnetwork = var.internal_network1_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 2 ? [ + 1] : [] + content { + network = var.internal_network2_network[0] + subnetwork = var.internal_network2_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 3 ? [ + 1] : [] + content { + network = var.internal_network3_network[0] + subnetwork = var.internal_network3_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 4 ? [ + 1] : [] + content { + network = var.internal_network4_network[0] + subnetwork = var.internal_network4_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 5 ? [ + 1] : [] + content { + network = var.internal_network5_network[0] + subnetwork = var.internal_network5_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks == 6 ? [ + 1] : [] + content { + network = var.internal_network6_network[0] + subnetwork = var.internal_network6_subnetwork[0] + } + } + + service_account { + + scopes = [ + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloudruntimeconfig"] + } + + metadata = local.admin_SSH_key_condition ? { + instanceSSHKey = var.admin_SSH_key + adminPasswordSourceMetadata = var.generate_password ? var.generated_admin_password : "" + } : { adminPasswordSourceMetadata = var.generate_password ? var.generated_admin_password : "" } + + metadata_startup_script = templatefile("${path.module}/../startup-script.sh", { + // script's arguments + generatePassword = var.generate_password + config_url = "https://runtimeconfig.googleapis.com/v1beta1/projects/${var.project}/configs/${var.prefix}-config" + config_path = "projects/${var.project}/configs/${var.prefix}-config" + sicKey = var.sic_key + allowUploadDownload = var.allow_upload_download + templateName = "cluster_tf" + templateVersion = "20230109" + templateType = "terraform" + mgmtNIC = "" + hasInternet = "true" + enableMonitoring = var.enable_monitoring + shell = var.admin_shell + installationType = "Cluster" + computed_sic_key = "" + managementGUIClientNetwork = "" + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + managementNetwork = var.management_network + numAdditionalNICs = var.num_internal_networks + smart_1_cloud_token = "${var.member_name}" == "${var.prefix}-member-a" ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + name = var.member_name + zoneConfig = var.zone + region = var.region + }) +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/cluster-member/output.tf b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/output.tf new file mode 100644 index 00000000..ab8ad2dc --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/output.tf @@ -0,0 +1,6 @@ +output "cluster_member_name" { + value = google_compute_instance.cluster_member.name +} +output "cluster_member_ip_address" { + value = google_compute_address.member_ip_address.address +} diff --git a/deprecated/terraform/gcp/R8040-R81/common/cluster-member/variables.tf b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/variables.tf new file mode 100644 index 00000000..51b0e1d9 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/cluster-member/variables.tf @@ -0,0 +1,174 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "member_name" { + type = string +} +variable "region" { + type = string + default = "us-central1" +} +variable "zone" { + type = string + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "cluster_network" { + type = list(string) + description = "Cluster external network ID in the chosen zone." +} +variable "cluster_network_subnetwork" { + type = list(string) + description = "Cluster subnet ID in the chosen network." +} +variable "mgmt_network" { + type = list(string) + description = "Management network ID in the chosen zone." +} +variable "mgmt_network_subnetwork" { + type = list(string) + description = "Management subnet ID in the chosen network." +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." +} +variable "generated_admin_password" { + type = string + description = "administrator password" +} +variable "primary_cluster_address_name" { + type = string +} +variable "secondary_cluster_address_name" { + type = string +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/main.tf b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/main.tf new file mode 100644 index 00000000..9f440b4a --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/main.tf @@ -0,0 +1,10 @@ +resource "google_compute_firewall" "firewall_rules" { + name = var.rule_name + network = var.network[0] + allow { + protocol = var.protocol + } + source_ranges = var.source_ranges + target_tags = [ + "checkpoint-gateway"] +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/output.tf b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/output.tf new file mode 100644 index 00000000..e6088959 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/output.tf @@ -0,0 +1,3 @@ +output "firewall_rule_name" { + value = google_compute_firewall.firewall_rules.name +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/variables.tf b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/variables.tf new file mode 100644 index 00000000..39ac095b --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/firewall-rule/variables.tf @@ -0,0 +1,17 @@ +variable "protocol" { + type = string + description = "The IP protocol to which this rule applies." +} +variable "source_ranges" { + type = list(string) + description = "(Optional) Source IP ranges for the protocol traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable this protocol traffic." + default = [] +} +variable "rule_name" { + type = string + description = "Firewall rule name." +} +variable "network" { + type = list(string) + description = "The name or self_link of the network to attach this firewall to." +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/members-a-b/main.tf b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/main.tf new file mode 100644 index 00000000..d40ae6d1 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/main.tf @@ -0,0 +1,85 @@ +module "member_a" { + source = "../cluster-member" + + prefix = var.prefix + member_name = "${var.prefix}-member-a" + region = var.region + zone = var.zoneA + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = var.image_name + cluster_network = var.cluster_network + cluster_network_subnetwork = var.cluster_network_subnetwork + mgmt_network = var.mgmt_network + mgmt_network_subnetwork = var.mgmt_network_subnetwork + num_internal_networks = var.num_internal_networks + internal_network1_network = var.internal_network1_network + internal_network1_subnetwork = var.internal_network1_subnetwork + internal_network2_network = var.internal_network2_network + internal_network2_subnetwork = var.internal_network2_subnetwork + internal_network3_network = var.internal_network3_network + internal_network3_subnetwork = var.internal_network3_subnetwork + internal_network4_network = var.internal_network4_network + internal_network4_subnetwork = var.internal_network4_subnetwork + internal_network5_network = var.internal_network5_network + internal_network5_subnetwork = var.internal_network5_subnetwork + internal_network6_network = var.internal_network6_network + internal_network6_subnetwork = var.internal_network6_subnetwork + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generated_admin_password + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} + +module "member_b" { + source = "../cluster-member" + + prefix = var.prefix + member_name = "${var.prefix}-member-b" + region = var.region + zone = var.zoneB + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = var.image_name + cluster_network = var.cluster_network + cluster_network_subnetwork = var.cluster_network_subnetwork + mgmt_network = var.mgmt_network + mgmt_network_subnetwork = var.mgmt_network_subnetwork + num_internal_networks = var.num_internal_networks + internal_network1_network = var.internal_network1_network + internal_network1_subnetwork = var.internal_network1_subnetwork + internal_network2_network = var.internal_network2_network + internal_network2_subnetwork = var.internal_network2_subnetwork + internal_network3_network = var.internal_network3_network + internal_network3_subnetwork = var.internal_network3_subnetwork + internal_network4_network = var.internal_network4_network + internal_network4_subnetwork = var.internal_network4_subnetwork + internal_network5_network = var.internal_network5_network + internal_network5_subnetwork = var.internal_network5_subnetwork + internal_network6_network = var.internal_network6_network + internal_network6_subnetwork = var.internal_network6_subnetwork + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generated_admin_password + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} diff --git a/deprecated/terraform/gcp/R8040-R81/common/members-a-b/output.tf b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/output.tf new file mode 100644 index 00000000..2398e6f3 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/output.tf @@ -0,0 +1,13 @@ +output "member_a_name" { + value = module.member_a.cluster_member_name +} +output "member_a_external_ip" { + value = module.member_a.cluster_member_ip_address +} + +output "member_b_name" { + value = module.member_b.cluster_member_name +} +output "member_b_external_ip" { + value = module.member_b.cluster_member_ip_address +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/members-a-b/variables.tf b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/variables.tf new file mode 100644 index 00000000..4a5b6e04 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/members-a-b/variables.tf @@ -0,0 +1,175 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "region" { + type = string + default = "us-central1" +} +variable "zoneA" { + type = string + default = "us-central1-a" +} +variable "zoneB" { + type = string + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "cluster_network" { + type = list(string) + description = "Cluster external network ID in the chosen zone." +} +variable "cluster_network_subnetwork" { + type = list(string) + description = "Cluster subnet ID in the chosen network." +} +variable "mgmt_network" { + type = list(string) + description = "Management network ID in the chosen zone." +} +variable "mgmt_network_subnetwork" { + type = list(string) + description = "Management subnet ID in the chosen network." +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." +} +variable "generated_admin_password" { + type = string + description = "administrator password" +} +variable "primary_cluster_address_name" { + type = string +} +variable "secondary_cluster_address_name" { + type = string +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/main.tf b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/main.tf new file mode 100644 index 00000000..7665da7c --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/main.tf @@ -0,0 +1,21 @@ +locals { + create_network_condition = var.network_cidr == "" ? false : true +} + +resource "google_compute_network" "network" { + count = local.create_network_condition ? 1 : 0 + name = "${var.prefix}-${var.type}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "subnetwork" { + count = local.create_network_condition ? 1 : 0 + name = "${var.prefix}-${var.type}-subnet" + ip_cidr_range = var.network_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.network[count.index].id +} +data "google_compute_network" "network_name" { + count = local.create_network_condition ? 0 : 1 + name = var.network_name +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/output.tf b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/output.tf new file mode 100644 index 00000000..862f84e4 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/output.tf @@ -0,0 +1,18 @@ +output "new_created_network_link" { + value = google_compute_network.network[*].self_link +} +output "new_created_subnet_link" { + value = google_compute_subnetwork.subnetwork[*].self_link +} +output "existing_network_link" { + value = data.google_compute_network.network_name[*].self_link +} +output "new_created_network_name" { + value = google_compute_network.network[*].name +} +output "new_created_subnet_name" { + value = google_compute_subnetwork.subnetwork[*].name +} +output "existing_network_name" { + value = data.google_compute_network.network_name[*].name +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/variables.tf b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/variables.tf new file mode 100644 index 00000000..333d4f35 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/network-and-subnet/variables.tf @@ -0,0 +1,27 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "type" { + type = string +} +variable "network_cidr" { + type = string + description = "External subnet CIDR. If the variable's value is not empty double quotes, a new network will be created." + default = "10.0.0.0/24" +} +variable "private_ip_google_access" { + type = bool + description = "When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access." + default = true +} +variable "region" { + type = string + default = "us-central1" +} +variable "network_name" { + type = string + description = "External network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.network_cidr, this network name will not be used." + default = "" +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/common/startup-script.sh b/deprecated/terraform/gcp/R8040-R81/common/startup-script.sh new file mode 100644 index 00000000..196a04e3 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/common/startup-script.sh @@ -0,0 +1,3 @@ +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py generatePassword=\"${generatePassword}\" allowUploadDownload=\"${allowUploadDownload}\" templateName=\"${templateName}\" templateVersion=\"${templateVersion}\" mgmtNIC="X${mgmtNIC}X" hasInternet=\"${hasInternet}\" config_url=\"${config_url}\" config_path=\"${config_path}\" installationType="X${installationType}X" enableMonitoring=\"${enableMonitoring}\" shell=\"${shell}\" computed_sic_key=\"${computed_sic_key}\" sicKey=\"${sicKey}\" managementGUIClientNetwork=\"${managementGUIClientNetwork}\" primary_cluster_address_name=\"${primary_cluster_address_name}\" secondary_cluster_address_name=\"${secondary_cluster_address_name}\" managementNetwork=\"${managementNetwork}\" numAdditionalNICs=\"${numAdditionalNICs}\" smart1CloudToken="X${smart_1_cloud_token}X" name=\"${name}\" zone=\"${zoneConfig}\" region=\"${region}\"' \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/README.md b/deprecated/terraform/gcp/R8040-R81/high-availability/README.md new file mode 100644 index 00000000..03e9d97b --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/README.md @@ -0,0 +1,317 @@ +# Check Point Cluster High Availability (HA) Terraform module for GCP + +Terraform module which deploys Check Point CloudGuard IaaS High Availability solution on GCP. + +These types of Terraform resources are supported: +* [Network](https://www.terraform.io/docs/providers/google/d/compute_network.html) - conditional creation +* [Subnetwork](https://www.terraform.io/docs/providers/google/r/compute_subnetwork.html) - conditional creation +* [Instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) +* [IP address](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_address) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + + +For additional information, +please see the [CloudGuard Network for GCP High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_HA_Cluster/Default.htm) + +This solution uses the following modules: +- \gcp\common\network-and-subnet +- \gcp\common\firewall-rule +- \gcp\common\cluster-member +- \gcp\common\members-a-b + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.create + compute.addresses.delete + compute.addresses.get + compute.addresses.use + compute.disks.create + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setServiceAccount + compute.instances.setTags + compute.networks.create + compute.networks.delete + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.create + compute.subnetworks.delete + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/high-availability/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` + ## Usage +- Fill all variables in the /gcp/high-availability/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in high-availability/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point Deployment --- +prefix = "chkp-tf-ha" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-cluster-335-985-v20220126" + +# --- Instances Configuration --- +region = "us-central1" +zoneA = "us-central1-a" +zoneB = "us-central1-a" +machine_type = "n1-standard-4" +disk_type = "SSD Persistent Disk" +disk_size = 100 +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +enable_monitoring = false + +# --- Check Point --- +management_network = "209.87.209.100/32" +sic_key = "aaaaaaaa" +generate_password = false +allow_upload_download = false +admin_shell = "/bin/bash" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token_a = "xxxxxxxxxxxxxxxxxxxxxxxx" +smart_1_cloud_token_b = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +cluster_network_cidr = "10.0.1.0/24" +cluster_network_name = "cluster-network" +cluster_network_subnetwork_name = "cluster-subnetwork" +cluster_ICMP_traffic = ["0.0.0.0/0"] +cluster_TCP_traffic = ["0.0.0.0/0"] +cluster_UDP_traffic = [] +cluster_SCTP_traffic = [] +cluster_ESP_traffic = [] +mgmt_network_cidr = "" +mgmt_network_name = "mgmt-network" +mgmt_network_subnetwork_name = "mgmt-subnetwork" +mgmt_ICMP_traffic = [] +mgmt_TCP_traffic = [] +mgmt_UDP_traffic = [] +mgmt_SCTP_traffic = ["0.0.0.0/0"] +mgmt_ESP_traffic = ["0.0.0.0/0"] +num_internal_networks = 1 +internal_network1_cidr = "10.0.3.0/24" +internal_network1_name = "" +internal_network1_subnetwork_name = "" + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Conditional creation +
1. For each network and subnet variable, you can choose whether to create a new network with a new subnet or to use an existing one. +- If you want to create a new network and subnet, please input a subnet CIDR block for the desired new network - In this case, the network name and subnetwork name will not be used: +``` + cluster_network_cidr = "10.0.1.0/24" + cluster_network_name = "not-use" + cluster_network_subnetwork_name = "not-use" +``` +- Otherwise, if you want to use existing network and subnet, please leave empty double quotes in the CIDR variable for the desired network: +``` + cluster_network_cidr = "" + cluster_network_name = "cluster-network" + cluster_network_subnetwork_name = "cluster-subnetwork" +``` +
2. To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +
Please leave empty list for a protocol if you want to disable traffic for it. +- For cluster: +``` + cluster_ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] + cluster_TCP_traffic = ["0.0.0.0/0"] + cluster_UDP_traffic = [] + cluster_SCTP_traffic = [] + cluster_ESP_traffic = [] +``` +- For management: +``` + mgmt_ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] + mgmt_TCP_traffic = ["0.0.0.0/0"] + mgmt_UDP_traffic = [] + mgmt_SCTP_traffic = [] + mgmt_ESP_traffic = [] +``` +
3.The cluster members will each have a network interface in each internal network and create high priority routes that will route all outgoing traffic to the cluster member that is currently active. +
Using internal networks depends on the variable num_internal_networks, by selecting a number in range 1 - 6 that represents the number of internal networks: +``` + num_internal_networks = 3 + internal_network1_cidr = "" + internal_network1_name = "internal_network1" + internal_network1_subnetwork_name = "internal_subnetwork1" + internal_network2_cidr = "10.0.4.0/24" + internal_network2_name = "" + internal_network2_subnetwork_name = "" + internal_network3_cidr = "10.0.5.0/24" + internal_network3_name = "" + internal_network3_subnetwork_name = "" +``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-ha" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py). | string | N/A | N/A | yes | +| | | | | | +| region | GCP region | string | N/A | "us-central1" | no | +| zoneA | Member A Zone. The zone determines what computing resources are available and where your data is stored and used. | string | N/A | "us-central1-a" | no | +| zoneB | Member B Zone. | string | N/A | "us-central1-a" | no | +| machine_type | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have. | string | N/A | "n1-standard-4" | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | +| | | | | | +| management_network | Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address. | string | N/A | N/A | yes | +| sic_key | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated | string | N/A | N/A | yes | +| generate_password | Automatically generate an administrator password. | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| smart_1_cloud_token_a | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| smart_1_cloud_token_b | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| cluster_network_cidr | Cluster external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | N/A | "10.0.0.0/24" | no | +| cluster_network_name | Cluster external network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.cluster_network_cidr, this network name will not be used. | string | N/A | "" | no | +| cluster_network_subnetwork_name | Cluster subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.cluster_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | +| cluster_ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| cluster_TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| cluster_UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| cluster_SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| cluster_ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| mgmt_network_cidr | Management external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The public IP used to manage each member will be translated to a private address in this external network. | string | N/A | "10.0.1.0/24" | no | +| mgmt_network_name | Management network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.mgmt_network_cidr, this network name will not be used. | string | N/A | "" | no | +| mgmt_network_subnetwork_name | Management subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.mgmt_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | +| mgmt_ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| mgmt_TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| mgmt_UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| mgmt_SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| mgmt_ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| num_internal_networks | A number in the range 1 - 6 of internal network interfaces. | number | 1 - 6 | 1 | no | +| internal_network1_cidr | 1st internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network. | string | N/A | "10.0.2.0/24" | no | +| internal_network1_name | 1st internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network1_cidr, this network name will not be used. | string | N/A | "" | no | +| internal_network1_subnetwork_name | 1st internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network1_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | + + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| cluster_new_created_network | If a new cluster network creation is selected - the cluster network name, otherwise, an empty list. | +| cluster_new_created_subnet | If a new cluster network creation is selected - the cluster subnetwork name, otherwise, an empty list. | +| mgmt_new_created_network | If a new management network creation is selected - the management network name, otherwise, an empty list. | +| mgmt_new_created_subnet | If a new management network creation is selected - the management subnetwork name, otherwise, an empty list. | +| int_network1_new_created_network | If a new internal network 1 creation is selected - the internal network 1 network name, otherwise, an empty list. | +| int_network1_new_created_subnet | If a new internal network 1 creation is selected - the internal network 1 subnetwork name, otherwise, an empty list. | +| cluster_ICMP_firewall_rule | If enable - the cluster ICMP firewall rules name, otherwise, an empty list. | +| cluster_TCP_firewall_rule | If enable - the cluster TCP firewall rules name, otherwise, an empty list. | +| cluster_UDP_firewall_rule | If enable - the cluster UDP firewall rules name, otherwise, an empty list. | +| cluster_SCTP_firewall_rule | If enable - the cluster SCTP firewall rules name, otherwise, an empty list. | +| cluster_ESP_firewall_rule | If enable - the cluster ESP firewall rules name, otherwise, an empty list. | +| mgmt_ICMP_firewall_rule | If enable - the mgmt ICMP firewall rules name, otherwise, an empty list. | +| mgmt_TCP_firewall_rule | If enable - the mgmt TCP firewall rules name, otherwise, an empty list. | +| mgmt_UDP_firewall_rule | If enable - the mgmt UDP firewall rules name, otherwise, an empty list. | +| mgmt_SCTP_firewall_rule | If enable - the mgmt SCTP firewall rules name, otherwise, an empty list. | +| mgmt_ESP_firewall_rule | If enable - the mgmt ESP firewall rules name, otherwise, an empty list. | +| cluster_ip_external_address | Primary public IP address. | +| admin_password | If enable generate_password - the administrator password, otherwise, an empty list. | +| sic_key | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. | +| member_a_name | Member A name. | +| member_a_external_ip | Member A external ip. | +| member_a_zone | Member A Zone. | +| member_b_name | Member B name. | +| member_b_external_ip | Member B external ip. | +| member_b_zone | Member B Zone. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230209 | Added Smart-1 Cloud support. | +| | | | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point Check Point CloudGuard IaaS High Availability Terraform solution on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/locals.tf b/deprecated/terraform/gcp/R8040-R81/high-availability/locals.tf new file mode 100644 index 00000000..e764ccaf --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/locals.tf @@ -0,0 +1,106 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-cluster-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + split_zoneA = split("-", var.zoneA) + split_zoneB = split("-", var.zoneB) + // will fail if the var.zoneA and var.zoneB are not at the same region: + validate_zones = index(local.split_zoneA, local.split_zoneB[0]) == local.split_zoneA[0] && index(local.split_zoneA, local.split_zoneB[1]) == local.split_zoneA[0] ? 0 : "var.zoneA and var.zoneB are not at the same region" + + regex_valid_management_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|(S1C)$" + // Will fail if var.management_network is invalid + regex_management_network = regex(local.regex_valid_management_network, var.management_network) == var.management_network ? 0 : "Variable [management_network] must be a valid address in CIDR notation or 'S1C'." + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + + // Will fail if var.cluster_network_cidr is invalid + regex_cluster_network_cidr = regex(local.regex_valid_network_cidr, var.cluster_network_cidr) == var.cluster_network_cidr ? 0 : "Variable [cluster_network_cidr] must be a valid address in CIDR notation." + // Will fail if var.mgmt_network_cidr is invalid + regex_mgmt_network_cidr = regex(local.regex_valid_network_cidr, var.mgmt_network_cidr) == var.mgmt_network_cidr ? 0 : "Variable [mgmt_network_cidr] must be a valid address in CIDR notation." + // Will fail if var.internal_network1_cidr is invalid + regex_internal_network1_cidr = regex(local.regex_valid_network_cidr, var.internal_network1_cidr) == var.internal_network1_cidr ? 0 : "Variable [internal_network1_cidr] must be a valid address in CIDR notation." + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + // Will fail if var.cluster_network_name or var.cluster_network_subnetwork_name are empty double quotes in case of use existing network. + validate_cluster_network = var.cluster_network_cidr == "" && var.cluster_network_name == "" ? index("error:", "using existing cluster network - cluster network name is missing") : 0 + validate_cluster_subnet = var.cluster_network_cidr == "" && var.cluster_network_subnetwork_name == "" ? index("error:", "using existing cluster network - cluster subnetwork name is missing") : 0 + + // Will fail if var.mgmt_network_name or var.mgmt_network_subnetwork_name are empty double quotes in case of use existing network. + validate_mgmt_network = var.mgmt_network_cidr == "" && var.mgmt_network_name == "" ? index("error:", "using existing mgmt network - mgmt network name is missing") : 0 + validate_mgmt_subnet = var.mgmt_network_cidr == "" && var.mgmt_network_subnetwork_name == "" ? index("error:", "using existing mgmt network - mgmt subnetwork name is missing") : 0 + + // Will fail if var.internal_network1_name or var.internal_network1_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network1 = var.internal_network1_cidr == "" && var.internal_network1_name == "" ? index("error:", "using existing network1 - internal network1 name is missing") : 0 + validate_internal_network1_subnet = var.internal_network1_cidr == "" && var.internal_network1_subnetwork_name == "" ? ("using existing network1 - internal network1 subnet name is missing") : 0 + + // Will fail if var.internal_network2_name or var.internal_network2_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network2 = var.num_internal_networks >= 2 && var.internal_network2_cidr == "" && var.internal_network2_name == "" ? index("error:", "using existing network2 - internal network2 name is missing") : 0 + validate_internal_network2_subnet = var.num_internal_networks >= 2 && var.internal_network2_cidr == "" && var.internal_network2_subnetwork_name == "" ? index("error:", "using existing network2 - internal network2 subnet name is missing") : 0 + + // Will fail if var.internal_network3_name or var.internal_network3_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network3 = var.num_internal_networks >= 3 && var.internal_network3_cidr == "" && var.internal_network3_name == "" ? index("error:", "using existing network3 - internal network3 name is missing") : 0 + validate_internal_network3_subnet = var.num_internal_networks >= 3 && var.internal_network3_cidr == "" && var.internal_network3_subnetwork_name == "" ? index("error:", "using existing network3 - internal network3 subnet name is missing") : 0 + + // Will fail if var.internal_network4_name or var.internal_network4_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network4 = var.num_internal_networks >= 4 && var.internal_network4_cidr == "" && var.internal_network4_name == "" ? index("error:", "using existing network4 - internal network4 name is missing") : 0 + validate_internal_network4_subnet = var.num_internal_networks >= 4 && var.internal_network4_cidr == "" && var.internal_network4_subnetwork_name == "" ? index("error:", "using existing network4 - internal network4 subnet name is missing") : 0 + + // Will fail if var.internal_network5_name or var.internal_network5_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network5 = var.num_internal_networks >= 5 && var.internal_network5_cidr == "" && var.internal_network5_name == "" ? index("error:", "using existing network5 - internal network5 name is missing") : 0 + validate_internal_network5_subnet = var.num_internal_networks >= 5 && var.internal_network5_cidr == "" && var.internal_network5_subnetwork_name == "" ? index("error:", "using existing network5 - internal network5 subnet name is missing") : 0 + + // Will fail if var.internal_network6_name or var.internal_network6_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network6 = var.num_internal_networks >= 6 && var.internal_network6_cidr == "" && var.internal_network6_name == "" ? index("error:", "using existing network6 - internal network6 name is missing") : 0 + validate_internal_network6_subnet = var.num_internal_networks >= 6 && var.internal_network6_cidr == "" && var.internal_network6_subnetwork_name == "" ? index("error:", "using existing network6 - internal network6 subnet name is missing") : 0 + + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + regex_valid_sic_key = "^([a-z0-9A-Z]{8,30})$" + // Will fail if var.sic_key is invalid + regex_sic_key = regex(local.regex_valid_sic_key, var.sic_key) == var.sic_key ? 0 : "Variable [sic_key] must be at least 8 alpha numeric characters." + + + + + create_cluster_network_condition = var.cluster_network_cidr == "" ? false : true + create_mgmt_network_condition = var.mgmt_network_cidr == "" ? false : true + create_internal_network1_condition = var.internal_network1_cidr == "" ? false : true + create_internal_network2_condition = var.internal_network2_cidr == "" && var.num_internal_networks >= 2 ? false : true + create_internal_network3_condition = var.internal_network3_cidr == "" && var.num_internal_networks >= 3 ? false : true + create_internal_network4_condition = var.internal_network4_cidr == "" && var.num_internal_networks >= 4 ? false : true + create_internal_network5_condition = var.internal_network5_cidr == "" && var.num_internal_networks >= 5 ? false : true + create_internal_network6_condition = var.internal_network6_cidr == "" && var.num_internal_networks == 6 ? false : true + cluster_ICMP_traffic_condition = length(var.cluster_ICMP_traffic) == 0 ? 0 : 1 + cluster_TCP_traffic_condition = length(var.cluster_TCP_traffic) == 0 ? 0 : 1 + cluster_UDP_traffic_condition = length(var.cluster_UDP_traffic) == 0 ? 0 : 1 + cluster_SCTP_traffic_condition = length(var.cluster_SCTP_traffic) == 0 ? 0 : 1 + cluster_ESP_traffic_condition = length(var.cluster_ESP_traffic) == 0 ? 0 : 1 + mgmt_ICMP_traffic_condition = length(var.mgmt_ICMP_traffic) == 0 ? 0 : 1 + mgmt_TCP_traffic_condition = length(var.mgmt_TCP_traffic) == 0 ? 0 : 1 + mgmt_UDP_traffic_condition = length(var.mgmt_UDP_traffic) == 0 ? 0 : 1 + mgmt_SCTP_traffic_condition = length(var.mgmt_SCTP_traffic) == 0 ? 0 : 1 + mgmt_ESP_traffic_condition = length(var.mgmt_ESP_traffic) == 0 ? 0 : 1 +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/main.tf b/deprecated/terraform/gcp/R8040-R81/high-availability/main.tf new file mode 100644 index 00000000..821d3542 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/main.tf @@ -0,0 +1,250 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} + +module "cluster_network_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "cluster" + network_cidr = var.cluster_network_cidr + private_ip_google_access = true + region = var.region + network_name = var.cluster_network_name +} +module "cluster_ICMP_firewall_rules" { + count = local.cluster_ICMP_traffic_condition + source = "../common/firewall-rule" + + protocol = "icmp" + source_ranges = var.cluster_ICMP_traffic + rule_name = "${var.prefix}-cluster-icmp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_TCP_firewall_rules" { + count = local.cluster_TCP_traffic_condition + source = "../common/firewall-rule" + + protocol = "tcp" + source_ranges = var.cluster_TCP_traffic + rule_name = "${var.prefix}-cluster-tcp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_UDP_firewall_rules" { + count = local.cluster_UDP_traffic_condition + source = "../common/firewall-rule" + + protocol = "udp" + source_ranges = var.cluster_UDP_traffic + rule_name = "${var.prefix}-cluster-udp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_SCTP_firewall_rules" { + count = local.cluster_SCTP_traffic_condition + source = "../common/firewall-rule" + + protocol = "sctp" + source_ranges = var.cluster_SCTP_traffic + rule_name = "${var.prefix}-cluster-sctp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_ESP_firewall_rules" { + count = local.cluster_ESP_traffic_condition + source = "../common/firewall-rule" + + protocol = "esp" + source_ranges = var.cluster_ESP_traffic + rule_name = "${var.prefix}-cluster-esp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} + +module "mgmt_network_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "mgmt" + network_cidr = var.mgmt_network_cidr + private_ip_google_access = false + region = var.region + network_name = var.mgmt_network_name +} +module "mgmt_ICMP_firewall_rules" { + count = local.mgmt_ICMP_traffic_condition + source = "../common/firewall-rule" + + protocol = "icmp" + source_ranges = var.mgmt_ICMP_traffic + rule_name = "${var.prefix}-mgmt-icmp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_TCP_firewall_rules" { + count = local.mgmt_TCP_traffic_condition + source = "../common/firewall-rule" + + protocol = "tcp" + source_ranges = var.mgmt_TCP_traffic + rule_name = "${var.prefix}-mgmt-tcp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_UDP_firewall_rules" { + count = local.mgmt_UDP_traffic_condition + source = "../common/firewall-rule" + + protocol = "udp" + source_ranges = var.mgmt_UDP_traffic + rule_name = "${var.prefix}-mgmt-udp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_SCTP_firewall_rules" { + count = local.mgmt_SCTP_traffic_condition + source = "../common/firewall-rule" + + protocol = "sctp" + source_ranges = var.mgmt_SCTP_traffic + rule_name = "${var.prefix}-mgmt-sctp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_ESP_firewall_rules" { + count = local.mgmt_ESP_traffic_condition + source = "../common/firewall-rule" + + protocol = "esp" + source_ranges = var.mgmt_ESP_traffic + rule_name = "${var.prefix}-mgmt-esp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} + +module "internal_network1_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network1" + network_cidr = var.internal_network1_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network1_name +} + +module "internal_network2_and_subnet" { + count = var.num_internal_networks < 2 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network2" + network_cidr = var.internal_network2_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network2_name +} + +module "internal_network3_and_subnet" { + count = var.num_internal_networks < 3 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network3" + network_cidr = var.internal_network3_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network3_name +} + +module "internal_network4_and_subnet" { + count = var.num_internal_networks < 4 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network4" + network_cidr = var.internal_network4_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network4_name +} + +module "internal_network5_and_subnet" { + count = var.num_internal_networks < 5 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network5" + network_cidr = var.internal_network5_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network5_name +} + +module "internal_network6_and_subnet" { + count = var.num_internal_networks < 6 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network6" + network_cidr = var.internal_network6_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network6_name +} +resource "google_compute_address" "primary_cluster_ip_ext_address" { + name = "${var.prefix}-primary-cluster-address-${random_string.random_string.result}" + region = var.region +} +resource "google_compute_address" "secondary_cluster_ip_ext_address" { + name = "${var.prefix}-secondary-cluster-address-${random_string.random_string.result}" + region = var.region +} +resource "random_string" "generated_password" { + length = 12 + special = false +} + +module "members_a_b" { + source = "../common/members-a-b" + + prefix = "${var.prefix}-${random_string.random_string.result}" + region = var.region + zoneA = var.zoneA + zoneB = var.zoneB + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = "checkpoint-public/${var.image_name}" + cluster_network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link + cluster_network_subnetwork = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_subnet_link : [var.cluster_network_subnetwork_name] + mgmt_network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link + mgmt_network_subnetwork = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_subnet_link : [var.mgmt_network_subnetwork_name] + num_internal_networks = var.num_internal_networks + internal_network1_network = local.create_internal_network1_condition ? module.internal_network1_and_subnet.new_created_network_link : [var.internal_network1_name] + internal_network1_subnetwork = local.create_internal_network1_condition ? module.internal_network1_and_subnet.new_created_subnet_link : [var.internal_network1_subnetwork_name] + internal_network2_network = var.num_internal_networks < 2 ? [] : local.create_internal_network2_condition ? module.internal_network2_and_subnet[0].new_created_network_link : [var.internal_network2_name] + internal_network2_subnetwork = var.num_internal_networks < 2 ? [] : local.create_internal_network2_condition ? module.internal_network2_and_subnet[0].new_created_subnet_link : [var.internal_network2_subnetwork_name] + internal_network3_network = var.num_internal_networks < 3 ? [] : local.create_internal_network3_condition ? module.internal_network3_and_subnet[0].new_created_network_link : [var.internal_network3_name] + internal_network3_subnetwork = var.num_internal_networks < 3 ? [] : local.create_internal_network3_condition ? module.internal_network3_and_subnet[0].new_created_subnet_link : [var.internal_network3_subnetwork_name] + internal_network4_network = var.num_internal_networks < 4 ? [] : local.create_internal_network4_condition ? module.internal_network4_and_subnet[0].new_created_network_link : [var.internal_network4_name] + internal_network4_subnetwork = var.num_internal_networks < 4 ? [] : local.create_internal_network4_condition ? module.internal_network4_and_subnet[0].new_created_subnet_link : [var.internal_network4_subnetwork_name] + internal_network5_network = var.num_internal_networks < 5 ? [] : local.create_internal_network5_condition ? module.internal_network5_and_subnet[0].new_created_network_link : [var.internal_network5_name] + internal_network5_subnetwork = var.num_internal_networks < 5 ? [] : local.create_internal_network5_condition ? module.internal_network5_and_subnet[0].new_created_subnet_link : [var.internal_network5_subnetwork_name] + internal_network6_network = var.num_internal_networks < 6 ? [] : local.create_internal_network6_condition ? module.internal_network6_and_subnet[0].new_created_network_link : [var.internal_network6_name] + internal_network6_subnetwork = var.num_internal_networks < 6 ? [] : local.create_internal_network6_condition ? module.internal_network6_and_subnet[0].new_created_subnet_link : [var.internal_network6_subnetwork_name] + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generate_password ? random_string.generated_password.result : "" + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = google_compute_address.primary_cluster_ip_ext_address.name + secondary_cluster_address_name = google_compute_address.secondary_cluster_ip_ext_address.name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/output.tf b/deprecated/terraform/gcp/R8040-R81/high-availability/output.tf new file mode 100644 index 00000000..12009d32 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/output.tf @@ -0,0 +1,117 @@ +output "cluster_new_created_network" { + value = module.cluster_network_and_subnet.new_created_network_name +} +output "cluster_new_created_subnet" { + value = module.cluster_network_and_subnet.new_created_subnet_name +} + +output "mgmt_new_created_network" { + value = module.mgmt_network_and_subnet.new_created_network_name +} +output "mgmt_new_created_subnet" { + value = module.mgmt_network_and_subnet.new_created_subnet_name +} + +output "int_network1_new_created_network" { + value = module.internal_network1_and_subnet.new_created_network_name +} +output "int_network1_new_created_subnet" { + value = module.internal_network1_and_subnet.new_created_subnet_name +} + +output "int_network2_new_created_network" { + value = module.internal_network2_and_subnet[*].new_created_network_name +} +output "int_network2_new_created_subnet" { + value = module.internal_network2_and_subnet[*].new_created_subnet_name +} + +output "int_network3_new_created_network" { + value = module.internal_network3_and_subnet[*].new_created_network_name +} +output "int_network3_new_created_subnet" { + value = module.internal_network3_and_subnet[*].new_created_subnet_name +} + +output "int_network4_new_created_network" { + value = module.internal_network4_and_subnet[*].new_created_network_name +} +output "int_network4_new_created_subnet" { + value = module.internal_network4_and_subnet[*].new_created_subnet_name +} + +output "int_network5_new_created_network" { + value = module.internal_network5_and_subnet[*].new_created_network_name +} +output "int_network5_new_created_subnet" { + value = module.internal_network5_and_subnet[*].new_created_subnet_name +} + +output "int_network6_new_created_network" { + value = module.internal_network6_and_subnet[*].new_created_network_name +} +output "int_network6_new_created_subnet" { + value = module.internal_network6_and_subnet[*].new_created_subnet_name +} + +output "cluster_ICMP_firewall_rule" { + value = module.cluster_ICMP_firewall_rules[*].firewall_rule_name +} +output "cluster_TCP_firewall_rule" { + value = module.cluster_TCP_firewall_rules[*].firewall_rule_name +} +output "cluster_UDP_firewall_rule" { + value = module.cluster_UDP_firewall_rules[*].firewall_rule_name +} +output "cluster_SCTP_firewall_rule" { + value = module.cluster_SCTP_firewall_rules[*].firewall_rule_name +} +output "cluster_ESP_firewall_rule" { + value = module.cluster_ESP_firewall_rules[*].firewall_rule_name +} + +output "mgmt_ICMP_firewall_rule" { + value = module.mgmt_ICMP_firewall_rules[*].firewall_rule_name +} +output "mgmt_TCP_firewall_rule" { + value = module.mgmt_TCP_firewall_rules[*].firewall_rule_name +} +output "mgmt_UDP_firewall_rule" { + value = module.mgmt_UDP_firewall_rules[*].firewall_rule_name +} +output "mgmt_SCTP_firewall_rule" { + value = module.mgmt_SCTP_firewall_rules[*].firewall_rule_name +} +output "mgmt_ESP_firewall_rule" { + value = module.mgmt_ESP_firewall_rules[*].firewall_rule_name +} + +output "cluster_ip_external_address" { + value = google_compute_address.primary_cluster_ip_ext_address.address +} +output "admin_password" { + value = var.generate_password ? [random_string.generated_password.result] : [] +} +output "sic_key" { + value = var.sic_key +} + +output "member_a_name" { + value = module.members_a_b.member_a_name +} +output "member_a_external_ip" { + value = module.members_a_b.member_a_external_ip +} +output "member_a_zone" { + value = var.zoneA +} + +output "member_b_name" { + value = module.members_a_b.member_b_name +} +output "member_b_external_ip" { + value = module.members_a_b.member_b_external_ip +} +output "member_b_zone" { + value = var.zoneB +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/terraform.tfvars b/deprecated/terraform/gcp/R8040-R81/high-availability/terraform.tfvars new file mode 100644 index 00000000..f888479f --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/terraform.tfvars @@ -0,0 +1,53 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment --- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-ha" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-cluster-335-985-v20220126" + +# --- Instances Configuration --- +region = "PLEASE ENTER REGION" # "us-central1" +zoneA = "PLEASE ENTER ZONE A" # "us-central1-a" +zoneB = "PLEASE ENTER ZONE B" # "us-central1-a" +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +enable_monitoring = "PLEASE ENTER true OR false" # false + +# --- Check Point --- +management_network = "PLEASE ENTER MANAGEMENT IP OR S1C IF USING SMART-1 CLOUD MANAGEMENT" # "209.87.209.100/32" +sic_key = "PLEASE ENTER A SIC KEY" # "aaaaaaaa" +generate_password = "PLEASE ENTER true or false" # false +allow_upload_download = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking --- +cluster_network_cidr = "PLEASE ENTER CLUSTER NETWORK CIDR" # "10.0.1.0/24" +cluster_network_name = "PLEASE ENTER CLUSTER NETWORK ID" # "cluster-network" +cluster_network_subnetwork_name = "PLEASE ENTER CLUSTER SUBNETWORK ID" # "cluster-subnetwork" +cluster_ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +cluster_TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +cluster_UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +cluster_SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +cluster_ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] +mgmt_network_cidr = "PLEASE ENTER MANAGEMENT NETWORK CIDR" # "" +mgmt_network_name = "PLEASE ENTER MANAGEMENT NETWORK ID" # "mgmt-network" +mgmt_network_subnetwork_name = "PLEASE ENTER MANAGEMENT SUBNETWORK ID" # "mgmt-subnetwork" +mgmt_ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +mgmt_TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +mgmt_UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +mgmt_SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +mgmt_ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] +num_internal_networks = "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" # 1 +internal_network1_cidr = "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" # "10.0.3.0/24" +internal_network1_name = "PLEASE ENTER 1ST INTERNAL NETWORK ID" # "" +internal_network1_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK ID" # "" + +#Define internal NICs networks and subnetworks according the defined num_internal_networks value diff --git a/deprecated/terraform/gcp/R8040-R81/high-availability/variables.tf b/deprecated/terraform/gcp/R8040-R81/high-availability/variables.tf new file mode 100644 index 00000000..a7bede31 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/high-availability/variables.tf @@ -0,0 +1,302 @@ +# Check Point CloudGuard IaaS High Availability - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point Deployment --- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} + +# --- Instances Configuration --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} +variable "zoneA" { + type = string + description = "Member A Zone. The zone determines what computing resources are available and where your data is stored and used." + default = "us-central1-a" +} +variable "zoneB" { + type = string + description = "Member B Zone." + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} + +# --- Check Point --- +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." + validation { + condition = var.management_network != "0.0.0.0/0" + error_message = "Var.management_network value cannot be the zero-address." + } +} +resource "null_resource" "validate_mgmt_network_if_required" { + count = var.smart_1_cloud_token_a == "" && var.management_network == "S1C" ? "Public address of the Security Management Server is required" : 0 +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +# --- Quick connect to Smart-1 Cloud --- +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} + +resource "null_resource" "validate_both_tokens" { + count = (var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_b != "") || (var.smart_1_cloud_token_a == "" && var.smart_1_cloud_token_b == "") ? 0 : "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" +} +resource "null_resource" "validate_different_tokens" { + count = var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_a == var.smart_1_cloud_token_b ? "To connect to Smart-1 Cloud, you must provide two different tokens" : 0 +} +# --- Networking --- +variable "cluster_network_cidr" { + type = string + description = "Cluster external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The Cluster public IP will be translated to a private address assigned to the active member in this external network." + default = "10.0.0.0/24" +} +variable "cluster_network_name" { + type = string + description = "Cluster external network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.cluster_network_cidr, this network name will not be used." + default = "" +} +variable "cluster_network_subnetwork_name" { + type = string + description = "Cluster subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.cluster_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "cluster_ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "cluster_TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable TCP traffic." + default = [] +} +variable "cluster_UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable UDP traffic." + default = [] +} +variable "cluster_SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "cluster_ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ESP traffic." + default = [] +} +variable "mgmt_network_cidr" { + type = string + description = "Management external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The public IP used to manage each member will be translated to a private address in this external network" + default = "10.0.1.0/24" +} +variable "mgmt_network_name" { + type = string + description = "Management network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.mgmt_network_cidr, this network name will not be used. " + default = "" +} +variable "mgmt_network_subnetwork_name" { + type = string + description = "Management subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.mgmt_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "mgmt_ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "mgmt_TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic." + default = [] +} +variable "mgmt_UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable UDP traffic." + default = [] +} +variable "mgmt_SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "mgmt_ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ESP traffic." + default = [] +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +resource "null_resource" "num_internal_networks_validation" { + // Will fail if var.num_internal_networks is less than 1 or more than 6 + count = var.num_internal_networks >= 1 && var.num_internal_networks <= 6 ? 0 : "variable num_internal_networks must be a number between 1 and 6. Multiple network interfaces deployment is described in: https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637" +} +variable "internal_network1_cidr" { + type = string + description = "1st internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "10.0.2.0/24" +} +variable "internal_network1_name" { + type = string + description = "1st internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network1_cidr, this network name will not be used. " + default = "" +} +variable "internal_network1_subnetwork_name" { + type = string + description = "1st internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network1_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network2_cidr" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network2_name" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network2_cidr, this network name will not be used. " + default = "" +} +variable "internal_network2_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network2_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network3_cidr" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network3_name" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network3_cidr, this network name will not be used. " + default = "" +} +variable "internal_network3_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network3_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network4_cidr" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network4_name" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network4_cidr, this network name will not be used. " + default = "" +} +variable "internal_network4_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network4_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network5_cidr" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network5_name" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network5_cidr, this network name will not be used. " + default = "" +} +variable "internal_network5_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network5_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network6_cidr" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network6_name" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network6_cidr, this network name will not be used. " + default = "" +} +variable "internal_network6_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network6_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/README.md b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/README.md new file mode 100644 index 00000000..a3213acb --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/README.md @@ -0,0 +1,275 @@ +# Check Point single gateway and management Terraform module for GCP + +Terraform module which deploys a single gateway and management of Check Point Security Gateways. + +These types of Terraform resources are supported: + [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) + [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) + [Compute instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) + + +See Check Point's documentation for Single [here](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk114577) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The main.tf file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.get + compute.addresses.use + compute.addresses.create + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.images.getFromFamily + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.addAccessConfig + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setTags + compute.instances.setLabels + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + iam.serviceAccounts.set + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/single/terraform.tfvars file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/single/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in single/terraform.tfvars file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +image_name = "check-point-r8110-gw-byol-single-335-985-v20220126" +installationType = "Gateway only" +license = "BYOL" +prefix = "chkp-single-tf-" +management_nic = "Ephemeral Public IP (eth0)" +admin_shell = "/etc/cli.sh" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = false +allow_upload_download = true +sicKey = "" +managementGUIClientNetwork = "0.0.0.0/0" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +zone = "us-central1-a +network = ["default"] +subnetwork = ["default"] +network_enableTcp= true +network_tcpSourceRanges= ["0.0.0.0/0"] +network_enableGwNetwork= false +network_gwNetworkSourceRanges= [""] +network_enableIcmp= false +network_icmpSourceRanges = [""] +network_enableUdp= false +network_udpSourceRanges= [""] +network_enableSctp= false +network_sctpSourceRanges= [""] +network_enableEsp= false +network_espSourceRanges= [""] +numAdditionalNICs= 1 +externalIP= "static" +internal_network1_network= [""] +internal_network1_subnetwork = [""] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +diskType = "SSD Persistent Disk" +bootDiskSizeGb = 100 +enableMonitoring = false + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = ["0.0.0.0/0"] +SCTP_traffic = ["0.0.0.0/0"] +ESP_traffic = ["0.0.0.0/0"] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values |Default| Required | +| ------------- | ------------- | ------------- | ------------- |-------|---------------| +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| | | | | | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| zone | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) |us-central1-a|yes| +| | | | | | +| image_name |The single gateway or management image name (e.g. check-point-r8110-gw-byol-single-335-985-v20220126 for gateway or check-point-r8110-byol-335-883-v20210706 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| | | | | | +| installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| +| | | | | | +| license | Checkpoint license (BYOL or PAYG).|string|BYOL;
PAYG;|BYOL|yes| +| | | | | | +| prefix | (Optional) Resources name prefix|string|N\A|chkp-single-tf-|no| +| | | | | | +| machineType | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | n1-standard-4|no| +| | | | | | +| network | The network determines what network traffic the instance can access | list(string) | Available network in the chosen zone |N/A|yes| +| | | | | | +| Subnetwork | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network |N/A|yes| +| | | | | | +| network_enableTcp | Allow TCP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_tcpSourceRanges | Allow TCP traffic from the Internet | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableGwNetwork | This is relevant for Management only. The network in which managed gateways reside | boolean | true;
false; |false|no| +| | | | | | +| network_gwNetworkSourceRanges | Allow TCP traffic from the Internet | list(string) | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) |N/A|no| +| | | | | | +| network_enableIcmp | Allow ICMP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_icmpSourceRanges | Source IP ranges for ICMP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableUdp | Allow UDP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_udpSourceRanges | Source IP ranges for UDP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableSctp | Allow SCTP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_sctpSourceRanges | Source IP ranges for SCTP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableEsp | Allow ESP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_espSourceRanges | Source IP ranges for ESP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| diskType | Disk type | string | SSD Persistent Disk;
standard-Persistent Disk;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)|SSD Persistent Disk|no| +| | | | | | +| bootDiskSizeGb | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)|100|no| +| | | | | | +| generatePassword | Automatically generate an administrator password | boolean | true;
false; |false|no| +| | | | | | +| allowUploadDownload | Allow download from/upload to Check Point | boolean | true;
false; |false|no| +| | | | | | +| enableMonitoring | Enable Stackdriver monitoring | boolean | true;
false; |false|no| +| | | | | | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
|/etc/cli.sh|no| +| | | | | | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| | | | | | +| sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| +| | | | | | +| managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| +| | | | | | +| smart_1_cloud_token | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| numAdditionalNICs | Number of additional network interfaces | number | A number in the range 0 - 8.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) |0|no| +| | | | | | +| externalIP | External IP address type | string | Static;
Ephemeral;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) |static|no| +| | | | | | +| management_nic | Management Interface - Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) |XEphemeral Public IP (eth0)|no| +| | | | | | + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230209 | Added Smart-1 Cloud support. | +| | | | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point Check Point CloudGuard IaaS High Availability Terraform solution on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/locals.tf b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/locals.tf new file mode 100644 index 00000000..39527714 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/locals.tf @@ -0,0 +1,55 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + installation_type_allowed_values = [ + "Gateway only", + "Management only", + "Standalone", + "Manual Configuration" + ] + // 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 alphanumeric 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 + validate_image_name = var.installationType != "Gateway only" && length(regexall(local.regex_validate_mgmt_image_name, var.image_name)) > 0 ? 0 : (var.installationType == "Gateway only" && length(regexall(local.regex_validate_single_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME")) + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.diskType) + adminPasswordSourceMetadata = var.generatePassword ?random_string.generated_password.result : "" + disk_type_condition = var.diskType == "SSD Persistent Disk" ? "pd-ssd" : var.diskType == "Balanced Persistent Disk" ? "pd-balanced" : var.diskType == "Standard Persistent Disk" ? "pd-standard" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false + ICMP_traffic_condition = length(var.network_icmpSourceRanges ) == 0 ? 0 : 1 + TCP_traffic_condition = length(var.network_tcpSourceRanges) == 0 ? 0 : 1 + UDP_traffic_condition = length(var.network_udpSourceRanges ) == 0 ? 0 : 1 + SCTP_traffic_condition = length(var.network_sctpSourceRanges) == 0 ? 0 : 1 + ESP_traffic_condition = length(var.network_espSourceRanges) == 0 ? 0 : 1 + // Will fail if management_only and payg + is_management_only = var.installationType == "Management only" + is_license_payg = var.license == "PAYG" + validation_message = "Cannot use 'Management only' installation type with 'PAYG' license." + _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_message : "") + +} diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/main.tf b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/main.tf new file mode 100644 index 00000000..aeab8b93 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/main.tf @@ -0,0 +1,218 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + zone = var.zone +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +data "google_compute_network" "external_network" { + name = var.network[0] +} +resource "random_string" "random_sic_key" { + length = 12 + special = false +} + +resource "google_compute_firewall" "ICMP_firewall_rules" { + count = local.ICMP_traffic_condition + name = "${var.prefix}-icmp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "icmp" + } + source_ranges = var.network_icmpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "TCP_firewall_rules" { + count = local.TCP_traffic_condition + name = "${var.prefix}-tcp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "tcp" + } + source_ranges = var.network_tcpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "UDP_firewall_rules" { + count = local.UDP_traffic_condition + name = "${var.prefix}-udp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "udp" + } + source_ranges = var.network_udpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "random_string" "generated_password" { + length = 12 + special = false +} +resource "google_compute_firewall" "SCTP_firewall_rules" { + count = local.SCTP_traffic_condition + name = "${var.prefix}-sctp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "sctp" + } + source_ranges = var.network_sctpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "ESP_firewall_rules" { + count = local.ESP_traffic_condition + name = "${var.prefix}-esp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "esp" + } + source_ranges = var.network_espSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} + +resource "google_compute_instance" "gateway" { + name = "${var.prefix}-${random_string.random_string.result}" + description = "Check Point Security ${replace(var.installationType,"(Standalone)","--")==var.installationType?split(" ",var.installationType)[0]:" Gateway and Management"}" + zone = var.zone + labels = {goog-dm = "${var.prefix}-${random_string.random_string.result}"} + tags =replace(var.installationType,"(Standalone)","--")==var.installationType?[ + "checkpoint-${split(" ",lower(var.installationType))[0]}","${var.prefix}${random_string.random_string.result}" + ]:["checkpoint-gateway","checkpoint-management","${var.prefix}${random_string.random_string.result}"] + machine_type = var.machine_type + can_ip_forward = var.installationType == "Management only"? false:true + boot_disk { + auto_delete = true + device_name = "chkp-single-boot-${random_string.random_string.result}" + initialize_params { + size = var.bootDiskSizeGb + type = local.disk_type_condition + image = "checkpoint-public/${var.image_name}" + } + } + network_interface { + network = var.network[0] + subnetwork = var.subnetwork[0] + dynamic "access_config" { + for_each = var.externalIP == "None"? []:[1] + content { + nat_ip = var.externalIP=="static" ? google_compute_address.static.address : null + } + } + + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 1 ? [ + 1] : [] + content { + network = var.internal_network1_network[0] + subnetwork = var.internal_network1_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 2 ? [ + 1] : [] + content { + network = var.internal_network2_network[0] + subnetwork = var.internal_network2_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 3 ? [ + 1] : [] + content { + network = var.internal_network3_network[0] + subnetwork = var.internal_network3_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 4 ? [ + 1] : [] + content { + network = var.internal_network4_network[0] + subnetwork = var.internal_network4_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 5 ? [ + 1] : [] + content { + network = var.internal_network5_network[0] + subnetwork = var.internal_network5_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 6 ? [ + 1] : [] + content { + network = var.internal_network6_network[0] + subnetwork = var.internal_network6_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 7 ? [ + 1] : [] + content { + network = var.internal_network7_network[0] + subnetwork = var.internal_network7_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 8 ? [ + 1] : [] + content { + network = var.internal_network8_network[0] + subnetwork = var.internal_network8_subnetwork[0] + } + } + + service_account { + scopes = [ + "https://www.googleapis.com/auth/cloudruntimeconfig", + "https://www.googleapis.com/auth/monitoring.write"] + } + + metadata = local.admin_SSH_key_condition ? { + instanceSSHKey = var.admin_SSH_key + adminPasswordSourceMetadata = var.generatePassword ?random_string.generated_password.result : "" + } : {adminPasswordSourceMetadata = var.generatePassword?random_string.generated_password.result : ""} + + metadata_startup_script = templatefile("${path.module}/../common/startup-script.sh", { + // script's arguments + generatePassword = var.generatePassword + config_url = "https://runtimeconfig.googleapis.com/v1beta1/projects/${var.project}/configs/-config" + config_path = "projects/${var.project}/configs/-config" + sicKey = "" + allowUploadDownload = var.allowUploadDownload + templateName = "single_tf" + templateVersion = "20230109" + templateType = "terraform" + hasInternet = "true" + enableMonitoring = var.enableMonitoring + shell = var.admin_shell + installationType = var.installationType + computed_sic_key = var.sicKey + managementGUIClientNetwork = var.managementGUIClientNetwork + installSecurityManagement = true + primary_cluster_address_name = "" + secondary_cluster_address_name = "" + subnet_router_meta_path = "" + mgmtNIC = var.management_nic + managementNetwork = "" + numAdditionalNICs = "" + smart_1_cloud_token = var.smart_1_cloud_token + name = "" + zoneConfig = "" + region = "" + }) +} +resource "google_compute_address" "static" { + name = "ipv4-address-${random_string.random_string.result}" +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/output.tf b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/output.tf new file mode 100644 index 00000000..0f0882d0 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/output.tf @@ -0,0 +1,18 @@ +output "SIC_key" { + value = random_string.random_sic_key.result +} +output "ICMP_firewall_rules_name" { + value = google_compute_firewall.ICMP_firewall_rules[*].name +} +output "TCP_firewall_rules_name" { + value = google_compute_firewall.TCP_firewall_rules[*].name +} +output "UDP_firewall_rules_name" { + value = google_compute_firewall.UDP_firewall_rules[*].name +} +output "SCTP_firewall_rules_name" { + value = google_compute_firewall.SCTP_firewall_rules[*].name +} +output "ESP_firewall_rules_name" { + value = google_compute_firewall.ESP_firewall_rules[*].name +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/terraform.tfvars b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/terraform.tfvars new file mode 100644 index 00000000..8ac21504 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/terraform.tfvars @@ -0,0 +1,46 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE_ACCOUNT_PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment--- +image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8110-gw-byol-single-335-985-v20220126" +installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" +license = "PLEASE ENTER LICENSE" # "BYOL" +prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" +management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" +admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" +admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false +allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false +sicKey = "PLEASE ENTER SIC KEY" # "" +managementGUIClientNetwork = "PLEASE ENTER MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking--- +zone = "PLEASE ENTER ZONE" # "us-central1-a" +network = "PLEASE ENTER NETWORK" # ["default"] +subnetwork = "PLEASE ENTER SUBNETWORK" # ["default"] +network_enableTcp = "PLEASE ENTER NETWORK ENABLE TCP" # false +network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [""] +network_enableGwNetwork = "PLEASE ENTER NETWORK ENABLE GW NETWORK" # false +network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [""] +network_enableIcmp = "PLEASE ENTER NETWORK ENABLE ICMP" # false +network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [""] +network_enableUdp = "PLEASE ENTER NETWORK ENABLE UDP" # false +network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [""] +network_enableSctp = "PLEASE ENTER NETWORK ENABLE SCTP" # false +network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [""] +network_enableEsp = "PLEASE ENTER NETWORK ENABLE ESP" # false +network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [""] +numAdditionalNICs = "PLEASE ENTER NUM ADDITIONAL NICS" # 1 +externalIP = "PLEASE ENTER EXTERNAL IP" # "static" +internal_network1_network = "PLEASE ENTER INTERNAL_NETWORK1_NETWORK" # [""] +internal_network1_subnetwork = "PLEASE ENTER INTERNAL_NETWORK1_SUBNETWORK" # [""] + +# --- Instances configuration--- +machine_type = "PLEASE ENTER MACHINE_TYPE" # "n1-standard-4" +diskType = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +bootDiskSizeGb = "PLEASE ENTER BOOT DISK SIZE GB" # 100 +enableMonitoring = "PLEASE ENTER ENABLE MONITORING" # false diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/variables.tf b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/variables.tf new file mode 100644 index 00000000..0b4718bc --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-existing-vpc/variables.tf @@ -0,0 +1,254 @@ +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "zone" { + type = string + description = "The zone determines what computing resources are available and where your data is stored and used" + default = "us-central1-a" +} +variable "image_name" { + type = string + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" +} +variable "installationType" { + type = string + description = "Installation type and version" + default = "Gateway only" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-single-tf-" +} +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "network" { + type = list(string) + description = "The network determines what network traffic the instance can access" + default = ["default"] +} +variable "subnetwork" { + type = list(string) + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = ["default"] +} +variable "network_enableTcp" { + type = bool + description = "Allow TCP traffic from the Internet" + default = false +} +variable "network_tcpSourceRanges" { + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableGwNetwork" { + type = bool + description = "This is relevant for Management only. The network in which managed gateways reside" + default = false +} +variable network_gwNetworkSourceRanges{ + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableIcmp" { + type = bool + description ="Allow ICMP traffic from the Internet" + default = false +} +variable "network_icmpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable network_enableUdp{ + type = bool + description ="Allow UDP traffic from the Internet" + default = false +} +variable "network_udpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "network_enableSctp" { + type = bool + description ="Allow SCTP traffic from the Internet" + default = false +} +variable "network_sctpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} + +variable "network_enableEsp" { + type = bool + description ="Allow ESP traffic from the Internet " + default = false +} +variable "network_espSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} +variable "diskType" { + type = string + description ="Disk type" + default = "pd-ssd" +} +variable "bootDiskSizeGb" { + type = number + description ="Disk size in GB" + default = 100 +} +variable "generatePassword" { + type = bool + description ="Automatically generate an administrator password " + default = false +} +variable "management_nic" { + type = string + description = "Management Interface - Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "allowUploadDownload" { + type = string + description ="Allow download from/upload to Check Point" + default = true +} +variable "enableMonitoring" { + type = bool + description ="Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "sicKey" { + type = string + description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" + default = "" +} +variable "managementGUIClientNetwork" { + type = string + description ="Allowed GUI clients " + default = "0.0.0.0/0" +} +variable "smart_1_cloud_token" { + type = string + description ="(Optional) Smart-1 cloud token to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "numAdditionalNICs" { + type = number + description ="Number of additional network interfaces" + default = 0 +} +variable "externalIP" { + type = string + description = "External IP address type" + default = "static" +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network7_network" { + type = list(string) + description = "7th internal network ID in the chosen zone." + default = [] +} +variable "internal_network7_subnetwork" { + type = list(string) + description = "7th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network8_network" { + type = list(string) + description = "8th internal network ID in the chosen zone." + default = [] +} +variable "internal_network8_subnetwork" { + type = list(string) + description = "8th internal subnet ID in the chosen network." + default = [] +} diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/README.md b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/README.md new file mode 100644 index 00000000..857b7c75 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/README.md @@ -0,0 +1,270 @@ +# Check Point single gateway and management Terraform module for GCP + +Terraform module which deploys a single gateway and management of Check Point Security Gateways. + +These types of Terraform resources are supported: + [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) + [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) + [Compute instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) + + +See Check Point's documentation for Single [here](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk114577) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The main.tf file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.get + compute.addresses.use + compute.addresses.create + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.images.getFromFamily + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.addAccessConfig + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setTags + compute.instances.setLabels + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + iam.serviceAccounts.set + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/single/terraform.tfvars file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/single/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in single/terraform.tfvars file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +image_name = "check-point-r8120-gw-byol-single-631-991001335-v20230622" +installationType = "Gateway only" +license = "BYOL" +prefix = "chkp-single-tf-" +management_nic = "Ephemeral Public IP (eth0)" +admin_shell = "/etc/cli.sh" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = false +allow_upload_download = true +sicKey = "" +managementGUIClientNetwork = "0.0.0.0/0" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +region = "us-central1" +zone = "us-central1-a" +subnetwork_cidr = "10.0.0.0/24" +network_enableTcp= true +network_tcpSourceRanges= ["0.0.0.0/0"] +network_enableGwNetwork= false +network_gwNetworkSourceRanges= [] +network_enableIcmp= false +network_icmpSourceRanges = [] +network_enableUdp= false +network_udpSourceRanges= [] +network_enableSctp= false +network_sctpSourceRanges= [] +network_enableEsp= false +network_espSourceRanges= [] +numAdditionalNICs= 1 +externalIP= "static" +internal_subnetwork_cidr = "10.0.1.0/24" + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +diskType = "SSD Persistent Disk" +bootDiskSizeGb = 100 +enableMonitoring = false + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = ["0.0.0.0/0"] +SCTP_traffic = ["0.0.0.0/0"] +ESP_traffic = ["0.0.0.0/0"] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values |Default| Required | +| ------------- | ------------- | ------------- | ------------- |-------|---------------| +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| | | | | | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| | | | | | +| zone | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) |us-central1-a|yes| +| | | | | | +| image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| | | | | | +| installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| +| | | | | | +| license | Checkpoint license (BYOL or PAYG).|string|BYOL;
PAYG;|BYOL|yes| +| | | | | | +| prefix | (Optional) Resources name prefix|string|N\A|chkp-single-tf-|no| +| | | | | | +| machineType | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | n1-standard-4|no| +| | | | | | +| subnetwork_cidr | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| | | | | | +| network_enableTcp | Allow TCP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_tcpSourceRanges | Allow TCP traffic from the Internet | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableGwNetwork | This is relevant for Management only. The network in which managed gateways reside | boolean | true;
false; |false|no| +| | | | | | +| network_gwNetworkSourceRanges | Allow TCP traffic from the Internet | list(string) | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) |N/A|no| +| | | | | | +| network_enableIcmp | Allow ICMP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_icmpSourceRanges | Source IP ranges for ICMP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableUdp | Allow UDP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_udpSourceRanges | Source IP ranges for UDP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableSctp | Allow SCTP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_sctpSourceRanges | Source IP ranges for SCTP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableEsp | Allow ESP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_espSourceRanges | Source IP ranges for ESP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| diskType | Disk type | string | SSD Persistent Disk;
standard-Persistent Disk;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)|SSD Persistent Disk|no| +| | | | | | +| bootDiskSizeGb | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)|100|no| +| | | | | | +| generatePassword | Automatically generate an administrator password | boolean | true;
false; |false|no| +| | | | | | +| allowUploadDownload | Allow download from/upload to Check Point | boolean | true;
false; |false|no| +| | | | | | +| enableMonitoring | Enable Stackdriver monitoring | boolean | true;
false; |false|no| +| | | | | | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
|/etc/cli.sh|no| +| | | | | | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| | | | | | +| sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| +| | | | | | +| managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| +| | | | | | +| smart_1_cloud_token | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| numAdditionalNICs | Number of additional network interfaces | number | A number in the range 0 - 8.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) |0|no| +| | | | | | +| externalIP | External IP address type | string | Static;
Ephemeral;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) |static|no| +| | | | | | +| internal_subnetwork_cidr | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| | | | | | +| management_nic | Management Interface - Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) |XEphemeral Public IP (eth0)|no| +| | | | | | + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------| +| 20230921 | Added single-into-new-vpc template. | +| | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/main.tf b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/main.tf new file mode 100644 index 00000000..1597ae33 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/main.tf @@ -0,0 +1,90 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} + +resource "google_compute_network" "network" { + name = "${var.prefix}-network-${random_string.random_string.result}" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "subnetwork" { + name = "${var.prefix}-subnetwork-${random_string.random_string.result}" + ip_cidr_range = var.subnetwork_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.network.id +} + +resource "google_compute_network" "internal_network" { + name = "${var.prefix}-internal-network-${random_string.random_string.result}" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "internal_subnetwork" { + name = "${var.prefix}-internal-subnetwork-${random_string.random_string.result}" + ip_cidr_range = var.internal_subnetwork_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.internal_network.id +} + + +module "single-into-existing-vpc" { + source = "../single-into-existing-vpc" + + service_account_path = var.service_account_path + project = var.project + + + # --- Check Point Deployment--- + image_name = var.image_name + installationType = var.installationType + license = var.license + prefix = var.prefix + management_nic = var.management_nic + admin_shell = var.admin_shell + admin_SSH_key = var.admin_SSH_key + generatePassword = var.generatePassword + allowUploadDownload = var.allowUploadDownload + sicKey = var.sicKey + managementGUIClientNetwork = var.managementGUIClientNetwork + + # --- Quick connect to Smart-1 Cloud --- + smart_1_cloud_token = var.smart_1_cloud_token + + # --- Networking --- + zone = var.zone + network = [google_compute_network.network.name] + subnetwork = [google_compute_subnetwork.subnetwork.name] + network_enableTcp = var.network_enableTcp + network_tcpSourceRanges = var.network_tcpSourceRanges + network_enableGwNetwork = var.network_enableGwNetwork + network_gwNetworkSourceRanges = var.network_gwNetworkSourceRanges + network_enableIcmp = var.network_enableIcmp + network_icmpSourceRanges = var.network_icmpSourceRanges + network_enableUdp = var.network_enableUdp + network_udpSourceRanges = var.network_udpSourceRanges + network_enableSctp = var.network_enableSctp + network_sctpSourceRanges = var.network_sctpSourceRanges + network_enableEsp = var.network_enableEsp + network_espSourceRanges = var.network_espSourceRanges + numAdditionalNICs = var.numAdditionalNICs + externalIP = var.externalIP + internal_network1_network = [google_compute_network.internal_network.name] + internal_network1_subnetwork = [google_compute_subnetwork.internal_subnetwork.name] + + # --- Instances configuration--- + machine_type = var.machine_type + diskType = var.diskType + bootDiskSizeGb = var.bootDiskSizeGb + enableMonitoring = var.enableMonitoring +} \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/output.tf b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/output.tf new file mode 100644 index 00000000..f1ba99cf --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/output.tf @@ -0,0 +1,30 @@ +output "network" { + value = google_compute_network.network.name +} +output "subnetwork" { + value = google_compute_subnetwork.subnetwork.name +} +output "internal_network" { + value = google_compute_network.internal_network.name +} +output "internal_subnetwork" { + value = google_compute_subnetwork.internal_subnetwork.name +} +output "SIC_key" { + value = module.single-into-existing-vpc.SIC_key +} +output "ICMP_firewall_rules_name" { + value = module.single-into-existing-vpc.ICMP_firewall_rules_name +} +output "TCP_firewall_rules_name" { + value = module.single-into-existing-vpc.TCP_firewall_rules_name +} +output "UDP_firewall_rules_name" { + value = module.single-into-existing-vpc.UDP_firewall_rules_name +} +output "SCTP_firewall_rules_name" { + value = module.single-into-existing-vpc.SCTP_firewall_rules_name +} +output "ESP_firewall_rules_name" { + value = module.single-into-existing-vpc.ESP_firewall_rules_name +} diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/terraform.tfvars b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/terraform.tfvars new file mode 100644 index 00000000..b387fa3d --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/terraform.tfvars @@ -0,0 +1,45 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE_ACCOUNT_PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment--- +image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8120-gw-byol-single-631-991001335-v20230622" +installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" +license = "PLEASE ENTER LICENSE" # "BYOL" +prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" +management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" +admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" +admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false +allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false +sicKey = "PLEASE ENTER SIC KEY" # "" +managementGUIClientNetwork = "PLEASE ENTER MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking--- +region = "PLEASE ENTER REGION" # "us-central1" +zone = "PLEASE ENTER ZONE" # "us-central1-a" +subnetwork_cidr = "PLEASE ENTER SUBNETWORK CIDR" # "10.0.1.0/24" +network_enableTcp = "PLEASE ENTER NETWORK ENABLE TCP" # false +network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [] +network_enableGwNetwork = "PLEASE ENTER NETWORK ENABLE GW NETWORK" # false +network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [] +network_enableIcmp = "PLEASE ENTER NETWORK ENABLE ICMP" # false +network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [] +network_enableUdp = "PLEASE ENTER NETWORK ENABLE UDP" # false +network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [] +network_enableSctp = "PLEASE ENTER NETWORK ENABLE SCTP" # false +network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [] +network_enableEsp = "PLEASE ENTER NETWORK ENABLE ESP" # false +network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [] +numAdditionalNICs = "PLEASE ENTER NUM ADDITIONAL NICS" # 1 +externalIP = "PLEASE ENTER EXTERNAL IP" # "static" +internal_subnetwork_cidr = "PLEASE ENTER INTERNAL SUBNETWORK CIDR" # "10.0.2.0/24" + +# --- Instances configuration--- +machine_type = "PLEASE ENTER MACHINE_TYPE" # "n1-standard-4" +diskType = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +bootDiskSizeGb = "PLEASE ENTER BOOT DISK SIZE GB" # 100 +enableMonitoring = "PLEASE ENTER ENABLE MONITORING" # false \ No newline at end of file diff --git a/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/variables.tf b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/variables.tf new file mode 100644 index 00000000..51d15492 --- /dev/null +++ b/deprecated/terraform/gcp/R8040-R81/single-into-new-vpc/variables.tf @@ -0,0 +1,256 @@ +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "region" { + type = string + default = "us-central1" +} +variable "zone" { + type = string + description = "The zone determines what computing resources are available and where your data is stored and used" + default = "us-central1-a" +} +variable "image_name" { + type = string + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" +} +variable "installationType" { + type = string + description = "Installation type and version" + default = "Gateway only" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-single-tf-" +} +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "subnetwork_cidr" { + type = string + description = "The range of external addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "internal_subnetwork_cidr" { + type = string + description = "The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "network_enableTcp" { + type = bool + description = "Allow TCP traffic from the Internet" + default = false +} +variable "network_tcpSourceRanges" { + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableGwNetwork" { + type = bool + description = "This is relevant for Management only. The network in which managed gateways reside" + default = false +} +variable network_gwNetworkSourceRanges{ + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableIcmp" { + type = bool + description ="Allow ICMP traffic from the Internet" + default = false +} +variable "network_icmpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable network_enableUdp{ + type = bool + description ="Allow UDP traffic from the Internet" + default = false +} +variable "network_udpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "network_enableSctp" { + type = bool + description ="Allow SCTP traffic from the Internet" + default = false +} +variable "network_sctpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} + +variable "network_enableEsp" { + type = bool + description ="Allow ESP traffic from the Internet " + default = false +} +variable "network_espSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} +variable "diskType" { + type = string + description ="Disk type" + default = "pd-ssd" +} +variable "bootDiskSizeGb" { + type = number + description ="Disk size in GB" + default = 100 +} +variable "generatePassword" { + type = bool + description ="Automatically generate an administrator password " + default = false +} +variable "management_nic" { + type = string + description = "Management Interface - Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "allowUploadDownload" { + type = string + description ="Allow download from/upload to Check Point" + default = true +} +variable "enableMonitoring" { + type = bool + description ="Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "sicKey" { + type = string + description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" + default = "" +} +variable "managementGUIClientNetwork" { + type = string + description ="Allowed GUI clients " + default = "0.0.0.0/0" +} +variable "smart_1_cloud_token" { + type = string + description ="(Optional) Smart-1 cloud token to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "numAdditionalNICs" { + type = number + description ="Number of additional network interfaces" + default = 0 +} +variable "externalIP" { + type = string + description = "External IP address type" + default = "static" +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network7_network" { + type = list(string) + description = "7th internal network ID in the chosen zone." + default = [] +} +variable "internal_network7_subnetwork" { + type = list(string) + description = "7th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network8_network" { + type = list(string) + description = "8th internal network ID in the chosen zone." + default = [] +} +variable "internal_network8_subnetwork" { + type = list(string) + description = "8th internal subnet ID in the chosen network." + default = [] +} diff --git a/gcp/deployment-packages/README.MD b/gcp/deployment-packages/README.MD new file mode 100644 index 00000000..16194ca2 --- /dev/null +++ b/gcp/deployment-packages/README.MD @@ -0,0 +1,5 @@ +# Check Point CloudGuard IaaS GCP Deployment Manager packages +This directory contains Check Point CloudGuard IaaS Deployment Manager packages for all the solutions available in the marketplace. + +# How to deploy the templates +To deploy the Deployment Manager packages follow the instructions in the README.MD file in each directory. diff --git a/gcp/deployment-packages/autoscale-byol/README.md b/gcp/deployment-packages/autoscale-byol/README.md new file mode 100644 index 00000000..d11c9a1b --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R81.10 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/gcp/deployment-packages/autoscale-byol/c2d_deployment_configuration.json b/gcp/deployment-packages/autoscale-byol/c2d_deployment_configuration.json new file mode 100755 index 00000000..8103c6e1 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-byol-mig-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py new file mode 100755 index 00000000..226e09ea --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py @@ -0,0 +1,379 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R81.10-GW': 'r8110-gw', + 'R81.20-GW': 'r8120-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20240714' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R81.20-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + passwd = '' + if context.properties['generatePassword']: + passwd = password.GeneratePassword(12, False) + metadata['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + return instance_template, passwd + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + prop['osVersion'] = prop['autoscalingVersion'].split(' ')[0].replace( + ".", "") + nics = create_nics(context) + gw_template, passwd = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop[ + 'gw_dependencies'], + gw_version=VERSIONS[ + version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema new file mode 100755 index 00000000..65b41f3d --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema @@ -0,0 +1,213 @@ +imports: + - path: check-point-autoscale--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - BYOL Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + - generatePassword + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.20 Autoscaling + enum: + - R81.10 Autoscaling + - R81.20 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string + password: + type: string \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-byol/common.py b/gcp/deployment-packages/autoscale-byol/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/autoscale-byol/config.yaml b/gcp/deployment-packages/autoscale-byol/config.yaml new file mode 100644 index 00000000..bc223154 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--byol + type: check-point-autoscale--byol.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--byol.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--byol.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--byol.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--byol.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--byol.cpuUsagePercentage) \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-byol/default.py b/gcp/deployment-packages/autoscale-byol/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/autoscale-byol/images.py b/gcp/deployment-packages/autoscale-byol/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-byol/password.py b/gcp/deployment-packages/autoscale-byol/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/autoscale-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/gcp/deployment-packages/autoscale-payg/README.md b/gcp/deployment-packages/autoscale-payg/README.md new file mode 100644 index 00000000..9dfa6b83 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/README.md @@ -0,0 +1,126 @@ +# GCP Deployment Manager package for Check Point Autoscaling PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point Autoscaling (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-autoscaling-ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/autoscale-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is h8R2exQYuc4bzlO14boUhg== + Waiting for create [operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78]...done. + Create operation operation-1585217870871-5a1bf4c15b9ea-f8d824d5-1089cc78 completed successfully. + NAME TYPE STATE ERRORS INTENT + mig-as compute.v1.regionAutoscaler COMPLETED [] + mig-igm compute.v1.regionInstanceGroupManager COMPLETED [] + mig-vpc-icmp compute.v1.firewall COMPLETED [] + mig-vpc-udp compute.v1.firewall COMPLETED [] + mig-tmplt compute.v1.instanceTemplate COMPLETED [] + OUTPUTS VALUE + Deployment autoscale + Managed instance group https://www.googleapis.com/compute/v1/projects/checkpoint/regions/asia-east1/instanceGroups/autoscale-igm + Minimum instances 2 + Maximum instances 10 + Target CPU usage 60% + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| | | | | | +| **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | +| | | | | | +| **AutoProvTemplate** | Configuration template name | string | Specify the provisioning configuration template name (for autoprovisioning) | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **mgmtNIC** | Management Interface | string | Ephemeral Public IP (eth0)
; Private IP (eth1); | +| | | | | | +| **networkDefinedByRoutes** | Networks behind the Internal interface will be defined by routes.
Set eth1 topology to define the networks behind this interface by the routes configured on the gateway | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **networks** | The external networks ID in which the gateways will reside and internal networks ID in which application servers reside. | list(string) | Available network in the chosen zone | +| | | | | | +| **subnetworks** | External and Internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network | +| | | | | | +| **enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **cpuUsage** | Target CPU usage (%).
Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance | number | A number in the range 10 - 90 | +| | | | | | +| **minInstances** | Minimum number of instances | number | A number in the range 1 and the maximum number of instances | +| | | | | | +| **maxInstances** | Maximum number of instances | number | A number in the range the minimum number of instances and infinity | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | + +## Example + autoscalingVersion: "R81.10 Autoscaling" + managementName: "mgmt" + AutoProvTemplate: "template" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + mgmtNIC: "Ephemeral Public IP (eth0)" + networkDefinedByRoutes: true + shell: "/bin/bash" + allowUploadDownload: true + zone: "asia-east1-a" + networks: ["external-vpc", "internal-vpc"] + subnetworks: ["frontend", "backend"] + enableIcmp: true + icmpSourceRanges: "0.0.0.0/0" + enableTcp: false + tcpSourceRanges: "" + enableUdp: true + udpSourceRanges: "0.0.0.0/0" + enableSctp: false + sctpSourceRanges: "" + enableEsp: false + espSourceRanges: "" + machineType: "n1-standard-4" + cpuUsage: 60 + minInstances: 2 + maxInstances: 10 + diskType: "pd-ssd" + bootDiskSizeGb: 100 + enableMonitoring: false + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history diff --git a/gcp/deployment-packages/autoscale-payg/c2d_deployment_configuration.json b/gcp/deployment-packages/autoscale-payg/c2d_deployment_configuration.json new file mode 100755 index 00000000..0854e0f3 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-payg-mig-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py new file mode 100755 index 00000000..b13af6da --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py @@ -0,0 +1,379 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'mig' + +VERSIONS = { + 'R81.10-GW': 'r8110-gw', + 'R81.20-GW': 'r8120-gw' +} + +TEMPLATE_NAME = 'autoscale' +TEMPLATE_VERSION = '20240714' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_nic(context, net_name, subnet, external_ip=False): + prop = context.properties + network_interface = { + 'kind': 'compute#networkInterface', + 'network': common.GlobalNetworkLink(prop['project'], net_name) + } + if subnet: + network_interface["subnetwork"] = common.MakeRegionalSubnetworkLink( + prop['project'], prop['zone'], subnet) + # add ephemeral public IP address + if external_ip: + network_interface["accessConfigs"] = \ + [make_access_config(name="external-nat")] + return network_interface + + +def create_nics(context): + prop = context.properties + firewall_rules = create_firewall_rules(context) + if firewall_rules: + prop['resources'].extend(firewall_rules) + networks = prop.setdefault('networks', ['default']) + subnetworks = prop.get('subnetworks', []) + nics = [] + for i in range(len(networks)): + name = networks[i] + subnet = '' + external_ip = prop.get('gatewayExternalIP') and i == 0 + if subnetworks and i < len(subnetworks) and subnetworks[i]: + subnet = subnetworks[i] + network_interface = make_nic(context, name, subnet, external_ip) + nics.append(network_interface) + return nics + + +def create_firewall_rules(context): + prop = context.properties + deployment = prop['deployment'] + network = prop.setdefault('networks', ['default'])[0] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(proto + 'SourceRanges', '') + protocol_enabled = prop.get('enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, deployment, network)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_name): + fw_rule_name = '%s-%s-%s' % (deployment[:34], net_name[:22], protocol) + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}] + } + } + return firewall_rule + + +def create_instance_template(context, + name, + nics, + depends_on=None, + gw_version=VERSIONS['R81.20-GW']): + if 'gw' in gw_version: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', gw_version, license_name]) + formatter = common.DefaultFormatter() + instance_template_name = common.AutoName(name, default.TEMPLATE) + instance_template = { + "type": default.TEMPLATE, + "name": instance_template_name, + 'metadata': { + 'dependsOn': depends_on + }, + "properties": { + "project": context.properties['project'], + "properties": { + "canIpForward": True, + "disks": [{"autoDelete": True, + "boot": True, + "deviceName": common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + "index": 0, + "initializeParams": { + "diskType": + context.properties['diskType'], + "diskSizeGb": + context.properties['bootDiskSizeGb'], + "sourceImage": + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]) + }, + "kind": 'compute#attachedDisk', + "mode": "READ_WRITE", + "type": "PERSISTENT"}], + "machineType": context.properties['machineType'], + "networkInterfaces": nics, + 'metadata': { + "kind": 'compute#metadata', + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + }, + { + 'key': 'serial-port-enable', + 'value': 'true' + } + ]}, + "scheduling": { + "automaticRestart": True, + "onHostMaintenance": "MIGRATE", + "preemptible": False + }, + "serviceAccounts": [ + { + "email": "default", + "scopes": [ + "https://www.googleapis.com/" + + "auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/" + + "auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append" + ] + }], + "tags": { + "items": [ + 'x-chkp-management--{}'. + format(context.properties['managementName']), + 'x-chkp-template--{}'. + format(context.properties['AutoProvTemplate']), + 'checkpoint-gateway' + ] + } + } + } + } + tagItems = instance_template['properties']['properties']['tags']['items'] + if context.properties['mgmtNIC'] == 'Ephemeral Public IP (eth0)': + tagItems.append("x-chkp-ip-address--public") + tagItems.append("x-chkp-management-interface--eth0") + elif context.properties['mgmtNIC'] == 'Private IP (eth1)': + tagItems.append("x-chkp-ip-address--private") + tagItems.append("x-chkp-management-interface--eth1") + if context.properties['networkDefinedByRoutes']: + tagItems.append("x-chkp-topology-eth1--internal") + tagItems.append("x-chkp-topology-settings-eth1" + "--network-defined-by-routes") + metadata = instance_template['properties']['properties']['metadata'] + if 'instanceSSHKey' in context.properties: + metadata['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + passwd = '' + if context.properties['generatePassword']: + passwd = password.GeneratePassword(12, False) + metadata['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + return instance_template, passwd + + +def GenerateAutscaledGroup(context, name, + instance_template, depends_on=None): + prop = context.properties + igm_name = common.AutoName(name, default.IGM) + depends_on = depends_on + resource = { + 'name': igm_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_IGM, + 'properties': { + 'region': common.ZoneToRegion(prop.get("zone")), + 'baseInstanceName': name, + 'instanceTemplate': '$(ref.' + instance_template + '.selfLink)', + 'targetSize': prop.get("minInstances"), + # 'autoHealingPolicies': [{ + # 'initialDelaySec': 60 + # }] + } + } + return resource + + +def CreateAutscaler(context, name, + igm, cpu_usage, depends_on=None): + prop = context.properties + autoscaler_name = common.AutoName(name, default.AUTOSCALER) + depends_on = depends_on + cpu_usage = float(cpu_usage) / 100 + resource = { + 'name': autoscaler_name, + 'metadata': { + 'dependsOn': depends_on + }, + 'type': default.REGION_AUTOSCALER, + 'properties': { + 'target': '$(ref.' + igm + '.selfLink)', + 'region': common.ZoneToRegion(prop.get("zone")), + 'autoscalingPolicy': { + 'minNumReplicas': int(prop.get("minInstances")), + 'maxNumReplicas': int(prop.get("maxInstances")), + 'cpuUtilization': { + 'utilizationTarget': cpu_usage + }, + 'coolDownPeriodSec': 90 + } + } + } + return resource + + +def make_access_config(name=None): + access_config = { + 'type': default.ONE_NAT, + "kind": 'compute#accessConfig' + } + if name: + access_config['name'] = name + return access_config + + +def validate_region(test_zone, valid_region): + test_region = common.ZoneToRegion(test_zone) + if test_region != valid_region: + err_msg = '{} is in region {}. All subnets must be ' + \ + 'in the same region ({})' + raise common.Error( + err_msg.format(test_zone, test_region, valid_region) + ) + + +@common.FormatErrorsDec +def generate_config(context): + # This method will: + # 1. Create a instance template for a security GW + # (with a tag for the managing security server) + # 2. Create a managed instance group + # (based on the instance template and zones list provided by the user) + # 3. Configure autoscaling + # (based on min, max & policy settings provided by the user) + prop = context.properties + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'AutoScale' + prop['resources'] = [] + prop['outputs'] = [] + prop['gw_dependencies'] = [] + prop['computed_sic_key'] = password.GeneratePassword(12, False) + prop['gatewayExternalIP'] = (prop['mgmtNIC'] == + 'Ephemeral Public IP (eth0)') + version_chosen = prop['autoscalingVersion'].split(' ')[0] + "-GW" + prop['osVersion'] = prop['autoscalingVersion'].split(' ')[0].replace( + ".", "") + nics = create_nics(context) + gw_template, passwd = create_instance_template(context, + prop['deployment'], + nics, + depends_on=prop[ + 'gw_dependencies'], + gw_version=VERSIONS[ + version_chosen]) + prop['resources'] += [gw_template] + prop['igm_dependencies'] = [gw_template['name']] + igm = GenerateAutscaledGroup(context, + prop['deployment'], + gw_template['name'], + prop['igm_dependencies']) + prop['resources'] += [igm] + prop['autoscaler_dependencies'] = [igm['name']] + cpu_usage = prop.get("cpuUsage") + autoscaler = CreateAutscaler(context, + prop['deployment'], + igm['name'], + cpu_usage, + prop['autoscaler_dependencies']) + prop['resources'] += [autoscaler] + prop['outputs'] += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'instanceTemplateName', + 'value': gw_template['name'] + }, + { + 'name': 'InstanceTemplateLink', + 'value': common.Ref(gw_template['name']) + }, + { + 'name': 'IGMname', + 'value': igm['name'] + }, + { + 'name': 'IGMLink', + 'value': common.RefGroup(igm['name']) + }, + { + 'name': 'cpuUsagePercentage', + 'value': str(int(prop['cpuUsage'])) + '%' + }, + { + 'name': 'minInstancesInt', + 'value': str(int(prop['minInstances'])) + }, + { + 'name': 'maxInstancesInt', + 'value': str(int(prop['maxInstances'])) + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(prop['resources'], prop['outputs']) diff --git a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema new file mode 100755 index 00000000..b9341dfa --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema @@ -0,0 +1,213 @@ +imports: + - path: check-point-autoscale--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Autoscaling - PAYG Template + +required: + - autoscalingVersion + - networks + - zone + - machineType + - cpuUsage + - minInstances + - maxInstances + - diskType + - bootDiskSizeGb + - managementName + - AutoProvTemplate + - allowUploadDownload + - networkDefinedByRoutes + - shell + - enableMonitoring + - generatePassword + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + networks: + type: array + default: [default, default1] + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_NETWORK + gceNetwork: + labels: + - External + - Internal + allowSharedVpcs: True + machineTypeProperty: machineType + subnetworks: + type: array + minItems: 2 + maxItems: 2 + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: networks + mgmtNIC: + type: string + default: Ephemeral Public IP (eth0) + enum: + - Ephemeral Public IP (eth0) + - Private IP (eth1) + enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableIcmp + enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableTcp + enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableUdp + enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableSctp + enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: networks + espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: enableEsp + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + cpuUsage: + type: integer + minimum: 10 + maximum: 90 + default: 60 + minInstances: + type: integer + minimum: 1 + maximum: 16384 + default: 2 + maxInstances: + type: integer + minimum: 1 + maximum: 32768 + default: 10 + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + default: 100 + minimum: 100 + maximum: 4096 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + autoscalingVersion: + type: string + default: R81.20 Autoscaling + enum: + - R81.10 Autoscaling + - R81.20 Autoscaling + managementName: + type: string + default: 'checkpoint-management' + pattern: ^([ -~]+)$ + AutoProvTemplate: + type: string + default: 'gcp-asg-autoprov-tmplt' + pattern: ^([ -~]{1,30})$ + enableMonitoring: + type: boolean + default: False + networkDefinedByRoutes: + type: boolean + default: True + allowUploadDownload: + type: boolean + default: True + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + +outputs: + deployment: + type: string + project: + type: string + password: + type: string \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-payg/common.py b/gcp/deployment-packages/autoscale-payg/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/autoscale-payg/config.yaml b/gcp/deployment-packages/autoscale-payg/config.yaml new file mode 100644 index 00000000..d0993a52 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-autoscale--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-autoscale--payg + type: check-point-autoscale--payg.py + properties: + autoscalingVersion: "PLEASE ENTER AUTOSCALE VERSION" + managementName: "PLEASE ENTER MANAGEMENT NAME" + AutoProvTemplate: "PLEASE ENTER AUTOPROVISION TEMPLATE NAME" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + mgmtNIC: "PLEASE ENTER MANAGEMENT NIC TYPE" + networkDefinedByRoutes: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + allowUploadDownload: "PLEASE ENTER true or false" + zone: "PLEASE ENTER A ZONE" + networks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL NETWORKS ID" + subnetworks: "PLEASE ENTER A LIST OF EXTERNAL AND INTERNAL SUBNETWORKS ID" + enableIcmp: "PLEASE ENTER true or false" + icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableTcp: "PLEASE ENTER true or false" + tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableUdp: "PLEASE ENTER true or false" + udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableSctp: "PLEASE ENTER true or false" + sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + enableEsp: "PLEASE ENTER true or false" + espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + machineType: "PLEASE ENTER A MACHINE TYPE" + cpuUsage: "PLEASE ENTER CPU USAGE (%)" + minInstances: "PLEASE ENTER MINIMUM NUMBER OF INSTANCES" + maxInstances: "PLEASE ENTER MAXIMUM NUMBER OF INSTANCES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + enableMonitoring: "PLEASE ENTER true or false" +outputs: +- name: "Deployment" + value: $(ref.check-point-autoscale--payg.deployment) +- name: "Managed instance group" + value: $(ref.check-point-autoscale--payg.IGMLink) +- name: "Minimum instances" + value: $(ref.check-point-autoscale--payg.minInstancesInt) +- name: "Maximum instances" + value: $(ref.check-point-autoscale--payg.maxInstancesInt) +- name: "Target CPU usage" + value: $(ref.check-point-autoscale--payg.cpuUsagePercentage) \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-payg/default.py b/gcp/deployment-packages/autoscale-payg/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/autoscale-payg/images.py b/gcp/deployment-packages/autoscale-payg/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-payg/password.py b/gcp/deployment-packages/autoscale-payg/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/autoscale-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/gcp/deployment-packages/ha-byol/README.md b/gcp/deployment-packages/ha-byol/README.md new file mode 100644 index 00000000..f915c4b4 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/README.md @@ -0,0 +1,187 @@ +# GCP Deployment Manager package for Check Point High Availability BYOL solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (BYOL) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **deployWithPublicIPs** | Deploy HA with public IPs | boolean | true;
false; | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **smart1CloudTokenA** | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **smart1CloudTokenB** | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R81.10 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + smart1CloudTokenA: "xxxxxxxxxxxxxxxxxxxxxxxx" + smart1CloudTokenB: "xxxxxxxxxxxxxxxxxxxxxxxx" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + deployWithPublicIPs: true + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/gcp/deployment-packages/ha-byol/c2d_deployment_configuration.json b/gcp/deployment-packages/ha-byol/c2d_deployment_configuration.json new file mode 100755 index 00000000..d92114e1 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-byol-cluster-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py new file mode 100755 index 00000000..4a66ea50 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py @@ -0,0 +1,492 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R81.10': 'r8110-gw', + 'R81.20': 'r8120-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20240714' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +NO_PUBLIC_IP = 'no-public-ip' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None, + smart1cloudToken=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + context.properties['smart1CloudToken'] = smart1cloudToken + context.properties['name'] = name + context.properties['zoneConfig'] = zone + context.properties['osVersion'] = cg_version.replace(".", "") + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics): + if not prop['deployWithPublicIPs']: + prop['primary_cluster_address_name'] = NO_PUBLIC_IP + prop['secondary_cluster_address_name'] = NO_PUBLIC_IP + else: + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +def validate_both_tokens(token_a, token_b): + if (not token_a and token_b) or (not token_b and token_a) or \ + (token_a and token_a == token_b): + raise common.Error('To connect to Smart-1 Cloud, \ + you must provide two tokens (one per member)') + + +def validate_mgmt_network_if_required(token_a, mgmt_network): + if not token_a and mgmt_network == "S1C": + raise common.Error( + 'Public address of the Security Management Server is required') + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + validate_both_tokens(prop['smart1CloudTokenA'], prop['smart1CloudTokenB']) + validate_mgmt_network_if_required( + prop['smart1CloudTokenA'], prop['managementNetwork']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies, + prop['smart1CloudTokenA']) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies, + prop['smart1CloudTokenB']) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + if prop['deployWithPublicIPs']: + outputs += [ + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_a_address_name']) + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_b_address_name']) + } + ] + + return common.MakeResource(resources, outputs) diff --git a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema new file mode 100755 index 00000000..d01c7887 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema @@ -0,0 +1,398 @@ +imports: + - path: check-point-cluster--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - BYOL Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + deployWithPublicIPs: + type: boolean + default: True + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + smart1CloudTokenA: + type: string + default: '' + smart1CloudTokenB: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.20 Cluster + enum: + - R81.10 Cluster + - R81.20 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^((?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))|(S1C)$ + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/gcp/deployment-packages/ha-byol/common.py b/gcp/deployment-packages/ha-byol/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/ha-byol/config.yaml b/gcp/deployment-packages/ha-byol/config.yaml new file mode 100644 index 00000000..e8012a71 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/config.yaml @@ -0,0 +1,73 @@ +imports: +- path: check-point-cluster--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--byol + type: check-point-cluster--byol.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE IN THE SAME REGION AS MEMBER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + #To connect to Smart-1 Cloud you must provide two valid tokens (one per member) + smart1CloudTokenA: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER A OR LEAVE EMPTY DOUBLE QUOTES" + smart1CloudTokenB: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER B OR LEAVE EMPTY DOUBLE QUOTES" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP, if using Smart-1 Cloud insert 'S1C'" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + deployWithPublicIPs: "PLEASE ENTER true or false" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--byol.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--byol.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--byol.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--byol.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--byol.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--byol.vmBExternalIP) \ No newline at end of file diff --git a/gcp/deployment-packages/ha-byol/default.py b/gcp/deployment-packages/ha-byol/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/ha-byol/images.py b/gcp/deployment-packages/ha-byol/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/ha-byol/password.py b/gcp/deployment-packages/ha-byol/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/ha-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/gcp/deployment-packages/ha-payg/README.md b/gcp/deployment-packages/ha-payg/README.md new file mode 100644 index 00000000..4f8405cd --- /dev/null +++ b/gcp/deployment-packages/ha-payg/README.md @@ -0,0 +1,187 @@ +# GCP Deployment Manager package for Check Point High Availability PAYG solution +This directory contains CloudGuard IaaS deployment package for Check Point High Availability (PAYG) solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-ha--ngtp). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/ha-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is CgwkIUxcTnI5_eZY1g9SFw== + Waiting for create [operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790]...done. + Create operation operation-1585150261645-5a1af8e42d0ba-6b3d4618-5856e790 completed successfully. + NAME TYPE STATE ERRORS INTENT + cluster-cluster-network-icmp compute.v1.firewall COMPLETED [] + cluster-cluster-network-tcp compute.v1.firewall COMPLETED [] + cluster-config runtimeconfig.v1beta1.config COMPLETED [] + cluster-member-a compute.v1.instance COMPLETED [] + cluster-member-a-address compute.v1.address COMPLETED [] + cluster-member-b compute.v1.instance COMPLETED [] + cluster-member-b-address compute.v1.address COMPLETED [] + cluster-mgmt-network-esp compute.v1.firewall COMPLETED [] + cluster-mgmt-network-sctp compute.v1.firewall COMPLETED [] + cluster-primary-cluster-address compute.v1.address COMPLETED [] + cluster-secondary-cluster-address compute.v1.address COMPLETED [] + cluster-software runtimeconfig.v1beta1.waiter COMPLETED [] + OUTPUTS VALUE + Deployment cluster + Cluster IP external address 35.201.201.163 + Member A cluster-member-a + Member A external IP 104.199.168.141 + Member B cluster-member-b + Member B external IP 35.221.178.173 + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| | | | | | +| **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **zoneB** | Member B Zone | string | Must be in the same region as member A zone | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **managementNetwork** | Security Management Server address | string | The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address | +| | | | | | +| **cluster-network-cidr** | Cluster external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **cluster-network-name** | Cluster external network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **cluster-network-subnetwork-name** | Cluster subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **cluster-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **cluster-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **cluster-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network-cidr** | Management external subnet CIDR.
If the variable's value is not empty double quotes, a new network will be created.
The public IP used to manage each member will be translated to a private address in this external network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **mgmt-network-name** | Management network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **mgmt-network-subnetwork-name** | Management subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **mgmt-network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **mgmt-network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **mgmt-network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **deployWithPublicIPs** | Deploy HA with public IPs | boolean | true;
false; | +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **smart1CloudTokenA** | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **smart1CloudTokenB** | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 6.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | +| **internal-network1-cidr** | 1st internal subnet CIDR.
If the variable's value is not empty double quotes, a new subnet will be created.
Assigns the cluster members an IPv4 address in this internal network | string | Specify an RFC 1918 CIDR block that does not overlap with your other networks to create a new network or select an existing one below | +| | | | | | +| **internal-network1-name** | 1st internal network ID. The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **internal-network1-subnetwork-name** | 1st internal subnet ID. Assigns the instance an IPv4 address from the subnetwork’s range.
If you have specified a CIDR block above, this subnetwork will not be used.
Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +## Example + ha_version: "R81.10 Cluster" + zoneA: "asia-east1-a" + zoneB: "asia-east1-a" + machineType: "n1-standard-4" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + smart1CloudTokenA: "xxxxxxxxxxxxxxxxxxxxxxxx" + smart1CloudTokenB: "xxxxxxxxxxxxxxxxxxxxxxxx" + enableMonitoring: false + managementNetwork: "209.87.209.100/32" + sicKey: "aaaaaaaa" + generatePassword: false + allowUploadDownload: false + shell: "/bin/bash" + deployWithPublicIPs: true + cluster-network-cidr: "10.0.1.0/24" + cluster-network-name: "external-vpc" + cluster-network-subnetwork-name: "frontend" + cluster-network_enableIcmp: true + cluster-network_icmpSourceRanges: "0.0.0.0/0" + cluster-network_enableTcp: true + cluster-network_tcpSourceRanges: "0.0.0.0/0" + cluster-network_enableUdp: false + cluster-network_udpSourceRanges: "" + cluster-network_enableSctp: false + cluster-network_sctpSourceRanges: "" + cluster-network_enableEsp: false + cluster-network_espSourceRanges: "" + mgmt-network-cidr: "10.0.2.0/24" + mgmt-network-name: "vpc-internal" + mgmt-network-subnetwork-name: "" + mgmt-network_enableIcmp: false + mgmt-network_icmpSourceRanges: "" + mgmt-network_enableTcp: false + mgmt-network_tcpSourceRanges: "" + mgmt-network_enableUdp: true + mgmt-network_udpSourceRanges: "0.0.0.0/0" + mgmt-network_enableSctp: true + mgmt-network_sctpSourceRanges: "0.0.0.0/0" + mgmt-network_enableEsp: true + mgmt-network_espSourceRanges: "0.0.0.0/0" + numInternalNetworks: 1 + internal-network1-cidr: "10.0.3.0/24" + internal-network1-name: "vpc-internal2" + internal-network1-subnetwork-name: "vpc-internal2" + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/gcp/deployment-packages/ha-payg/c2d_deployment_configuration.json b/gcp/deployment-packages/ha-payg/c2d_deployment_configuration.json new file mode 100755 index 00000000..c6b9e41f --- /dev/null +++ b/gcp/deployment-packages/ha-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "MULTI_VM", + "imageName": "check-point-r8120-gw-payg-cluster-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py new file mode 100755 index 00000000..d65178a6 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py @@ -0,0 +1,492 @@ +# Copyright 2016 Check Point Software LTD. + +import common +import copy +import default +import images +import password + + +MAX_ADDITIONAL_NICS = 6 + +GATEWAY = 'checkpoint-gateway' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'cluster' + +VERSIONS = { + 'R81.10': 'r8110-gw', + 'R81.20': 'r8120-gw' +} + +TEMPLATE_NAME = 'cluster' +TEMPLATE_VERSION = '20240714' + +CLUSTER_NET_FIELD = 'cluster-network' +MGMT_NET_FIELD = 'mgmt-network' +INTERNAL_NET_FIELD = 'internal-network{}' + +MGMT_NIC = 1 + +NO_PUBLIC_IP = 'no-public-ip' + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def make_gw(context, name, zone, nics, passwd=None, depends_on=None, + smart1cloudToken=None): + cg_version = context.properties['ha_version'].split(' ')[0] + if 'gw' in VERSIONS[cg_version]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[cg_version], license_name]) + formatter = common.DefaultFormatter() + + context.properties['smart1CloudToken'] = smart1cloudToken + context.properties['name'] = name + context.properties['zoneConfig'] = zone + context.properties['osVersion'] = cg_version.replace(".", "") + + gw = { + 'type': default.INSTANCE, + 'name': name, + 'metadata': { + 'dependsOn': depends_on + }, + 'properties': { + 'description': 'CloudGuard Highly Available Security Cluster', + 'zone': zone, + 'tags': { + 'items': [GATEWAY], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE, zone), + 'canIpForward': True, + 'networkInterfaces': nics, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.set_name_and_truncate( + context.properties['deployment'], + '-{}-boot'.format(name)), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE, zone), + 'diskSizeGb': context.properties['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format( + startup_script, **context.properties) + } + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloudruntimeconfig' + ], + }] + } + } + + if 'instanceSSHKey' in context.properties: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': context.properties['instanceSSHKey'] + } + ) + + if passwd: + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + + return gw + + +def make_access_config(ip, name=None): + access_config = { + 'type': default.ONE_NAT, + 'natIP': ip + } + + if name: + access_config['name'] = name + + return access_config + + +def make_static_address(prop, name): + address = { + 'name': name, + 'type': default.ADDRESS, + 'properties': { + 'name': name, + 'region': prop['region'] + } + } + + return address + + +def create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics): + if not prop['deployWithPublicIPs']: + prop['primary_cluster_address_name'] = NO_PUBLIC_IP + prop['secondary_cluster_address_name'] = NO_PUBLIC_IP + else: + member_a_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-a-address') + member_b_address_name = common.set_name_and_truncate( + prop['deployment'], '-member-b-address') + + prop['member_a_address_name'] = member_a_address_name + prop['member_b_address_name'] = member_b_address_name + + member_a_address = make_static_address(prop, member_a_address_name) + member_b_address = make_static_address(prop, member_b_address_name) + + resources += [member_a_address, member_b_address] + + member_a_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_a_address_name))] + member_b_nics[MGMT_NIC]['accessConfigs'] = [make_access_config( + '$(ref.{}.address)'.format(member_b_address_name))] + + primary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-primary-cluster-address') + secondary_cluster_address_name = common.set_name_and_truncate( + prop['deployment'], '-secondary-cluster-address') + + primary_cluster_address = make_static_address( + prop, primary_cluster_address_name) + secondary_cluster_address = make_static_address( + prop, secondary_cluster_address_name) + + resources += [primary_cluster_address, secondary_cluster_address] + + prop['primary_cluster_address_name'] = primary_cluster_address_name + prop['secondary_cluster_address_name'] = secondary_cluster_address_name + + +def make_nic(prop, net_name, subnet_name): + network_interface = { + 'network': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/global/networks/', + net_name]), + 'subnetwork': ''.join([default.COMPUTE_URL_BASE, 'projects/', + prop['project'], '/regions/', prop['region'], + '/subnetworks/', subnet_name]) + } + + return network_interface + + +def make_subnet(prop, name, net_name, cidr, private_google_access=False): + subnet = { + 'type': default.VPC_SUBNET, + 'name': name, + 'metadata': { + 'dependsOn': [net_name] + }, + 'properties': { + 'network': 'projects/{}/global' + '/networks/{}'.format(prop['project'], net_name), + 'region': prop['region'], + 'ipCidrRange': cidr, + 'privateIpGoogleAccess': private_google_access, + 'enableFlowLogs': False + } + } + + return subnet + + +def make_net(name): + net = { + 'type': default.VPC, + 'name': name, + 'properties': { + 'autoCreateSubnetworks': False + } + } + + return net + + +def get_or_create_net(prop, name, resources, gw_dependencies, + private_google_access=False, create_firewall=False): + net_cidr = prop.get(name + '-cidr') + + if net_cidr: + net_name = '{}-{}'.format(prop['deployment'][:20], name) + subnet_name = '{}-subnet'.format(net_name) + net = make_net(net_name) + subnet = make_subnet( + prop, subnet_name, net_name, net_cidr, private_google_access) + + resources += [net, subnet] + gw_dependencies.append(subnet_name) + else: + net_name = prop.get(name + '-name') + subnet_name = prop.get(name + '-subnetwork-name') + if not subnet_name: + raise common.Error( + 'Network {} is missing.'.format(net_name.split('-'))) + + if create_firewall: + firewall_rules = create_firewall_rules(prop, name, net_name, net_cidr) + if firewall_rules: + resources.extend(firewall_rules) + + return net_name, subnet_name + + +def create_firewall_rules(prop, net_prop_name, net_name, net_cidr): + deployment = prop['deployment'] + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get(net_prop_name + '_' + proto + + 'SourceRanges', '') + protocol_enabled = prop.get(net_prop_name + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append( + make_firewall_rule(proto, source_ranges, deployment, + net_prop_name, net_name, net_cidr)) + + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, deployment, net_prop_name, + net_name, net_cidr): + fw_rule_name = '%s-%s-%s' % (deployment[:40], net_prop_name, protocol) + ranges_list = source_ranges.split(',') + ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': [GATEWAY], + 'allowed': [{'IPProtocol': protocol}], + } + } + + if net_cidr: + firewall_rule['metadata'] = { + 'dependsOn': [net_name] + } + + return firewall_rule + + +def add_readiness_waiter(prop, resources): + deployment_config = common.set_name_and_truncate( + prop['deployment'], '-config') + + prop['config_path'] = 'projects/{}/configs/{}'.format( + prop['project'], deployment_config) + prop['config_url'] = ( + 'https://runtimeconfig.googleapis.com/v1beta1/{}'.format( + prop['config_path'])) + + resources.append( + { + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ( + 'Holds software readiness status ' + 'for deployment {}').format(prop['deployment']) + } + } + ) + + resources.append( + { + 'name': common.set_name_and_truncate( + prop['deployment'], '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.{}.name)'.format(deployment_config), + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 2, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + } + ) + + +def validate_same_region(zone_a, zone_b): + if not common.ZoneToRegion(zone_a) == common.ZoneToRegion(zone_b): + raise common.Error('Member A Zone ({}) and Member B Zone ({}) ' + 'are not in the same region'.format(zone_a, zone_b)) + + +def validate_both_tokens(token_a, token_b): + if (not token_a and token_b) or (not token_b and token_a) or \ + (token_a and token_a == token_b): + raise common.Error('To connect to Smart-1 Cloud, \ + you must provide two tokens (one per member)') + + +def validate_mgmt_network_if_required(token_a, mgmt_network): + if not token_a and mgmt_network == "S1C": + raise common.Error( + 'Public address of the Security Management Server is required') + + +@common.FormatErrorsDec +def generate_config(context): + prop = context.properties + + validate_same_region(prop['zoneA'], prop['zoneB']) + validate_both_tokens(prop['smart1CloudTokenA'], prop['smart1CloudTokenB']) + validate_mgmt_network_if_required( + prop['smart1CloudTokenA'], prop['managementNetwork']) + + prop['deployment'] = context.env['deployment'] + prop['project'] = context.env['project'] + prop['region'] = common.ZoneToRegion(prop['zoneA']) + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + prop['hasInternet'] = 'true' # via Google Private Access + prop['installationType'] = 'Cluster' + + resources = [] + outputs = [] + gw_dependencies = [] + member_a_nics = [] + + add_readiness_waiter(prop, resources) + + cluster_net_name, cluster_subnet_name = get_or_create_net( + prop, CLUSTER_NET_FIELD, resources, gw_dependencies, True, True) + member_a_nics.append(make_nic(prop, cluster_net_name, cluster_subnet_name)) + + mgmt_net_name, mgmt_subnet_name = get_or_create_net( + prop, MGMT_NET_FIELD, resources, gw_dependencies, False, True) + member_a_nics.append(make_nic(prop, mgmt_net_name, mgmt_subnet_name)) + + for ifnum in range(1, prop['numInternalNetworks'] + 1): + int_net_name, int_subnet_name = get_or_create_net( + prop, INTERNAL_NET_FIELD.format(ifnum), resources, + gw_dependencies) + member_a_nics.append(make_nic(prop, int_net_name, int_subnet_name)) + + member_b_nics = copy.deepcopy(member_a_nics) + + create_external_addresses_if_needed( + prop, resources, member_a_nics, member_b_nics) + + member_a_name = common.set_name_and_truncate( + prop['deployment'], '-member-a') + member_b_name = common.set_name_and_truncate( + prop['deployment'], '-member-b') + + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + else: + passwd = '' + + member_a = make_gw(context, member_a_name, prop['zoneA'], + member_a_nics, passwd, gw_dependencies, + prop['smart1CloudTokenA']) + member_b = make_gw(context, member_b_name, prop['zoneB'], + member_b_nics, passwd, gw_dependencies, + prop['smart1CloudTokenB']) + + resources += [member_a, member_b] + + outputs += [ + { + 'name': 'deployment', + 'value': prop['deployment'] + }, + { + 'name': 'project', + 'value': prop['project'] + }, + { + 'name': 'vmAName', + 'value': member_a_name, + }, + { + 'name': 'vmASelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_a_name), + }, + { + 'name': 'vmBName', + 'value': member_b_name, + }, + { + 'name': 'vmBSelfLink', + 'value': '$(ref.{}.selfLink)'.format(member_b_name), + }, + { + 'name': 'password', + 'value': passwd + } + ] + + if prop['deployWithPublicIPs']: + outputs += [ + { + 'name': 'clusterIP', + 'value': '$(ref.{}.address)'.format( + prop['primary_cluster_address_name']) + }, + { + 'name': 'vmAExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_a_address_name']) + }, + { + 'name': 'vmBExternalIP', + 'value': '$(ref.{}.address)'.format( + prop['member_b_address_name']) + } + ] + + return common.MakeResource(resources, outputs) diff --git a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema new file mode 100755 index 00000000..b3b513b6 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema @@ -0,0 +1,398 @@ +imports: + - path: check-point-cluster--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security Cluster - PAYG Template + +required: + - zoneA + - zoneB + - machineType + - diskType + - bootDiskSizeGb + - sicKey + - managementNetwork + - allowUploadDownload + - shell + - generatePassword + - enableMonitoring + - numInternalNetworks + +properties: + zoneA: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + zoneB: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zoneA + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + deployWithPublicIPs: + type: boolean + default: True + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + smart1CloudTokenA: + type: string + default: '' + smart1CloudTokenB: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zoneA + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + ha_version: + type: string + default: R81.20 Cluster + enum: + - R81.10 Cluster + - R81.20 Cluster + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30})$ + default: '' + managementNetwork: + type: string + default: '' + pattern: ^((?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2]))|(S1C)$ + generatePassword: + type: boolean + default: False + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: False + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + cluster-network-cidr: + type: string + default: '10.0.0.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + cluster-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + cluster-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: cluster-network-name + cluster-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableIcmp + cluster-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableTcp + cluster-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableUdp + cluster-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableSctp + cluster-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: cluster-network-name + cluster-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: cluster-network_enableEsp + mgmt-network-cidr: + type: string + default: '10.0.1.0/24' + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + mgmt-network-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + mgmt-network-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: mgmt-network-name + mgmt-network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableIcmp + mgmt-network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableTcp + mgmt-network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableUdp + mgmt-network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableSctp + mgmt-network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: mgmt-network-name + mgmt-network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: mgmt-network_enableEsp + numInternalNetworks: + type: integer + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + minimum: 1 + maximum: 6 + default: 1 + internal-network1-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '10.0.2.0/24' + internal-network1-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network1-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network1-name + internal-network2-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network2-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network2-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network2-name + internal-network3-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network3-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network3-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network3-name + internal-network4-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network4-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network4-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network4-name + internal-network5-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network5-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network5-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network5-name + internal-network6-cidr: + type: string + pattern: ^(?!0\.0\.0\.0/0)([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])|$ + default: '' + internal-network6-name: + type: string + pattern: ^([a-z0-9-]{1,38})$ + x-googleProperty: + type: GCE_NETWORK + internal-network6-subnetwork-name: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zoneA + gceSubnetwork: + networkProperty: internal-network6-name + +outputs: + deployment: + type: string + project: + type: string + clusterIP: + type: string + vmAName: + type: string + vmAExternalIP: + type: string + vmASelfLink: + type: string + vmBName: + type: string + vmBExternalIP: + type: string + vmBSelfLink: + type: string + password: + type: string + ha_version: + type: string diff --git a/gcp/deployment-packages/ha-payg/common.py b/gcp/deployment-packages/ha-payg/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/ha-payg/config.yaml b/gcp/deployment-packages/ha-payg/config.yaml new file mode 100644 index 00000000..de203447 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/config.yaml @@ -0,0 +1,73 @@ +imports: +- path: check-point-cluster--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-cluster--payg + type: check-point-cluster--payg.py + properties: + ha_version: "PLEASE ENTER HA VERSION" + zoneA: "PLEASE ENTER ZONE A" + zoneB: "PLEASE ENTER ZONE B. MUST BE IN THE SAME REGION AS MEMBER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + #To connect to Smart-1 Cloud you must provide two valid tokens (one per member) + smart1CloudTokenA: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER A OR LEAVE EMPTY DOUBLE QUOTES" + smart1CloudTokenB: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD FOR MEMBER B OR LEAVE EMPTY DOUBLE QUOTES" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + enableMonitoring: "PLEASE ENTER true or false" + managementNetwork: "PLEASE ENTER MANAGEMENT IP, if using Smart-1 Cloud insert 'S1C'" + sicKey: "PLEASE ENTER A SIC KEY" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + deployWithPublicIPs: "PLEASE ENTER true or false" + cluster-network-cidr: "PLEASE ENTER CLUSTER NETWORK CIDR" + cluster-network-name: "PLEASE ENTER CLUSTER NETWORK ID" + cluster-network-subnetwork-name: "PLEASE ENTER CLUSTER SUBNETWORK ID" + cluster-network_enableIcmp: "PLEASE ENTER true or false" + cluster-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableTcp: "PLEASE ENTER true or false" + cluster-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableUdp: "PLEASE ENTER true or false" + cluster-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableSctp: "PLEASE ENTER true or false" + cluster-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + cluster-network_enableEsp: "PLEASE ENTER true or false" + cluster-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network-cidr: "PLEASE ENTER MANAGEMENT NETWORK CIDR" + mgmt-network-name: "PLEASE ENTER MANAGEMENT NETWORK ID" + mgmt-network-subnetwork-name: "PLEASE ENTER MANAGEMENT SUBNETWORK ID" + mgmt-network_enableIcmp: "PLEASE ENTER true or false" + mgmt-network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableTcp: "PLEASE ENTER true or false" + mgmt-network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableUdp: "PLEASE ENTER true or false" + mgmt-network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableSctp: "PLEASE ENTER true or false" + mgmt-network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + mgmt-network_enableEsp: "PLEASE ENTER true or false" + mgmt-network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + numInternalNetworks: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + internal-network1-cidr: "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" + internal-network1-name: "PLEASE ENTER 1ST INTERNAL NETWORK ID" + internal-network1-subnetwork-name: "PLEASE ENTER INTERNAL SUBNETWORK ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-cluster--payg.deployment) +- name: "Cluster IP external address" + value: $(ref.check-point-cluster--payg.clusterIP) +- name: "Member A" + value: $(ref.check-point-cluster--payg.vmAName) +- name: "Member A external IP" + value: $(ref.check-point-cluster--payg.vmAExternalIP) +- name: "Member B" + value: $(ref.check-point-cluster--payg.vmBName) +- name: "Member B external IP" + value: $(ref.check-point-cluster--payg.vmBExternalIP) \ No newline at end of file diff --git a/gcp/deployment-packages/ha-payg/default.py b/gcp/deployment-packages/ha-payg/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/ha-payg/images.py b/gcp/deployment-packages/ha-payg/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/ha-payg/password.py b/gcp/deployment-packages/ha-payg/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/ha-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/gcp/deployment-packages/single-byol/README.md b/gcp/deployment-packages/single-byol/README.md new file mode 100644 index 00000000..4c14d447 --- /dev/null +++ b/gcp/deployment-packages/single-byol/README.md @@ -0,0 +1,134 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone BYOL solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone BYOL solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-byol). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-byol/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| | | | | | +| **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R81.10 Gateway only" + smart1CloudToken: "xxxxxxxxxxxxxxxxxxxxxxxx" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/gcp/deployment-packages/single-byol/c2d_deployment_configuration.json b/gcp/deployment-packages/single-byol/c2d_deployment_configuration.json new file mode 100755 index 00000000..949dc18a --- /dev/null +++ b/gcp/deployment-packages/single-byol/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8120-gw-byol-single-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py new file mode 100755 index 00000000..3cef893f --- /dev/null +++ b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py @@ -0,0 +1,475 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'byol' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R81.10': 'r8110', + 'R81.10-GW': 'r8110-gw', + 'R81.20': 'r8120', + 'R81.20-GW': 'r8120-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20240714' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Management only': { + 'tags': [MANAGEMENT], + 'description': 'Check Point Security Management', + 'canIpForward': False, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + if prop['smart1CloudToken'] and prop['installationType'] != 'Gateway only': + raise Exception('Use of Smart-1 Cloud token is allowed only\ + for Gateway development.') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['osVersion'] = prop['cloudguardVersion'].replace(".", "") + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)', 'Management only'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + else: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema new file mode 100755 index 00000000..2a3c922a --- /dev/null +++ b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema @@ -0,0 +1,355 @@ +imports: + - path: check-point-vsec--byol.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - BYOL Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + smart1CloudToken: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.20 Gateway only + enum: + - R81.10 Gateway only + - R81.10 Management only + - R81.10 Manual Configuration + - R81.10 Gateway and Management (Standalone) + - R81.20 Gateway only + - R81.20 Management only + - R81.20 Manual Configuration + - R81.20 Gateway and Management (Standalone) + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 1 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/gcp/deployment-packages/single-byol/common.py b/gcp/deployment-packages/single-byol/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/single-byol/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/single-byol/config.yaml b/gcp/deployment-packages/single-byol/config.yaml new file mode 100644 index 00000000..3301dada --- /dev/null +++ b/gcp/deployment-packages/single-byol/config.yaml @@ -0,0 +1,50 @@ +imports: +- path: check-point-vsec--byol.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--byol + type: check-point-vsec--byol.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableGwNetwork: "PLEASE ENTER true or false" + network_gwNetworkSourceRanges: "PLEASE ENTER GATEWAY NETWORK SOURCE RANGES FOR MANAGEMENT, AND STANDALONE. LEAVE EMPTY DOUBLE QUOTES FOR GW" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + #Connecting to Smart-1 Cloud is only available for Gateway only installation + smart1CloudToken: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD OR LEAVE EMPTY DOUBLE QUOTES" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--byol.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--byol.vmName) \ No newline at end of file diff --git a/gcp/deployment-packages/single-byol/default.py b/gcp/deployment-packages/single-byol/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/single-byol/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/single-byol/images.py b/gcp/deployment-packages/single-byol/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/single-byol/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/single-byol/password.py b/gcp/deployment-packages/single-byol/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/single-byol/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/gcp/deployment-packages/single-payg/README.md b/gcp/deployment-packages/single-payg/README.md new file mode 100644 index 00000000..c3f9443a --- /dev/null +++ b/gcp/deployment-packages/single-payg/README.md @@ -0,0 +1,133 @@ +# GCP Deployment Manager package for Management, Gateway and Standalone PAYG solutions +This directory contains CloudGuard IaaS deployment package for Management, Gateway and Standalone PAYG solution published in the [GCP Marketplace](https://console.cloud.google.com/marketplace/details/checkpoint-public/check-point-cloudguard-payg). + +# How to deploy the package manually +To deploy the Deployment Manager's package manually, without using the GCP Marketplace, follow these instructions: +1. Clone or download the files in this directory +2. Fill variables in the config.yaml(see below for variables descriptions). +3. Log into [Google Cloud Platform Console](https://console.cloud.google.com) +4. [Activate Cloud Shell](https://cloud.google.com/shell/docs/using-cloud-shell) +5. Set your Cloud Platform project in the Cloud Shell session use: + + gcloud config set project [PROJECT_ID] +6. Upload the content of the CloudGuardIaaS/gcp/deployment-packages/single-payg/ directory to the [cloud shell](https://cloud.google.com/shell/docs/uploading-and-downloading-files) +7. Launch deployment by running: + + gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config config.yaml +8. Make sure the deployment finished successfully.
Example of successful deployment output: + + The fingerprint of the deployment is NEBnvNbqOItDoLZrhYNo5Q== + Waiting for create [operation-1585065238276-5a19bc2792a32-becd058d-67862f39]...done. + Create operation operation-1585065238276-5a19bc2792a32-becd058d-67862f39 completed successfully. + NAME TYPE STATE ERRORS INTENT + gateway-config runtimeconfig.v1beta1.config COMPLETED [] + gateway-software runtimeconfig.v1beta1.waiter COMPLETED [] + gateway-vm compute.v1.instance COMPLETED [] + gateway-vm-address compute.v1.address COMPLETED [] + OUTPUTS VALUE + Deployment gateway + Instance gateway-single-vm + +## config.yaml variables +| Name | Description | Type | Allowed values | +| ------------- | ------------- | ------------- | ------------- | +| **zone** | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | +| | | | | | +| **machineType** | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | +| | | | | | +| **network** | The network determines what network traffic the instance can access | string | Available network in the chosen zone | +| | | | | | +| **Subnetwork** | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | Available subnetwork in the chosen network | +| | | | | | +| **network_enableTcp** | Allow TCP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_tcpSourceRanges** | Allow TCP traffic from the Internet | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableGwNetwork** | This is relevant for **Management** only. The network in which managed gateways reside | boolean | true;
false; | +| | | | | | +| **network_gwNetworkSourceRanges** | Allow TCP traffic from the Internet | string | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **network_enableIcmp** | Allow ICMP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_icmpSourceRanges** | Source IP ranges for ICMP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableUdp** | Allow UDP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_udpSourceRanges** | Source IP ranges for UDP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableSctp** | Allow SCTP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_sctpSourceRanges** | Source IP ranges for SCTP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **network_enableEsp** | Allow ESP traffic from the Internet | boolean | true;
false; | +| | | | | | +| **network_espSourceRanges** | Source IP ranges for ESP traffic | string | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) | +| | | | | | +| **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | +| | | | | | +| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| +| | | | | | +| **bootDiskSizeGb** | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)| +| | | | | | +| **generatePassword** | Automatically generate an administrator password | boolean | true;
false; | +| | | | | | +| **allowUploadDownload** | Allow download from/upload to Check Point | boolean | true;
false; | +| | | | | | +| **enableMonitoring** | Enable Stackdriver monitoring | boolean | true;
false; | +| | | | | | +| **shell** | Admin shell | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
| +| | | | | | +| **instanceSSHKey** | Public SSH key for the user 'admin' | string | A valid public ssh key | +| | | | | | +| **sicKey** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated | +| | | | | | +| **managementGUIClientNetwork** | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) | +| | | | | | +| **numAdditionalNICs** | Number of additional network interfaces | number | A number in the range 0 - 7.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) | +| | | | | | + +## Example + zone: "asia-east1-a" + machineType: "n1-standard-4" + network: "frontend-vpc" + subnetwork: "frontend" + network_enableTcp: true + network_tcpSourceRanges: "0.0.0.0/0" + network_enableGwNetwork: true + network_gwNetworkSourceRanges: "0.0.0.0/0" + network_enableIcmp: true + network_icmpSourceRanges: "0.0.0.0/0" + network_enableUdp: true + network_udpSourceRanges: "0.0.0.0/0" + network_enableSctp: false + network_sctpSourceRanges: "" + network_enableEsp: false + network_espSourceRanges: "" + externalIP: "Static" + installationType: "R81.10 Gateway only" + smart1CloudToken: "xxxxxxxxxxxxxxxxxxxxxxxx" + diskType: "pd-ssd" + bootDiskSizeGb: 100 + generatePassword: false + allowUploadDownload: true + enableMonitoring: false + shell: "/bin/bash" + instanceSSHKey: "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + sicKey: "xxxxxxxx" + managementGUIClientNetwork: "0.0.0.0/0" + numAdditionalNICs: 1 + additionalNetwork1: "backend-vpc1" + additionalSubnetwork1: "backend1" + externalIP1": "None" + additionalNetwork2": "backend-vpc2" + additionalSubnetwork2": "backend2" + externalIP2": "None" + + + + +## Notes +See [sk147032](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk147032) for revision history \ No newline at end of file diff --git a/gcp/deployment-packages/single-payg/c2d_deployment_configuration.json b/gcp/deployment-packages/single-payg/c2d_deployment_configuration.json new file mode 100755 index 00000000..e7f5e013 --- /dev/null +++ b/gcp/deployment-packages/single-payg/c2d_deployment_configuration.json @@ -0,0 +1,7 @@ +{ + "defaultDeploymentType": "SINGLE_VM", + "imageName": "check-point-r8120-gw-payg-single-634-991001611-v20240613", + "projectId": "checkpoint-public", + "templateName": "nonexistent_template", + "useSolutionPackage": "true" +} diff --git a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py new file mode 100755 index 00000000..a5dfbedf --- /dev/null +++ b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py @@ -0,0 +1,475 @@ +# Copyright 2016 Check Point Software LTD. +import common +import default +import images +import password + +GATEWAY = 'checkpoint-gateway' +MANAGEMENT = 'checkpoint-management' + +PROJECT = 'checkpoint-public' +LICENSE = 'payg' +LICENCE_TYPE = 'single' + +VERSIONS = { + 'R81.10': 'r8110', + 'R81.10-GW': 'r8110-gw', + 'R81.20': 'r8120', + 'R81.20-GW': 'r8120-gw' +} + +ADDITIONAL_NETWORK = 'additionalNetwork{}' +ADDITIONAL_SUBNET = 'additionalSubnetwork{}' +ADDITIONAL_EXTERNAL_IP = 'externalIP{}' +MAX_NICS = 8 + +TEMPLATE_NAME = 'single' +TEMPLATE_VERSION = '20240714' + +ATTRIBUTES = { + 'Gateway and Management (Standalone)': { + 'tags': [GATEWAY, MANAGEMENT], + 'description': 'Check Point Security Gateway and Management', + 'canIpForward': True, + }, + 'Management only': { + 'tags': [MANAGEMENT], + 'description': 'Check Point Security Management', + 'canIpForward': False, + }, + 'Gateway only': { + 'tags': [GATEWAY], + 'description': 'Check Point Security Gateway', + 'canIpForward': True, + }, + 'Manual Configuration': { + 'tags': [], + 'description': 'Check Point', + 'canIpForward': True, + } +} + +startup_script = ''' +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py "generatePassword=\\"{generatePassword}\\"" "allowUploadDownload=\\"{allowUploadDownload}\\"" "templateName=\\"{templateName}\\"" "templateVersion=\\"{templateVersion}\\"" "mgmtNIC=\\"{mgmtNIC}\\"" "hasInternet=\\"{hasInternet}\\"" "config_url=\\"{config_url}\\"" "config_path=\\"{config_path}\\"" "installationType=\\"{installationType}\\"" "enableMonitoring=\\"{enableMonitoring}\\"" "shell=\\"{shell}\\"" "computed_sic_key=\\"{computed_sic_key}\\"" "sicKey=\\"{sicKey}\\"" "managementGUIClientNetwork=\\"{managementGUIClientNetwork}\\"" "primary_cluster_address_name=\\"{primary_cluster_address_name}\\"" "secondary_cluster_address_name=\\"{secondary_cluster_address_name}\\"" "managementNetwork=\\"{managementNetwork}\\"" "numAdditionalNICs=\\"{numAdditionalNICs}\\"" "smart1CloudToken=\\"{smart1CloudToken}\\"" "name=\\"{name}\\"" "zone=\\"{zoneConfig}\\"" "region=\\"{region}\\"" "osVersion=\\"{osVersion}\\"" "MaintenanceModePassword=\\"{maintenanceMode}\\""' +''' + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def MakeStaticAddress(vm_name, zone, ifnum=None): + """Creates a static IP address resource; returns it and the natIP.""" + if ifnum: + address_name = set_name_and_truncate(vm_name, + '-address-{}'.format(ifnum)) + else: + address_name = set_name_and_truncate(vm_name, '-address') + address_resource = { + 'name': address_name, + 'type': default.ADDRESS, + 'properties': { + 'name': address_name, + 'region': common.ZoneToRegion(zone), + }, + } + return address_resource, '$(ref.%s.address)' % address_name + + +def make_access_config(resources, vm_name, zone, static, index=None): + name = 'external-address' + if index: + name += '-{}'.format(index) + access_config = { + 'name': name, + 'type': default.ONE_NAT + } + if static: + address_resource, nat_ip = MakeStaticAddress(vm_name, zone, index) + resources.append(address_resource) + access_config['natIP'] = nat_ip + return access_config + + +def create_firewall_rules(prop, net_name, fw_rule_name_prefix, mgmt=False, + uid=''): + firewall_rules = [] + protocols = ['Icmp', 'Udp', 'Tcp', 'Sctp', 'Esp'] + if mgmt: + protocols.remove('Tcp') + for protocol in protocols: + proto = protocol.lower() + source_ranges = prop.get('network' + '_' + proto + 'SourceRanges', '') + protocol_enabled = prop.get('network' + '_enable' + protocol, '') + if protocol_enabled and source_ranges: + firewall_rules.append(make_firewall_rule( + proto, source_ranges, net_name, fw_rule_name_prefix, mgmt, + uid)) + return firewall_rules + + +def make_firewall_rule(protocol, source_ranges, + net_name, fw_rule_name_prefix, mgmt=False, uid=''): + ranges = [] + ranges_list = source_ranges.split(',') + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + fw_rule_name = fw_rule_name_prefix + '-' + protocol + if mgmt: + targetTags = [uid] + else: + targetTags = [GATEWAY] + firewall_rule = { + 'type': default.FIREWALL, + 'name': fw_rule_name, + 'properties': { + 'network': 'global/networks/' + net_name, + 'sourceRanges': ranges, + 'targetTags': targetTags, + 'allowed': [{'IPProtocol': protocol}], + } + } + return firewall_rule + + +def generate_config(context): + """Creates the gateway.""" + prop = context.properties + prop['cloudguardVersion'], _, prop['installationType'] = prop[ + 'installationType'].partition(' ') + if prop['smart1CloudToken'] and prop['installationType'] != 'Gateway only': + raise Exception('Use of Smart-1 Cloud token is allowed only\ + for Gateway development.') + prop['templateName'] = TEMPLATE_NAME + prop['templateVersion'] = TEMPLATE_VERSION + prop['osVersion'] = prop['cloudguardVersion'].replace(".", "") + prop['allowUploadDownload'] = str(prop['allowUploadDownload']).lower() + if not prop['managementGUIClientNetwork'] and prop['installationType'] in { + 'Gateway and Management (Standalone)', 'Management only'}: + raise Exception('Allowed GUI clients are required when installing ' + 'a management server') + for k in ['managementGUIClientNetwork']: + prop.setdefault(k, '') + resources = [] + outputs = [] + network_interfaces = [] + external_ifs = [] + zone = prop['zone'] + deployment = context.env['deployment'] + vm_name = set_name_and_truncate(deployment, '-vm') + access_configs = [] + if prop['externalIP'] != 'None': + access_config = make_access_config(resources, vm_name, zone, + 'Static' == prop['externalIP']) + access_configs.append(access_config) + external_ifs.append(0) + prop['hasInternet'] = 'true' + else: + prop['hasInternet'] = 'false' + network = common.MakeGlobalComputeLink(context, default.NETWORK) + networks = {prop['network']} + network_interface = { + 'network': network, + 'accessConfigs': access_configs, + } + if default.SUBNETWORK in prop: + network_interface['subnetwork'] = common.MakeSubnetworkComputeLink( + context, default.SUBNETWORK) + network_interfaces.append(network_interface) + for ifnum in range(1, prop['numAdditionalNICs'] + 1): + net = prop.get(ADDITIONAL_NETWORK.format(ifnum)) + subnet = prop.get(ADDITIONAL_SUBNET.format(ifnum)) + ext_ip = prop.get(ADDITIONAL_EXTERNAL_IP.format(ifnum)) + if not net or not subnet: + raise Exception( + 'Missing network parameters for interface {}'.format(ifnum)) + if net in networks: + raise Exception('Cannot use network "' + net + '" more than once') + networks.add(net) + net = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], '/global/networks/', net]) + subnet = ''.join([ + default.COMPUTE_URL_BASE, + 'projects/', context.env['project'], + '/regions/', common.ZoneToRegion(zone), '/subnetworks/', subnet]) + network_interface = { + 'network': net, + 'subnetwork': subnet, + } + if 'None' != ext_ip: + external_ifs.append(ifnum) + access_config = make_access_config( + resources, vm_name, zone, 'Static' == ext_ip, ifnum + 1) + access_configs = [access_config] + network_interface['accessConfigs'] = access_configs + if not prop.get('hasInternet') or 'false' == prop['hasInternet']: + prop['hasInternet'] = 'true' + network_interfaces.append(network_interface) + for ifnum in range(prop['numAdditionalNICs'] + 1, MAX_NICS): + prop.pop(ADDITIONAL_NETWORK.format(ifnum), None) + prop.pop(ADDITIONAL_SUBNET.format(ifnum), None) + prop.pop(ADDITIONAL_EXTERNAL_IP.format(ifnum), None) + deployment_config = set_name_and_truncate(deployment, '-config') + prop['config_url'] = ('https://runtimeconfig.googleapis.com/v1beta1/' + + 'projects/' + context.env[ + 'project'] + '/configs/' + deployment_config) + prop['config_path'] = '/'.join(prop['config_url'].split('/')[-4:]) + prop['deployment_config'] = deployment_config + tags = ATTRIBUTES[prop['installationType']]['tags'] + uid = set_name_and_truncate(vm_name, '-' + password.GeneratePassword( + 8, False).lower()) + if prop['installationType'] == 'Gateway only': + prop['cloudguardVersion'] += '-GW' + if not prop.get('sicKey'): + prop['computed_sic_key'] = password.GeneratePassword(12, False) + else: + prop['computed_sic_key'] = prop['sicKey'] + else: + prop['computed_sic_key'] = 'N/A' + outputs.append({ + 'name': 'sicKey', + 'value': prop['computed_sic_key'], + }, ) + if 'gw' in VERSIONS[prop['cloudguardVersion']]: + license_name = "{}-{}".format(LICENSE, LICENCE_TYPE) + else: + license_name = LICENSE + family = '-'.join(['check-point', VERSIONS[prop['cloudguardVersion']], + license_name]) + formatter = common.DefaultFormatter() + gw = { + 'type': default.INSTANCE, + 'name': vm_name, + 'properties': { + 'description': ATTRIBUTES[prop['installationType']]['description'], + 'zone': zone, + 'tags': { + 'items': tags + [uid], + }, + 'machineType': common.MakeLocalComputeLink( + context, default.MACHINETYPE), + 'canIpForward': ATTRIBUTES[ + prop['installationType']]['canIpForward'], + 'networkInterfaces': network_interfaces, + 'disks': [{ + 'autoDelete': True, + 'boot': True, + 'deviceName': common.AutoName( + context.env['name'], default.DISK, 'boot'), + 'initializeParams': { + 'diskType': common.MakeLocalComputeLink( + context, default.DISKTYPE), + 'diskSizeGb': prop['bootDiskSizeGb'], + 'sourceImage': + 'projects/%s/global/images/%s' % ( + PROJECT, images.IMAGES[family]), + }, + 'type': 'PERSISTENT', + }], + 'metadata': { + 'items': [ + { + 'key': 'startup-script', + 'value': formatter.format(startup_script, **prop) + }, + ] + }, + 'serviceAccounts': [{ + 'email': 'default', + 'scopes': [ + 'https://www.googleapis.com/auth/monitoring.write' + ], + }] + } + } + if (prop['externalIP'] != 'None') and ( + 'Manual Configuration' != prop['installationType']): + gw['properties']['serviceAccounts'][0]['scopes'].append( + 'https://www.googleapis.com/auth/cloudruntimeconfig') + resources.append({ + 'name': deployment_config, + 'type': 'runtimeconfig.v1beta1.config', + 'properties': { + 'config': deployment_config, + 'description': ('Holds software readiness status ' + 'for deployment {}').format(deployment), + }, + }) + resources.append({ + 'name': set_name_and_truncate(deployment, '-software'), + 'type': 'runtimeconfig.v1beta1.waiter', + 'metadata': { + 'dependsOn': [], + }, + 'properties': { + 'parent': '$(ref.' + deployment_config + '.name)', + 'waiter': 'software', + 'timeout': '1800s', + 'success': { + 'cardinality': { + 'number': 1, + 'path': 'status/success', + }, + }, + 'failure': { + 'cardinality': { + 'number': 1, + 'path': 'status/failure', + }, + }, + }, + }) + if 'instanceSSHKey' in prop: + gw['properties']['metadata']['items'].append( + { + 'key': 'instanceSSHKey', + 'value': prop['instanceSSHKey'] + } + ) + if prop['generatePassword']: + passwd = password.GeneratePassword(12, False) + gw['properties']['metadata']['items'].append( + { + 'key': 'adminPasswordSourceMetadata', + 'value': passwd + } + ) + else: + passwd = '' + resources.append(gw) + netlist = list(networks) + + if GATEWAY in tags: + for i in range(len(netlist)): + network = netlist[i] + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix) + resources.extend(firewall_rules) + else: + for i in range(len(netlist)): + network = netlist[i] + source_ranges = prop['network_tcpSourceRanges'] + tcp_enabled = prop['network_enableTcp'] + gwNetwork_enabled = prop['network_enableGwNetwork'] + gwNetwork_source_range = prop['network_gwNetworkSourceRanges'] + if source_ranges and not tcp_enabled: + raise Exception( + 'Allowed source IP ranges for TCP traffic are provided ' + 'but TCP not marked as allowed') + if tcp_enabled and not source_ranges: + raise Exception('Allowed source IP ranges for TCP traffic' + ' are required when installing ' + 'a management server') + if not gwNetwork_enabled and gwNetwork_source_range: + raise Exception('Gateway network source IP are provided but ' + 'not marked as allowed.') + if gwNetwork_enabled and not gwNetwork_source_range: + raise Exception('Gateway network source IP is required in' + ' MGMT deployment.') + ranges_list = source_ranges.split(',') + gw_network_list = gwNetwork_source_range.split(',') + ranges = [] + gw_net_ranges = [] + for source_range in ranges_list: + ranges.append(source_range.replace(" ", "")) + for gw_net_range in gw_network_list: + gw_net_ranges.append(gw_net_range.replace(" ", "")) + if tcp_enabled: + if gwNetwork_enabled: + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-gateways-to-management-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(gw_net_ranges + ranges)), + 'sourceTags': [GATEWAY], + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['257', '18191', '18210', '18264'] + }, + ], + } + }) + resources.append({ + 'type': 'compute.v1.firewall', + 'name': set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix(deployment, + network), + '-allow-gui-clients-{}'.format(i + 1)), + 'properties': { + 'network': 'global/networks/' + network, + 'sourceRanges': list(set(ranges)), + 'targetTags': [uid], + 'allowed': [ + { + 'IPProtocol': 'tcp', + 'ports': ['22', '443', '18190', '19009'] + }, + ], + } + }) + fw_rule_name_prefix = set_name_and_truncate( + gen_fw_rule_name_deployment_network_prefix( + deployment, network), + '-allow-all-to-chkp-{}'.format(i + 1)) + firewall_rules = create_firewall_rules( + prop, network, fw_rule_name_prefix, True, uid) + resources.extend(firewall_rules) + outputs += [ + { + 'name': 'deployment', + 'value': deployment + }, + { + 'name': 'project', + 'value': context.env['project'] + }, + { + 'name': 'vmName', + 'value': vm_name, + }, + { + 'name': 'vmId', + 'value': '$(ref.%s.id)' % vm_name, + }, + { + 'name': 'vmSelfLink', + 'value': '$(ref.%s.selfLink)' % vm_name, + }, + { + 'name': 'hasMultiExternalIPs', + 'value': 0 < len(external_ifs) and external_ifs != [0], + }, + { + 'name': 'additionalExternalIPs', + 'value': ', '.join([('$(ref.{}.networkInterfaces[{}].' + + 'accessConfigs[0].natIP)').format( + vm_name, ifnum) for ifnum in external_ifs if ifnum]) + }, + { + 'name': 'vmInternalIP', + 'value': '$(ref.%s.networkInterfaces[0].networkIP)' % vm_name, + }, + { + 'name': 'password', + 'value': passwd + } + ] + return common.MakeResource(resources, outputs) + + +def gen_fw_rule_name_deployment_network_prefix(deployment_name, network_name): + return '{}-{}'. \ + format(deployment_name[:20], network_name[:16]) diff --git a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema new file mode 100755 index 00000000..50f3e9bb --- /dev/null +++ b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema @@ -0,0 +1,353 @@ +imports: + - path: check-point-vsec--payg.py + +info: + version: 1.0 + title: Check Point CloudGuard Network Security - PAYG Template + +required: + - zone + - machineType + - network + - diskType + - bootDiskSizeGb + - installationType + - allowUploadDownload + - shell + - managementGUIClientNetwork + - generatePassword + - enableMonitoring + - numAdditionalNICs + +properties: + zone: + type: string + default: us-central1-a + x-googleProperty: + type: GCE_ZONE + machineType: + type: string + default: n1-standard-4 + x-googleProperty: + type: GCE_MACHINE_TYPE + zoneProperty: zone + gceMachineType: + minCpu: 2 + minRamGb: 1.843000054359436 + network: + type: string + default: default + x-googleProperty: + type: GCE_NETWORK + subnetwork: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: network + network_enableTcp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_tcpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableTcp + network_enableGwNetwork: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_gwNetworkSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableGwNetwork + network_enableIcmp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_icmpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableIcmp + network_enableUdp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_udpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableUdp + network_enableSctp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_sctpSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableSctp + network_enableEsp: + type: boolean + default: False + x-googleProperty: + type: GCE_FIREWALL + gceFirewall: + networkProperty: network + network_espSourceRanges: + type: string + x-googleProperty: + type: GCE_FIREWALL_RANGE + gceFirewallRange: + firewallProperty: network_enableEsp + smart1CloudToken: + type: string + default: '' + diskType: + type: string + default: pd-ssd + x-googleProperty: + type: GCE_DISK_TYPE + zoneProperty: zone + bootDiskSizeGb: + type: integer + maximum: 1000 + default: 100 + minimum: 100 + x-googleProperty: + type: GCE_DISK_SIZE + gceDiskSize: + diskTypeProperty: diskType + installationType: + type: string + default: R81.20 Gateway only + enum: + - R81.10 Gateway only + - R81.10 Manual Configuration + - R81.10 Gateway and Management (Standalone) + - R81.20 Gateway only + - R81.20 Manual Configuration + - R81.20 Gateway and Management (Standalone) + maintenanceMode: + type: string + pattern: ^([a-z0-9A-Z.]{12,300}|)$ + default: '' + allowUploadDownload: + type: boolean + default: True + shell: + type: string + default: /etc/cli.sh + enum: + - /etc/cli.sh + - /bin/bash + - /bin/csh + - /bin/tcsh + generatePassword: + type: boolean + default: False + enableMonitoring: + type: boolean + default: False + sicKey: + type: string + pattern: ^([a-z0-9A-Z]{8,30}|)$ + default: '' + managementGUIClientNetwork: + type: string + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ + externalIP: + type: string + enum: + - Static + - Ephemeral + - None + default: Static + instanceSSHKey: + type: string + pattern: ^([0-9a-z\-]+ +[0-9A-Za-z/\+=]+( .*)?|)$ + default: '' + numAdditionalNICs: + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + minimum: 0 + maximum: 7 + default: 1 + additionalNetwork1: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork1: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork1 + externalIP1: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork2: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork2: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork2 + externalIP2: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork3: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork3: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork3 + externalIP3: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork4: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork4: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork4 + externalIP4: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork5: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork5: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork5 + externalIP5: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork6: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork6: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork6 + externalIP6: + type: string + enum: + - Static + - Ephemeral + - None + default: None + additionalNetwork7: + type: string + x-googleProperty: + type: GCE_NETWORK + additionalSubnetwork7: + type: string + x-googleProperty: + type: GCE_SUBNETWORK + zoneProperty: zone + gceSubnetwork: + networkProperty: additionalNetwork7 + externalIP7: + type: string + enum: + - Static + - Ephemeral + - None + default: None + +outputs: + deployment: + type: string + project: + type: string + vmId: + type: string + vmInternalIP: + type: string + hasMultiExternalIP: + type: boolean + additionalExternalIPs: + type: string + vmName: + type: string + vmSelfLink: + type: string + password: + type: string diff --git a/gcp/deployment-packages/single-payg/common.py b/gcp/deployment-packages/single-payg/common.py new file mode 100755 index 00000000..e123c502 --- /dev/null +++ b/gcp/deployment-packages/single-payg/common.py @@ -0,0 +1,262 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generic simple functions used for python based template generation.""" + +import re +import sys +import traceback +import default +import string + +import yaml + +RFC1035_RE = re.compile(r'^[a-z][-a-z0-9]{1,61}[a-z0-9]{1}$') + + +class Error(Exception): + """Common exception wrapper for template exceptions.""" + pass + + +class DefaultFormatter(string.Formatter): + """Returns default instead of key error when looking for keys. + + Used for startup-script which contains params from multiple deployments + whiles keys from one deployment may not be set in another. + """ + def __init__(self, default=''): + self.default = default + def get_value(self, key, args, dict): + if isinstance(key, str): + return dict.get(key, self.default) + else: + return string.Formatter.get_value(key, args, dict) + + +def set_name_and_truncate(primary, secondary, maxlength=62): + return '%s%s' % (primary[:maxlength - len(secondary)], secondary) + + +def AddDiskResourcesIfNeeded(context): + """Checks context if disk resources need to be added.""" + if default.DISK_RESOURCES in context.properties: + return context.properties[default.DISK_RESOURCES] + else: + return [] + + +def AutoName(base, resource, *args): + """Helper method to generate names automatically based on default.""" + auto_name = '%s-%s' % (base, '-'.join(list(args) + [default.AKA[resource]])) + if not RFC1035_RE.match(auto_name): + raise Error('"%s" name for type %s does not match RFC1035 regex (%s)' % + (auto_name, resource, RFC1035_RE.pattern)) + return auto_name + + +def AutoRef(base, resource, *args): + """Helper method that builds a reference for an auto-named resource.""" + return Ref(AutoName(base, resource, *args)) + + +def OrderedItems(dict_obj): + """Convenient method to yield sorted iteritems of a dictionary.""" + keys = list(dict_obj.keys()) + keys.sort() + for k in keys: + yield (k, dict_obj[k]) + + +def ShortenZoneName(zone): + """Given a string that looks like a zone name, creates a shorter version.""" + geo, coord, number, letter = re.findall(r'(\w+)-(\w+)(\d)-(\w)', zone)[0] + geo = geo.lower() if len(geo) == 2 else default.LOC[geo.lower()] + coord = default.LOC[coord.lower()] + number = str(number) + letter = letter.lower() + return geo + '-' + coord + number + letter + + +def ZoneToRegion(zone): + """Derives the region from a zone name.""" + parts = zone.split('-') + if len(parts) != 3: + raise Error('Cannot derive region from zone "%s"' % zone) + return '-'.join(parts[:2]) + + +def FormatException(message): + """Adds more information to the exception.""" + message = ('Exception Type: %s\n' + 'Details: %s\n' + 'Message: %s\n') % (sys.exc_info()[0], + traceback.format_exc(), message) + return message + + +def Ref(name): + return '$(ref.%s.selfLink)' % name + + +def RefGroup(name): + return '$(ref.%s.instanceGroup)' % name + + +def GlobalComputeLink(project, collection, name): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + collection, '/', name]) + +def GlobalNetworkLink(project, network): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/global/', + default.NETWORKS, '/', network]) + + +def LocalComputeLink(project, zone, key, value): + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/zones/', + zone, '/', key, '/', value]) + + +def ReadContext(context, prop_key): + return (context.env['project'], context.properties.get('zone', None), + context.properties[prop_key]) + + +def MakeLocalComputeLink(context, key, zone=None): + if not zone: + project, zone, value = ReadContext(context, key) + else: + project, _, value = ReadContext(context, key) + + if IsComputeLink(value): + return value + else: + return LocalComputeLink(project, zone, key + 's', value) + + +def MakeGlobalComputeLink(context, key): + project, _, value = ReadContext(context, key) + if IsComputeLink(value): + return value + else: + return GlobalComputeLink(project, key + 's', value) + +def MakeRegionalSubnetworkLink(project, zone, subnet): + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', subnet]) + + +def MakeSubnetworkComputeLink(context, key): + project, zone, value = ReadContext(context, key) + region = ZoneToRegion(zone) + return ''.join([default.COMPUTE_URL_BASE, 'projects/', project, '/regions/', + region, '/subnetworks/', value]) + + +def MakeFQHN(context, name): + return '%s.c.%s.internal' % (name, context.env['project']) + + +# TODO(victorg): Consider moving this method to a different file +def MakeC2DImageLink(name, dev_mode=False): + if IsGlobalProjectShortcut(name) or name.startswith('http'): + return name + else: + if dev_mode: + return 'global/images/%s' % name + else: + return GlobalComputeLink(default.C2D_IMAGES, 'images', name) + + +def IsGlobalProjectShortcut(name): + return name.startswith('projects/') or name.startswith('global/') + + +def IsComputeLink(name): + return (name.startswith(default.COMPUTE_URL_BASE) or + name.startswith(default.REFERENCE_PREFIX)) + + +def GetNamesAndTypes(resources_dict): + return [(d['name'], d['type']) for d in resources_dict] + + +def SummarizeResources(res_dict): + """Summarizes the name of resources per resource type.""" + result = {} + for res in res_dict: + result.setdefault(res['type'], []).append(res['name']) + return result + + +def ListPropertyValuesOfType(res_dict, prop, res_type): + """Lists all the values for a property of a certain type.""" + return [r['properties'][prop] for r in res_dict if r['type'] == res_type] + + +def MakeResource(resource_list, output_list=None): + """Wrapper for a DM template basic spec.""" + content = {'resources': resource_list} + if output_list: + content['outputs'] = output_list + return yaml.dump(content) + + +def TakeZoneOut(properties): + """Given a properties dictionary, removes the zone specific information.""" + + def _CleanZoneUrl(value): + value = value.split('/')[-1] if IsComputeLink(value) else value + return value + + for name in default.VM_ZONE_PROPERTIES: + if name in properties: + properties[name] = _CleanZoneUrl(properties[name]) + if default.ZONE in properties: + properties.pop(default.ZONE) + if default.BOOTDISK in properties: + properties[default.BOOTDISK] = _CleanZoneUrl(properties[default.BOOTDISK]) + if default.DISKS in properties: + for disk in properties[default.DISKS]: + # Don't touch references to other disks + if default.DISK_SOURCE in disk: + continue + if default.INITIALIZEP in disk: + disk_init = disk[default.INITIALIZEP] + if default.DISKTYPE in disk_init: + disk_init[default.DISKTYPE] = _CleanZoneUrl(disk_init[default.DISKTYPE]) + + +def GenerateEmbeddableYaml(yaml_string): + # Because YAML is a space delimited format, we need to be careful about + # embedding one YAML document in another. This function takes in a string in + # YAML format and produces an equivalent YAML representation that can be + # inserted into arbitrary points of another YAML document. It does so by + # printing the YAML string in a single line format. Consistent ordering of + # the string is also guaranteed by using yaml.dump. + yaml_object = yaml.load(yaml_string) + dumped_yaml = yaml.dump(yaml_object, default_flow_style=True) + return dumped_yaml + + +def FormatErrorsDec(func): + """Decorator to format exceptions if they get raised.""" + + def FormatErrorsWrap(context): + try: + return func(context) + except Exception as e: + raise Error(FormatException(e.message)) + + return FormatErrorsWrap diff --git a/gcp/deployment-packages/single-payg/config.yaml b/gcp/deployment-packages/single-payg/config.yaml new file mode 100644 index 00000000..33316f05 --- /dev/null +++ b/gcp/deployment-packages/single-payg/config.yaml @@ -0,0 +1,48 @@ +imports: +- path: check-point-vsec--payg.py +- path: common.py +- path: default.py +- path: password.py +- path: images.py + +resources: +- name: check-point-vsec--payg + type: check-point-vsec--payg.py + properties: + zone: "PLEASE ENTER A ZONE" + machineType: "PLEASE ENTER A MACHINE TYPE" + network: "PLEASE ENTER AN EXTERNAL NETWORK ID" + subnetwork: "PLEASE ENTER A SUBNETWORK ID" + network_enableTcp: "PLEASE ENTER true or false" + network_tcpSourceRanges: "PLEASE ENTER TCP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableIcmp: "PLEASE ENTER true or false" + network_icmpSourceRanges: "PLEASE ENTER ICMP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableUdp: "PLEASE ENTER true or false" + network_udpSourceRanges: "PLEASE ENTER UDP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableSctp: "PLEASE ENTER true or false" + network_sctpSourceRanges: "PLEASE ENTER SCTP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + network_enableEsp: "PLEASE ENTER true or false" + network_espSourceRanges: "PLEASE ENTER ESP SOURCE RANGES OR LEAVE EMPTY DOUBLE QUOTES" + externalIP: "PLEASE ENTER AN EXTERNAL IP ADDRESS TYPE" + installationType: "PLEASE ENTER AN INSTALLATION TYPE" + diskType: "PLEASE ENTER A DISK TYPE" + bootDiskSizeGb: "PLEASE ENTER A DISK SIZE" + #Connecting to Smart-1 Cloud is only available for Gateway only installation + smart1CloudToken: "PLEASE ENTER A TOKEN TO CONNECT TO SMART-1 CLOUD OR LEAVE EMPTY DOUBLE QUOTES" + generatePassword: "PLEASE ENTER true or false" + allowUploadDownload: "PLEASE ENTER true or false" + enableMonitoring: "PLEASE ENTER true or false" + shell: "PLEASE ENTER A SHELL" + instanceSSHKey: "PLEASE ENTER A VALID PUBLIC KEY" + sicKey: "PLEASE ENTER A SIC KEY" + managementGUIClientNetwork: "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" + numAdditionalNICs: "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" + #Define additional NICs networks and subnetworks according the defined numAdditionalNICs value + #If there is no need in additional NICs remove additionalNetwork1 and additionalSubnetwork1 variables + additionalNetwork1: "PLEASE ENTER AN ADDITIONAL NETWORK1 ID" + additionalSubnetwork1: "PLEASE ENTER AN ADDITIONAL SUBNETWORK1 ID" +outputs: +- name: "Deployment" + value: $(ref.check-point-vsec--payg.deployment) +- name: "Instance" + value: $(ref.check-point-vsec--payg.vmName) \ No newline at end of file diff --git a/gcp/deployment-packages/single-payg/default.py b/gcp/deployment-packages/single-payg/default.py new file mode 100755 index 00000000..0c7dd919 --- /dev/null +++ b/gcp/deployment-packages/single-payg/default.py @@ -0,0 +1,134 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Convenience module to hold default constants for C2D components. + +There should not be any logic in this module. Its purpose is to simplify +analysis of commonly used GCP and properties names and identify the names +that were custom created for these modules. +""" +# Generic constants +C2D_IMAGES = 'click-to-deploy-images' + +# URL constants +COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' + +# Deployment Manager constructs +REFERENCE_PREFIX = '$(ref.' + +# Commonly used in properties namespace +AUTO_DELETE = 'autoDelete' +BOOTDISK = 'bootDiskType' +BOOTDISKSIZE = 'bootDiskSizeGb' +C_IMAGE = 'containerImage' +DC_MANIFEST = 'dcManifest' +DEPLOYMENT = 'DEPLOYMENT' # used in the deployment coordinator +DISK_NAME = 'diskName' +DISK_RESOURCES = 'addedDiskResources' +DISK_SOURCE = 'source' +ENDPOINT_NAME = 'serviceRegistryEndpointName' +FIXED_GCLOUD = 'fixedGcloud' +GENERATED_PROP = 'generatedProperties' +INITIALIZEP = 'initializeParams' +INSTANCE_NAME = 'instanceName' +LOCAL_SSD = 'localSSDs' +MAX_NUM = 'maxNumReplicas' +NETWORKS = 'networks' +NO_SCOPE = 'noScope' +PROVIDE_BOOT = 'provideBoot' +REPLICAS = 'replicas' +SIZE = 'size' +VM_COPIES = 'numberOfVMReplicas' +ZONES = 'zones' + +# Common properties values (only official GCP values allowed here) +EXTERNAL = 'External NAT' +ONE_NAT = 'ONE_TO_ONE_NAT' + +# Common 1st level properties (only official GCP names allowed here) +CAN_IP_FWD = 'canIpForward' +CONTAINER = 'container' +DCKRENV = 'dockerEnv' +DCKRIMAGE = 'dockerImage' +DEFAULT_SERVICE = 'defaultService' +DEVICE_NAME = 'deviceName' +DISKS = 'disks' +DISK_SIZE = 'diskSizeGb' +DISKTYPE = 'diskType' +HEALTH_PATH = 'healthPath' +HOST_RULES = 'hostRules' +IP_PROTO = 'IPProtocol' +MACHINETYPE = 'machineType' +METADATA = 'metadata' +NAME = 'name' +NETWORK = 'network' +NETWORKS = 'networks' +SUBNETWORK = 'subnetwork' +PATH_MATCHERS = 'pathMatchers' +PORT = 'port' +PROJECT = 'project' +SERVICE = 'service' +SERVICE_ACCOUNTS = 'serviceAccounts' +SRCIMAGE = 'sourceImage' +SRC_RANGES = 'sourceRanges' +TAGS = 'tags' +TYPE = 'type' +VM_TEMPLATE = 'instanceTemplate' +ZONE = 'zone' + +# Zone specfic VM properties +VM_ZONE_PROPERTIES = [DISKTYPE, MACHINETYPE, BOOTDISK] + +# Resource type defaults names +ADDRESS = 'compute.v1.address' +AUTOSCALER = 'compute.v1.autoscaler' +BACKEND_SERVICE = 'compute.v1.backendService' +DISK = 'compute.v1.disk' +ENDPOINT = 'serviceregistry.v1alpha.endpoint' +FIREWALL = 'compute.v1.firewall' +GF_RULE = 'compute.v1.globalForwardingRule' +HEALTHCHECK = 'compute.v1.httpHealthCheck' +IGM = 'compute.v1.instanceGroupManager' +INSTANCE = 'compute.v1.instance' +PROXY = 'compute.v1.targetHttpProxy' +TEMPLATE = 'compute.v1.instanceTemplate' +REGION_IGM = 'compute.v1.regionInstanceGroupManager' +REGION_AUTOSCALER = 'compute.v1.regionAutoscaler' +URL_MAP = 'compute.v1.urlMap' +VPC='compute.v1.network' +VPC_SUBNET='compute.v1.subnetwork' + +# Also Known As constants +AKA = { + TEMPLATE: 'tmplt', + AUTOSCALER: 'as', + BACKEND_SERVICE: 'bes', + DISK: 'disk', + FIREWALL: 'fwall', + GF_RULE: 'ip', + HEALTHCHECK: 'hc', + INSTANCE: 'vm', + PROXY: 'tproxy', + IGM: 'igm', + URL_MAP: 'umap', +} + +LOC = { + 'europe': 'eu', + 'asia': 'as', + 'central': 'c', + 'east': 'e', + 'west': 'w', + 'north': 'n', + 'south': 's', +} diff --git a/gcp/deployment-packages/single-payg/images.py b/gcp/deployment-packages/single-payg/images.py new file mode 100755 index 00000000..7b04bee0 --- /dev/null +++ b/gcp/deployment-packages/single-payg/images.py @@ -0,0 +1,34 @@ +IMAGES = { + "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", + "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", + "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", + "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", + "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", + "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", + "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", + "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", + "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", + "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", + "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", + "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" +} \ No newline at end of file diff --git a/gcp/deployment-packages/single-payg/password.py b/gcp/deployment-packages/single-payg/password.py new file mode 100755 index 00000000..273210a6 --- /dev/null +++ b/gcp/deployment-packages/single-payg/password.py @@ -0,0 +1,135 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A DM template that generates password as an output, namely "password". + +An example YAML showing how this template can be used: + resources: + - name: generated-password + type: password.py + properties: + length: 8 + includeSymbols: true + - name: main-template + type: main-template.jinja + properties: + password: $(ref.generated-password.password) + +Input properties to this template: + - length: the length of the generated password. At least 8. Default 8. + - includeSymbols: true/false whether to include symbol chars. Default false. + +The generated password satisfies the following requirements: + - The length is as specified, + - Containing letters and numbers, and optionally symbols if specified, + - Starting with a letter, + - Containing characters from at least 3 of the 4 categories: uppercases, + lowercases, numbers, and symbols. + +""" + +import random +import yaml + +PROPERTY_LENGTH = 'length' +PROPERTY_INCLUDE_SYMBOLS = 'includeSymbols' + +# Note the omission of some hard to distinguish characters like I, l, 0, and O. +UPPERS = 'ABCDEFGHJKLMNPQRSTUVWXYZ' +LOWERS = 'abcdefghijkmnopqrstuvwxyz' +ALPHABET = UPPERS + LOWERS +DIGITS = '123456789' +ALPHANUMS = ALPHABET + DIGITS +# Including only symbols that can be passed around easily in shell scripts. +SYMBOLS = '*-+.' + +CANDIDATES_WITH_SYMBOLS = ALPHANUMS + SYMBOLS +CANDIDATES_WITHOUT_SYMBOLS = ALPHANUMS + +CATEGORIES_WITH_SYMBOLS = [UPPERS, LOWERS, DIGITS, SYMBOLS] +CATEGORIES_WITHOUT_SYMBOLS = [UPPERS, LOWERS, DIGITS] + +MIN_LENGTH = 8 + + +class InputError(Exception): + """Raised when input properties are unexpected.""" + + +def GenerateConfig(context): + """Entry function to generate the DM config.""" + props = context.properties + length = props.setdefault(PROPERTY_LENGTH, MIN_LENGTH) + include_symbols = props.setdefault(PROPERTY_INCLUDE_SYMBOLS, False) + + if not isinstance(include_symbols, bool): + raise InputError('%s must be a boolean' % PROPERTY_INCLUDE_SYMBOLS) + + content = { + 'resources': [], + 'outputs': [{ + 'name': 'password', + 'value': GeneratePassword(length, include_symbols) + }] + } + return yaml.dump(content) + + +def GeneratePassword(length=8, include_symbols=False): + """Generates a random password.""" + if length < MIN_LENGTH: + raise InputError('Password length must be at least %d' % MIN_LENGTH) + + candidates = (CANDIDATES_WITH_SYMBOLS if include_symbols + else CANDIDATES_WITHOUT_SYMBOLS) + categories = (CATEGORIES_WITH_SYMBOLS if include_symbols + else CATEGORIES_WITHOUT_SYMBOLS) + + # Generates up to the specified length minus the number of categories. + # Then inserts one character for each category, ensuring that the character + # satisfy the category if the generated string hasn't already. + generated = ([random.choice(ALPHABET)] + + [random.choice(candidates) + for _ in range(length - 1 - len(categories))]) + for category in categories: + _InsertAndEnsureSatisfaction(generated, category, candidates) + return ''.join(generated) + + +def _InsertAndEnsureSatisfaction(generated, required, all_candidates): + """Inserts 1 char into generated, satisfying required if not already. + + If the required characters are not already in the generated string, one will + be inserted. If any required character is already in the generated string, a + random character from all_candidates will be inserted. The insertion happens + at a random location but not at the beginning. + + Args: + generated: the string to be modified. + required: list of required characters to check for. + all_candidates: list of characters to choose from if the required characters + are already satisfied. + """ + if set(generated).isdisjoint(required): + # Not yet satisfied. Insert a required candidate. + _InsertInto(generated, required) + else: + # Already satisfied. Insert any candidate. + _InsertInto(generated, all_candidates) + + +def _InsertInto(generated, candidates): + """Inserts a random candidate into a random non-zero index of generated.""" + # Avoids inserting at index 0, since the first character follows its own rule. + generated.insert(random.randint(1, len(generated) - 1), + random.choice(candidates)) diff --git a/terraform/.gitattributes b/terraform/.gitattributes new file mode 100644 index 00000000..526c8a38 --- /dev/null +++ b/terraform/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf \ No newline at end of file diff --git a/terraform/.gitignore b/terraform/.gitignore new file mode 100644 index 00000000..c4bd74d9 --- /dev/null +++ b/terraform/.gitignore @@ -0,0 +1,14 @@ +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log + +# JSON files under terraform/gcp/ directory +gcp/*.json + +.idea diff --git a/terraform/LICENSE b/terraform/LICENSE new file mode 100644 index 00000000..35088bb5 --- /dev/null +++ b/terraform/LICENSE @@ -0,0 +1,199 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/terraform/alicloud/cluster-master/README.md b/terraform/alicloud/cluster-master/README.md new file mode 100755 index 00000000..8c16dc10 --- /dev/null +++ b/terraform/alicloud/cluster-master/README.md @@ -0,0 +1,174 @@ +# Check Point CloudGuard Network Security Cluster Master Terraform module for AliCloud + +Terraform module which deploys a Check Point CloudGuard Network Security Cluster into a new VPC. + +These types of Terraform resources are supported: +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/alicloud/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/alicloud/r/eip.html) - conditional creation +* [Route_entry](https://www.terraform.io/docs/providers/alicloud/r/route_entry.html) - Internal default route: conditional creation +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - Gateway Instances +* [RAM Role](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ram_role) + +## Note +- Make sure your region and zone are supporting the gateway instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration + +- Due to a terraform limitation, apply command is: +``` +terraform apply -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform apply +``` +>Once terraform is updated, we will update accordingly. + +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` + +## Usage +- Fill all variables in the cluster-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform plan +- Create or modify the deployment: + terraform apply -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform apply + +### terraform.tfvars variables: + +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_name | (Optional) The name of the VPC | string | n/a | "cp-vpc" | no | +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| cluster_vswitchs_map | A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| management_vswitchs_map | A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_vswitchs_map | A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| vswitchs_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value of 4, the resulting vswitch address will have length /20. | number | n/a | n/a | yes | +| gateway_name | (optional) The name tag of the Cluster's Security Gateway instances | string | n/a | "Check-Point-Cluster-tf" | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - ecs.g5ne.large
- ecs.g5ne.xlarge
- ecs.g5ne.2xlarge
- ecs.g5ne.4xlarge
- ecs.g5ne.8xlarge
- ecs.g7ne.large
- ecs.g7ne.xlarge
- ecs.g7ne.2xlarge
- ecs.g7ne.4xlarge
- ecs.g7ne.8xlarge | "ecs.g5ne.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to TRUE, an elastic IP will be allocated and associated with each cluster member, in addition to the cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | +| ram_role_name | A predefined RAM role name to attach to the cluster's security gateway instances | string | n/a | "" | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances | map(string) | n/a | {} | no | +| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | +| gateway_password_hash | (optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| management_ip_address | (Optional) The Security Management IP address (public or private IP address). If provided, a static-route [management_ip --> via eth1] will be added to the Cluster's Security Gateway instances. If not provided, the static-route will need to be added manually post-deployment by user | string | n/a | "" | no | +| resources_tag_name | (optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | + +## Example for terraform.tfvars + +``` +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +cluster_vswitchs_map = { + "us-east-1a" = 1 +} +management_vswitchs_map = { + "us-east-1a" = 2 +} +private_vswitchs_map = { + "us-east-1a" = 3 +} +vswitchs_bit_length = 8 + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "ecs.g5ne.large" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +management_ip_address = "1.2.3.4" +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +``` +## Conditional creation +- To create an Elastic IP for each Cluster member and associate it to the Security Gateway instances: +``` +allocate_and_associate_eip = true +``` +- To create a cluster RAM role for your Cluster instances with the required permissions for Cluster behavior, leave the ram_role_name variable empty: +``` +ram_role_name = "" +``` + +## Outputs +| Name | Description | +|----------------------------------|------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| internal_rt_id | The internal route table id id | +| vpc_cluster_vswitchs_ids_list | A list of the cluster vswitchs ids | +| vpc_management_vswitchs_ids_list | A list of the management vswitchs ids | +| vpc_private_vswitchs_ids_list | A list of the private vswitchs ids | +| image_id | The image id of the deployed Security Gateways | +| cluster_primary_EIP | Cluster Primary EIP | +| cluster_secondary_EIP | Cluster secondary EIP | +| member_a_EIP | Member A instance EIP | +| member_b_EIP | Member B instance EIP | +| member_a_instance_id | Member A instance id | +| member_b_instance_id | Member B instance id | +| member_a_instance_name | Member A instance name | +| member_b_instance_name | Member B instance name | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group name | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230329 | First release of R81.20 & R81.10 CloudGuard Gateway Terraform deployment in Alibaba Cloud and added support for g7ne instance type. | +| 20211011 | First release of Check Point CloudGuard Cluster Terraform deployment into a new VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/terraform/alicloud/cluster-master/locals.tf b/terraform/alicloud/cluster-master/locals.tf new file mode 100755 index 00000000..58775cec --- /dev/null +++ b/terraform/alicloud/cluster-master/locals.tf @@ -0,0 +1,28 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" +} \ No newline at end of file diff --git a/terraform/alicloud/cluster-master/main.tf b/terraform/alicloud/cluster-master/main.tf new file mode 100755 index 00000000..41bb165d --- /dev/null +++ b/terraform/alicloud/cluster-master/main.tf @@ -0,0 +1,53 @@ +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_name = var.vpc_name + vpc_cidr = var.vpc_cidr + public_vswitchs_map = var.cluster_vswitchs_map + management_vswitchs_map = var.management_vswitchs_map + private_vswitchs_map = var.private_vswitchs_map + vswitchs_bit_length = var.vswitchs_bit_length +} + +resource "alicloud_route_table" "private_vswitch_rt" { + depends_on = [module.launch_vpc] + route_table_name = "Internal_Route_Table" + vpc_id = module.launch_vpc.vpc_id +} +resource "alicloud_route_table_attachment" "private_rt_to_private_vswitchs" { + depends_on = [module.launch_vpc, alicloud_route_table.private_vswitch_rt] + route_table_id = alicloud_route_table.private_vswitch_rt.id + vswitch_id = module.launch_vpc.private_vswitchs_ids_list[0] +} + +module "launch_cluster_into_vpc" { + source = "../cluster" + + vpc_id = module.launch_vpc.vpc_id + cluster_vswitch_id = module.launch_vpc.public_vswitchs_ids_list[0] + mgmt_vswitch_id = module.launch_vpc.management_vswitchs_ids_list[0] + private_vswitch_id = module.launch_vpc.private_vswitchs_ids_list[0] + private_route_table = alicloud_route_table.private_vswitch_rt.id + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + disk_category = var.disk_category + ram_role_name = var.ram_role_name + instance_tags = var.instance_tags + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + management_ip_address = var.management_ip_address + memberAToken = var.memberAToken + memberBToken = var.memberBToken + resources_tag_name = var.resources_tag_name + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp +} \ No newline at end of file diff --git a/terraform/alicloud/cluster-master/output.tf b/terraform/alicloud/cluster-master/output.tf new file mode 100755 index 00000000..25347ba0 --- /dev/null +++ b/terraform/alicloud/cluster-master/output.tf @@ -0,0 +1,48 @@ +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "internal_rt_id" { + value = alicloud_route_table.private_vswitch_rt.id +} +output "vpc_cluster_vswitchs_ids_list" { + value = module.launch_vpc.public_vswitchs_ids_list +} +output "vpc_management_vswitchs_ids_list" { + value = module.launch_vpc.management_vswitchs_ids_list +} +output "vpc_private_vswitchs_ids_list" { + value = module.launch_vpc.private_vswitchs_ids_list +} +output "image_id" { + value = module.launch_cluster_into_vpc.image_id +} +output "cluster_primary_EIP" { + value = module.launch_cluster_into_vpc.cluster_primary_EIP +} +output "cluster_secondary_EIP" { + value = module.launch_cluster_into_vpc.cluster_secondary_EIP +} +output "member_a_EIP" { + value = module.launch_cluster_into_vpc.member_a_EIP +} +output "member_b_EIP" { + value = module.launch_cluster_into_vpc.member_b_EIP +} +output "member_a_instance_id" { + value = module.launch_cluster_into_vpc.member_a_instance_id +} +output "member_b_instance_id" { + value = module.launch_cluster_into_vpc.member_b_instance_id +} +output "member_a_instance_name" { + value = module.launch_cluster_into_vpc.member_a_instance_name +} +output "member_b_instance_name" { + value = module.launch_cluster_into_vpc.member_b_instance_name +} +output "permissive_sg_id" { + value = module.launch_cluster_into_vpc.permissive_sg_id +} +output "permissive_sg_name" { + value = module.launch_cluster_into_vpc.permissive_sg_name +} \ No newline at end of file diff --git a/terraform/alicloud/cluster-master/terraform.tfvars b/terraform/alicloud/cluster-master/terraform.tfvars new file mode 100755 index 00000000..42dd5743 --- /dev/null +++ b/terraform/alicloud/cluster-master/terraform.tfvars @@ -0,0 +1,47 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +cluster_vswitchs_map = { + "us-east-1a" = 1 +} +management_vswitchs_map = { + "us-east-1a" = 2 +} +private_vswitchs_map = { + "us-east-1a" = 3 +} +vswitchs_bit_length = 8 + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "ecs.g5ne.large" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +management_ip_address = "1.2.3.4" +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" diff --git a/terraform/alicloud/cluster-master/variables.tf b/terraform/alicloud/cluster-master/variables.tf new file mode 100755 index 00000000..c20366aa --- /dev/null +++ b/terraform/alicloud/cluster-master/variables.tf @@ -0,0 +1,150 @@ +// --- VPC Network Configuration --- +variable "vpc_name" { + type = string + description = "The name of the VPC" + default = "cp-vpc" +} +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "cluster_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "management_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " +} +variable "private_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " +} +variable "vswitchs_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value is 4, the resulting vswitch address will have length /20" +} + +// --- ECS Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Cluster's Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" +default = "ecs.g5ne.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instances" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to TRUE, an elastic IP will be allocated and associated with each cluster member, in addition to the cluster Elastic IP" +default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" +default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_efficiency" +} +variable "ram_role_name" { + type = string + description = "A predefined RAM role name to attach to the cluster's security gateway instances" + default = "" +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances" +default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" +default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash)" +default = "" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +// --- Advanced Settings --- +variable "management_ip_address" { + type = string + description = "(Optional) The Security Management IP address (public or private IP address). If provided, a static-route [management_ip --> via eth1] will be added to the Cluster's Security Gateway instances. If not provided, the static-route will need to be added manually post-deployment by user" + default = "" +} +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" +default = true +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/cluster-master/versions.tf b/terraform/alicloud/cluster-master/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/cluster-master/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/cluster/README.md b/terraform/alicloud/cluster/README.md new file mode 100755 index 00000000..a703b75c --- /dev/null +++ b/terraform/alicloud/cluster/README.md @@ -0,0 +1,158 @@ +# Check Point CloudGuard Network Security Cluster Terraform module for AliCloud + +Terraform module which deploys a Check Point CloudGuard Network Security Cluster into an existing VPC. + +These types of Terraform resources are supported: +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/alicloud/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/alicloud/r/eip.html) - conditional creation +* [Route_entry](https://www.terraform.io/docs/providers/alicloud/r/route_entry.html) - Internal default route: conditional creation +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - Gateway Instances +* [RAM Role](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ram_role) + +## Note +- Make sure your region and zone are supporting the gateway instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` + +## Usage +- Fill all variables in the cluster/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan +- Create or modify the deployment: + terraform apply + + +### terraform.tfvars variables: +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| cluster_vswitch_id | The cluster vswitch of the security gateways | string | Subnet in the same availability zone with mgmt_vswitch_id and private_vswitch_id | n/a | yes | +| mgmt_vswitch_id | The management vswitch of the security gateways Connect the Security Gateways to the Management Server with the ENI in this vswitch. | string | Subnet in the same availability zone with cluster_vswitch_id and private_vswitch_id | n/a | yes | +| private_vswitch_id | The private vswitch of the security gateways | string | Subnet in the same availability zone with cluster_vswitch_id and mgmt_vswitch_id | n/a | yes | +| private_route_table | (optional) Sets '0.0.0.0/0' route to the Active Cluster member instance in the specified route table (e.g. vtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Gateway, this requires manual configuration in the Route Table. | string | n/a | "" | no | +| gateway_name | (optional) The name tag of the Cluster's Security Gateway instances | string | n/a | "Check-Point-Cluster-tf" | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - ecs.g5ne.large
- ecs.g5ne.xlarge
- ecs.g5ne.2xlarge
- ecs.g5ne.4xlarge
- ecs.g5ne.8xlarge
- ecs.g7ne.large
- ecs.g7ne.xlarge
- ecs.g7ne.2xlarge
- ecs.g7ne.4xlarge
- ecs.g7ne.8xlarge | "ecs.g5ne.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to TRUE, an elastic IP will be allocated and associated with each cluster member, in addition to the cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | +| ram_role_name | A predefined RAM role name to attach to the cluster's security gateway instances | string | n/a | "" | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances | map(string) | n/a | {} | no | +| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | +| gateway_password_hash | (optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| management_ip_address | (Optional) The Security Management IP address (public or private IP address). If provided, a static-route [management_ip --> via eth1] will be added to the Cluster's Security Gateway instances. If not provided, the static-route will need to be added manually post-deployment by user | string | n/a | "" | no | +| resources_tag_name | (optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (optional) The host name will be appended with member-a/b accordingly | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | + +## Example for terraform.tfvars +``` +// --- VPC Network Configuration --- +vpc_id = "vpc-" +cluster_vswitch_id = "vsw-" +mgmt_vswitch_id = "vsw-" +private_vswitch_id = "vsw-" +private_route_table = "vtb-" + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +management_ip_address = "1.2.3.4" +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +``` + +## Conditional creation +- To create an Elastic IP for each Cluster member and associate it to the Security Gateway instances: +``` +allocate_and_associate_eip = true +``` +- To create a default route to the Active Cluster member, fill the private_route_table variable: +``` +private_route_table = "rtb-12345678" +``` +- To create a cluster RAM role for your Cluster instances with the required permissions for Cluster behavior, leave the ram_role_name variable empty: +``` +ram_role_name = "" +``` + +## Outputs +| Name | Description | +|------------------------|------------------------------------------------| +| cluster_primary_EIP | Cluster Primary EIP | +| cluster_secondary_EIP | Cluster secondary EIP | +| image_id | The image id of the deployed Security Gateways | +| member_a_EIP | Member A instance EIP | +| member_b_EIP | Member B instance EIP | +| member_a_instance_id | Member A instance id | +| member_b_instance_id | Member B instance id | +| member_a_instance_name | Member A instance name | +| member_b_instance_name | Member B instance name | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group name | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230329 | First release of R81.20 & R81.10 CloudGuard Gateway Terraform deployment in Alibaba Cloud and added support for g7ne instance type. | +| 20211011 | First release of Check Point CloudGuard Cluster Terraform deployment into an existing VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/alicloud/cluster/cluster_member_a_userdata.yaml b/terraform/alicloud/cluster/cluster_member_a_userdata.yaml new file mode 100644 index 00000000..534d8e42 --- /dev/null +++ b/terraform/alicloud/cluster/cluster_member_a_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenA}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/alicloud/cluster/cluster_member_b_userdata.yaml b/terraform/alicloud/cluster/cluster_member_b_userdata.yaml new file mode 100644 index 00000000..43c69a99 --- /dev/null +++ b/terraform/alicloud/cluster/cluster_member_b_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"{OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenB}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/alicloud/cluster/locals.tf b/terraform/alicloud/cluster/locals.tf new file mode 100755 index 00000000..89314651 --- /dev/null +++ b/terraform/alicloud/cluster/locals.tf @@ -0,0 +1,46 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + regex_token_valid = "(^https://(.+).checkpoint.com/app/maas/api/v1/tenant(.+)|^$)" + //TokenA: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenA = split(" ", var.memberAToken) + tokenA_decode = base64decode(element(local.split_tokenA, length(local.split_tokenA)-1)) + regex_tokenA = regex(local.regex_token_valid, local.tokenA_decode) == local.tokenA_decode ? 0 : "Smart-1 Cloud token A is invalid format" + + //TokenB: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenB = split(" ", var.memberBToken) + tokenB_decode = base64decode(element(local.split_tokenB, length(local.split_tokenB)-1)) + regex_tokenB = regex(local.regex_token_valid, local.tokenB_decode) == local.tokenB_decode ? 0 : "Smart-1 Cloud token B is invalid format" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + + // Create RAM Role only if input variable ram_role_name was not provided + create_ram_role = var.ram_role_name == "" ? 1 : 0 + version_split = element(split("-", var.gateway_version), 0) + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_SICkey_base64 = base64encode(var.gateway_SICKey) + gateway_password_hash_base64 = base64encode(var.gateway_password_hash) +} \ No newline at end of file diff --git a/terraform/alicloud/cluster/main.tf b/terraform/alicloud/cluster/main.tf new file mode 100755 index 00000000..5fa001d6 --- /dev/null +++ b/terraform/alicloud/cluster/main.tf @@ -0,0 +1,178 @@ +module "images" { + source = "../modules/images" + + version_license = var.gateway_version + chkp_type = "gateway" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name +} + +// Instances +resource "alicloud_instance" "member-a-instance" { + instance_name = format("%s-Member-A", var.gateway_name) + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.images.image_id + vswitch_id = var.cluster_vswitch_id + security_groups = [ + module.common_permissive_sg.permissive_sg_id] + system_disk_size = var.volume_size + system_disk_category = var.disk_category + + tags = merge({ + Name = format("%s-Member-A", var.gateway_name) + }, var.instance_tags) + + user_data = templatefile("${path.module}/cluster_member_a_userdata.yaml", { + // script's arguments + Hostname = format("%s-member-a", var.gateway_hostname), + PasswordHash = local.gateway_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenA = var.memberAToken, + ManagementIpAddress = var.management_ip_address, + OsVersion = local.version_split + }) +} +resource "alicloud_instance" "member-b-instance" { + instance_name = format("%s-Member-B", var.gateway_name) + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.images.image_id + vswitch_id = var.cluster_vswitch_id + security_groups = [ + module.common_permissive_sg.permissive_sg_id] + system_disk_size = var.volume_size + system_disk_category = var.disk_category + + tags = merge({ + Name = format("%s-Member-B", var.gateway_name) + }, var.instance_tags) + + user_data = templatefile("${path.module}/cluster_member_b_userdata.yaml", { + // script's arguments + Hostname = format("%s-member-b", var.gateway_hostname), + PasswordHash = local.gateway_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenB = var.memberBToken, + ManagementIpAddress = var.management_ip_address, + OsVersion = local.version_split + }) +} + +// Management ENIs +resource "alicloud_network_interface" "member_a_mgmt_eni" { + network_interface_name = format("%s-Member-A-management-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + vswitch_id = var.mgmt_vswitch_id + security_group_ids = [ + module.common_permissive_sg.permissive_sg_id] + description = "eth2" +} +resource "alicloud_network_interface_attachment" "member_a_mgmt_eni_attachment" { + instance_id = alicloud_instance.member-a-instance.id + network_interface_id = alicloud_network_interface.member_a_mgmt_eni.id +} +resource "alicloud_network_interface" "member_b_mgmt_eni" { + network_interface_name = format("%s-Member-B-management-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + vswitch_id = var.mgmt_vswitch_id + security_group_ids = [ + module.common_permissive_sg.permissive_sg_id] + description = "eth2" +} +resource "alicloud_network_interface_attachment" "member_b_mgmt_eni_attachment" { + instance_id = alicloud_instance.member-b-instance.id + network_interface_id = alicloud_network_interface.member_b_mgmt_eni.id +} + +// Internal ENIs +resource "alicloud_network_interface" "member_a_internal_eni" { + depends_on = [alicloud_network_interface_attachment.member_a_mgmt_eni_attachment] + network_interface_name = format("%s-Member-A-internal-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + vswitch_id = var.private_vswitch_id + security_group_ids = [ + module.common_permissive_sg.permissive_sg_id] + description = "eth2" +} +resource "alicloud_network_interface_attachment" "member_a_internal_eni_attachment" { + instance_id = alicloud_instance.member-a-instance.id + network_interface_id = alicloud_network_interface.member_a_internal_eni.id +} +resource "alicloud_network_interface" "member_b_internal_eni" { + depends_on = [alicloud_network_interface_attachment.member_b_mgmt_eni_attachment] + network_interface_name = format("%s-Member-B-internal-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + vswitch_id = var.private_vswitch_id + security_group_ids = [ + module.common_permissive_sg.permissive_sg_id] + description = "eth2" +} +resource "alicloud_network_interface_attachment" "member_b_internal_eni_attachment" { + instance_id = alicloud_instance.member-b-instance.id + network_interface_id = alicloud_network_interface.member_b_internal_eni.id +} + +// EIPs +module "common_cluster_primary_eip" { + source = "../modules/common/elastic_ip" + + allocate_and_associate_eip = true + instance_id = alicloud_instance.member-a-instance.id + eip_name = format("%s-cluster-primary-eip", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) +} +module "common_cluster_secondary_eip" { + source = "../modules/common/elastic_ip" + + allocate_and_associate_eip = true + instance_id = alicloud_instance.member-b-instance.id + eip_name = format("%s-cluster-secondary-eip", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) +} +module "common_member_a_mgmt_eip" { + source = "../modules/common/elastic_ip" + + allocate_and_associate_eip = var.allocate_and_associate_eip + instance_id = alicloud_network_interface.member_a_mgmt_eni.id + association_instance_type = "NetworkInterface" + eip_name = format("%s-member-A-eip", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) +} +module "common_member_b_mgmt_eip" { + source = "../modules/common/elastic_ip" + + allocate_and_associate_eip = var.allocate_and_associate_eip + instance_id = alicloud_network_interface.member_b_mgmt_eni.id + association_instance_type = "NetworkInterface" + eip_name = format("%s-member-B-eip", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) +} + +module "common_internal_default_route" { + source = "../modules/common/internal_default_route" + + private_route_table = var.private_route_table + internal_eni_id = alicloud_network_interface.member_a_internal_eni.id +} + +module "cluster_ram_role" { + count = local.create_ram_role + source = "../modules/cluster-ram-role" + + gateway_name = var.gateway_name +} + +resource "alicloud_ram_role_attachment" "attach" { + depends_on = [alicloud_instance.member-a-instance, alicloud_instance.member-b-instance] + role_name = var.ram_role_name != "" ? var.ram_role_name : module.cluster_ram_role[0].cluster_ram_role_name + instance_ids = [alicloud_instance.member-a-instance.id, alicloud_instance.member-b-instance.id] +} diff --git a/terraform/alicloud/cluster/output.tf b/terraform/alicloud/cluster/output.tf new file mode 100755 index 00000000..623cca8f --- /dev/null +++ b/terraform/alicloud/cluster/output.tf @@ -0,0 +1,33 @@ +output "cluster_primary_EIP" { + value = module.common_cluster_primary_eip.instance_eip_public_ip[0] +} +output "cluster_secondary_EIP" { + value = module.common_cluster_secondary_eip.instance_eip_public_ip[0] +} +output "image_id" { + value = module.images.image_id +} +output "member_a_EIP" { + value = module.common_member_a_mgmt_eip.instance_eip_public_ip[0] +} +output "member_b_EIP" { + value = module.common_member_b_mgmt_eip.instance_eip_public_ip[0] +} +output "member_a_instance_id" { + value = alicloud_instance.member-a-instance.id +} +output "member_b_instance_id" { + value = alicloud_instance.member-b-instance.id +} +output "member_a_instance_name" { + value = alicloud_instance.member-a-instance.instance_name +} +output "member_b_instance_name" { + value = alicloud_instance.member-b-instance.instance_name +} +output "permissive_sg_id" { + value = module.common_permissive_sg.permissive_sg_id +} +output "permissive_sg_name" { + value = module.common_permissive_sg.permissive_sg_name +} \ No newline at end of file diff --git a/terraform/alicloud/cluster/terraform.tfvars b/terraform/alicloud/cluster/terraform.tfvars new file mode 100755 index 00000000..35d0209a --- /dev/null +++ b/terraform/alicloud/cluster/terraform.tfvars @@ -0,0 +1,40 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-" +cluster_vswitch_id = "vsw-" +mgmt_vswitch_id = "vsw-" +private_vswitch_id = "vsw-" +private_route_table = "vtb-" + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +management_ip_address = "1.2.3.4" +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" \ No newline at end of file diff --git a/terraform/alicloud/cluster/variables.tf b/terraform/alicloud/cluster/variables.tf new file mode 100755 index 00000000..51042420 --- /dev/null +++ b/terraform/alicloud/cluster/variables.tf @@ -0,0 +1,144 @@ +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "cluster_vswitch_id" { + type = string + description = "The cluster vswitch of the security gateways" +} +variable "mgmt_vswitch_id" { + type = string + description = "The management vswitch of the security gateways" +} +variable "private_vswitch_id" { + type = string + description = "The private vswitch of the security gateways" +} +variable "private_route_table" { + type = string + description = "(Optional) Sets '0.0.0.0/0' route to the Active Cluster member instance in the specified route table (e.g. vtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Gateway, this requires manual configuration in the Route Table" + default="" +} + +// --- ECS Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Cluster's Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "ecs.g5ne.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instances" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to TRUE, an elastic IP will be allocated and associated with each cluster member, in addition to the cluster Elastic IP" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_efficiency" +} +variable "ram_role_name" { + type = string + description = "A predefined RAM role name to attach to the cluster's security gateway instances" + default = "" +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances" + default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash)" + default = "" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +// --- Advanced Settings --- +variable "management_ip_address" { + type = string + description = "(Optional) The Security Management IP address (public or private IP address). If provided, a static-route [management_ip --> via eth1] will be added to the Cluster's Security Gateway instances. If not provided, the static-route will need to be added manually post-deployment by user" + default = "" +} +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/cluster/versions.tf b/terraform/alicloud/cluster/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/cluster/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/gateway-master/README.md b/terraform/alicloud/gateway-master/README.md new file mode 100755 index 00000000..301c12a6 --- /dev/null +++ b/terraform/alicloud/gateway-master/README.md @@ -0,0 +1,155 @@ +# Check Point Gateway Master Terraform module for AliCloud + +Terraform module which deploys a Check Point Security Gateway into a new VPC on AliCloud. + +These types of Terraform resources are supported: +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/alicloud/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/alicloud/r/eip.html) - conditional creation +* [Route_entry](https://www.terraform.io/docs/providers/alicloud/r/route_entry.html) - Internal default route: conditional creation +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - Gateway Instance + +## Note +- Make sure your region and zone are supporting the gateway instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration + +- Due to a terraform limitation, apply command is: +``` +terraform apply -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform apply +``` +>Once terraform is updated, we will update accordingly. + +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` + +## Usage +- Fill all variables in the gateway-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform plan +- Create or modify the deployment: + terraform apply -target=alicloud_route_table.private_vswitch_rt -auto-approve && terraform apply + +### terraform.tfvars variables: + +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_name | (Optional) The name of the VPC | string | n/a | "cp-vpc" | no | +| vpc_cidr | The CIDR block of the VPC. | string | n/a | n/a | yes | +| public_vswitchs_map | A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_vswitchs_map | A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| vswitchs_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value of 4, the resulting vswitch address will have length /20. | number | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateway instances (optional) | string | n/a | "Check-Point-Gateway-tf" | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - ecs.g5ne.large
- ecs.g5ne.xlarge
- ecs.g5ne.2xlarge
- ecs.g5ne.4xlarge
- ecs.g5ne.8xlarge
- ecs.g7ne.large
- ecs.g7ne.xlarge
- ecs.g7ne.2xlarge
- ecs.g7ne.4xlarge
- ecs.g7ne.8xlarge
- ecs.g7nene.large
- ecs.g7nene.xlarge
- ecs.g7nene.2xlarge
- ecs.g7nene.4xlarge
- ecs.g7nene.8xlarge | "ecs.g5ne.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to TRUE, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | +| ram_role_name | A predefined RAM role name to attach to the security gateway instance | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | +| password_hash | Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) (optional) | string | n/a | "" | no | +| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| gateway_hostname | (optional) The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | + +## Example for terraform.tfvars + +``` +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +public_vswitchs_map = { + "us-east-1a" = 1 +} +private_vswitchs_map = { + "us-east-1a" = 2 +} +vswitchs_bit_length = 8 + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +``` +## Conditional creation +- To create an Elastic IP and associate it to the Gateway instance: +``` +allocate_and_associate_eip = true +``` + +## Outputs +| Name | Description | +|-------------------------------|---------------------------------------------| +| vpc_id | The id of the deployed vpc | +| internal_rt_id | The internal route table id id | +| vpc_public_vswitchs_ids_list | A list of the private vswitchs ids | +| vpc_private_vswitchs_ids_list | A list of the private vswitchs ids | +| image_id | The ami id of the deployed Security Gateway | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group id name | +| gateway_eip_id | The id of the elastic IP | +| gateway_eip_public_ip | The elastic pubic IP | +| gateway_instance_id | The Security Gateway instance id | +| gateway_instance_name | The deployed Gateway AliCloud instance name | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230329 | First release of R81.20 & R81.10 CloudGuard Gateway Terraform deployment in Alibaba Cloud and added support for g7ne instance type. | +| 20211011 | First release of Check Point CloudGuard Gateway Terraform deployment into a new VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/alicloud/gateway-master/locals.tf b/terraform/alicloud/gateway-master/locals.tf new file mode 100755 index 00000000..706b0458 --- /dev/null +++ b/terraform/alicloud/gateway-master/locals.tf @@ -0,0 +1,17 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" +} \ No newline at end of file diff --git a/terraform/alicloud/gateway-master/main.tf b/terraform/alicloud/gateway-master/main.tf new file mode 100755 index 00000000..d2c35c1f --- /dev/null +++ b/terraform/alicloud/gateway-master/main.tf @@ -0,0 +1,49 @@ +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_name = var.vpc_name + vpc_cidr = var.vpc_cidr + public_vswitchs_map = var.public_vswitchs_map + private_vswitchs_map = var.private_vswitchs_map + vswitchs_bit_length = var.vswitchs_bit_length +} + +resource "alicloud_route_table" "private_vswitch_rt" { + depends_on = [module.launch_vpc] + route_table_name = "Internal_Route_Table" + vpc_id = module.launch_vpc.vpc_id +} +resource "alicloud_route_table_attachment" "private_rt_to_private_vswitchs" { + depends_on = [module.launch_vpc, alicloud_route_table.private_vswitch_rt] + route_table_id = alicloud_route_table.private_vswitch_rt.id + vswitch_id = module.launch_vpc.private_vswitchs_ids_list[0] +} + +module "launch_gateway_into_vpc" { + source = "../gateway" + + vpc_id = module.launch_vpc.vpc_id + public_vswitch_id = module.launch_vpc.public_vswitchs_ids_list[0] + private_vswitch_id = module.launch_vpc.private_vswitchs_ids_list[0] + private_route_table = alicloud_route_table.private_vswitch_rt.id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + disk_category = var.disk_category + ram_role_name = var.ram_role_name + instance_tags = var.instance_tags + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + gateway_TokenKey = var.gateway_TokenKey + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp +} \ No newline at end of file diff --git a/terraform/alicloud/gateway-master/output.tf b/terraform/alicloud/gateway-master/output.tf new file mode 100755 index 00000000..ed33d983 --- /dev/null +++ b/terraform/alicloud/gateway-master/output.tf @@ -0,0 +1,33 @@ +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "internal_rt_id" { + value = alicloud_route_table.private_vswitch_rt.id +} +output "vpc_public_vswitchs_ids_list" { + value = module.launch_vpc.public_vswitchs_ids_list +} +output "vpc_private_vswitchs_ids_list" { + value = module.launch_vpc.private_vswitchs_ids_list +} +output "image_id" { + value = module.launch_gateway_into_vpc.image_id +} +output "permissive_sg_id" { + value = module.launch_gateway_into_vpc.permissive_sg_id +} +output "permissive_sg_name" { + value = module.launch_gateway_into_vpc.permissive_sg_name +} +output "gateway_eip_id" { + value = module.launch_gateway_into_vpc.gateway_eip_id +} +output "gateway_eip_public_ip" { + value = module.launch_gateway_into_vpc.gateway_eip_public_ip +} +output "gateway_instance_id" { + value = module.launch_gateway_into_vpc.gateway_instance_id +} +output "gateway_instance_name" { + value = module.launch_gateway_into_vpc.gateway_instance_name +} \ No newline at end of file diff --git a/terraform/alicloud/gateway-master/terraform.tfvars b/terraform/alicloud/gateway-master/terraform.tfvars new file mode 100755 index 00000000..c43d3d8d --- /dev/null +++ b/terraform/alicloud/gateway-master/terraform.tfvars @@ -0,0 +1,42 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +public_vswitchs_map = { + "us-east-1a" = 1 +} +private_vswitchs_map = { + "us-east-1a" = 2 +} +vswitchs_bit_length = 8 + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" diff --git a/terraform/alicloud/gateway-master/variables.tf b/terraform/alicloud/gateway-master/variables.tf new file mode 100755 index 00000000..68b88ac6 --- /dev/null +++ b/terraform/alicloud/gateway-master/variables.tf @@ -0,0 +1,140 @@ +// --- VPC Network Configuration --- +variable "vpc_name" { + type = string + description = "The name of the VPC" + default = "cp-vpc" +} +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "vswitchs_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value is 4, the resulting vswitch address will have length /20" +} + +// --- ECS Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" +default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Secutiry Gateways" +default = "ecs.g5ne.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to TRUE, an elastic IP will be allocated and associated with the launched instance" +default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" +default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_efficiency" +} +variable "ram_role_name" { + type = string + description = "RAM role name to attach to the instance profile" + default = "" +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instance" +default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" +default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash)" +default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional)" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" +default = true +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/gateway-master/versions.tf b/terraform/alicloud/gateway-master/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/gateway-master/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/gateway/README.md b/terraform/alicloud/gateway/README.md new file mode 100755 index 00000000..db7c32e2 --- /dev/null +++ b/terraform/alicloud/gateway/README.md @@ -0,0 +1,141 @@ +# Check Point Gateway Terraform module for AliCloud + +Terraform module which deploys a Check Point Security Gateway into an existing VPC. + +These types of Terraform resources are supported: +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/alicloud/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/alicloud/r/eip.html) - conditional creation +* [Route_entry](https://www.terraform.io/docs/providers/alicloud/r/route_entry.html) - Internal default route: conditional creation +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - Gateway Instance + +## Note +- Make sure your region and zone are supporting the gateway instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` + +## Usage +- Fill all variables in the gateway/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan +- Create or modify the deployment: + terraform apply + +### terraform.tfvars variables: +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| vpc_cidr | The CIDR block of the provided VPC | string | n/a | n/a | yes | +| public_vswitch_id | The public vswitch of the security gateway | string | n/a | n/a | yes | +| private_vswitch_id | The private vswitch of the security gateway | string | n/a | n/a | yes | +| private_route_table | Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | +| gateway_name | The name tag of the Security Gateway instances (optional) | string | n/a | "Check-Point-Gateway-tf" | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - ecs.g5ne.large
- ecs.g5ne.xlarge
- ecs.g5ne.2xlarge
- ecs.g5ne.4xlarge
- ecs.g5ne.8xlarge
- ecs.g7ne.large
- ecs.g7ne.xlarge
- ecs.g7ne.2xlarge
- ecs.g7ne.4xlarge
- ecs.g7ne.8xlarge | "ecs.g5ne.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to TRUE, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | +| ram_role_name | A predefined RAM role name to attach to the security gateway instance | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | +| password_hash | Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) (optional) | string | n/a | "" | no | +| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| gateway_hostname | (optional) The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | + +## Example for terraform.tfvars +``` +// --- VPC Network Configuration --- +vpc_id = "vpc-" +public_vswitch_id = "vsw-" +private_vswitch_id = "vsw-" +private_route_table = "vtb-" + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +``` +## Conditional creation +- To create an Elastic IP and associate it to the Gateway instance: +``` +allocate_and_associate_eip = true +``` +- To create a default route at the private route table: +``` +private_route_table = "rtb-12345678" +``` + +## Outputs +| Name | Description | +|-----------------------|-----------------------------------------------| +| image_id | The image id of the deployed Security Gateway | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group id name | +| gateway_eip_id | The id of the elastic IP | +| gateway_eip_public_ip | The elastic pubic IP | +| gateway_instance_id | The Security Gateway instance id | +| gateway_instance_name | The deployed Gateway AliCloud instance name | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230329 | First release of R81.20 & R81.10 CloudGuard Gateway Terraform deployment in Alibaba Cloud and added support for g7ne instance type. | +| 20211011 | First release of Check Point CloudGaurd Gateway Terraform deployment into an existing VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/alicloud/gateway/locals.tf b/terraform/alicloud/gateway/locals.tf new file mode 100755 index 00000000..7f880dea --- /dev/null +++ b/terraform/alicloud/gateway/locals.tf @@ -0,0 +1,23 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + //will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_token = split(" ", var.gateway_TokenKey) + token_decode = base64decode(element(local.split_token, length(local.split_token)-1)) + regex_token_valid = "(^https://(.+).checkpoint.com/app/maas/api/v1/tenant(.+)|^$)" + regex_token = regex(local.regex_token_valid, local.token_decode) == local.token_decode ? 0 : "Smart-1 Cloud token is invalid format" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" +} \ No newline at end of file diff --git a/terraform/alicloud/gateway/main.tf b/terraform/alicloud/gateway/main.tf new file mode 100755 index 00000000..93bfb0c1 --- /dev/null +++ b/terraform/alicloud/gateway/main.tf @@ -0,0 +1,70 @@ +module "images" { + source = "../modules/images" + + version_license = var.gateway_version + chkp_type = "gateway" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name +} + +module "common_gateway_instance" { + source = "../modules/common/gateway_instance" + security_groups = [ + module.common_permissive_sg.permissive_sg_id] + gateway_name = var.gateway_name + volume_size = var.volume_size + disk_category = var.disk_category + vswitch_id = var.public_vswitch_id + gateway_instance_type = var.gateway_instance_type + instance_tags = var.instance_tags + key_name = var.key_name + image_id = module.images.image_id + gateway_password_hash = var.gateway_password_hash + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_TokenKey = var.gateway_TokenKey + gateway_bootstrap_script = var.gateway_bootstrap_script + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + gateway_version = var.gateway_version +} + +resource "alicloud_network_interface" "internal_eni" { + network_interface_name = format("%s-internal-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + vswitch_id = var.private_vswitch_id + security_group_ids = [ + module.common_permissive_sg.permissive_sg_id] + description = "eth1" +} + +resource "alicloud_network_interface_attachment" "internal_eni_attachment" { + instance_id = module.common_gateway_instance.gateway_instance_id + network_interface_id = alicloud_network_interface.internal_eni.id +} + +module "common_internal_default_route" { + source = "../modules/common/internal_default_route" + + private_route_table = var.private_route_table + internal_eni_id = alicloud_network_interface.internal_eni.id +} + +module "common_eip" { + source = "../modules/common/elastic_ip" + allocate_and_associate_eip = var.allocate_and_associate_eip + instance_id = module.common_gateway_instance.gateway_instance_id +} + +resource "alicloud_ram_role_attachment" "attach" { + count = var.ram_role_name != "" ? 1 : 0 + role_name = var.ram_role_name + instance_ids = [module.common_gateway_instance.gateway_instance_id] +} \ No newline at end of file diff --git a/terraform/alicloud/gateway/output.tf b/terraform/alicloud/gateway/output.tf new file mode 100755 index 00000000..7f2e85c1 --- /dev/null +++ b/terraform/alicloud/gateway/output.tf @@ -0,0 +1,21 @@ +output "image_id" { + value = module.images.image_id +} +output "permissive_sg_id" { + value = module.common_permissive_sg.permissive_sg_id +} +output "permissive_sg_name" { + value = module.common_permissive_sg.permissive_sg_name +} +output "gateway_eip_id" { + value = module.common_eip.instance_eip_id +} +output "gateway_eip_public_ip" { + value = module.common_eip.instance_eip_public_ip +} +output "gateway_instance_id" { + value = module.common_gateway_instance.gateway_instance_id +} +output "gateway_instance_name" { + value = module.common_gateway_instance.gateway_instance_name +} \ No newline at end of file diff --git a/terraform/alicloud/gateway/terraform.tfvars b/terraform/alicloud/gateway/terraform.tfvars new file mode 100755 index 00000000..4d02e623 --- /dev/null +++ b/terraform/alicloud/gateway/terraform.tfvars @@ -0,0 +1,37 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-" +public_vswitch_id = "vsw-" +private_vswitch_id = "vsw-" +private_route_table = "vtb-" + +// --- ECS Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "ecs.g5ne.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_efficiency" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" \ No newline at end of file diff --git a/terraform/alicloud/gateway/variables.tf b/terraform/alicloud/gateway/variables.tf new file mode 100755 index 00000000..a141b140 --- /dev/null +++ b/terraform/alicloud/gateway/variables.tf @@ -0,0 +1,133 @@ +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_vswitch_id" { + type = string + description = "The public vswitch of the security gateway" +} +variable "private_vswitch_id" { + type = string + description = "The private vswitch of the security gateway" +} +variable "private_route_table" { + type = string + description = "Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. vtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route. If empty - traffic will not be routed through the Security Gateway, this requires manual configuration in the Route Table" +default="" +} + +// --- ECS Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Secutiry Gateways" + default = "ecs.g5ne.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to TRUE, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_efficiency" +} +variable "ram_role_name" { + type = string + description = "RAM role name to attach to the instance profile" + default = "" +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instance" +default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash)" + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional)" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/gateway/versions.tf b/terraform/alicloud/gateway/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/gateway/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/management-master/README.md b/terraform/alicloud/management-master/README.md new file mode 100755 index 00000000..ec200646 --- /dev/null +++ b/terraform/alicloud/management-master/README.md @@ -0,0 +1,135 @@ +# Check Point Management master Server Terraform module for AliCloud + +Terraform module which deploys a Check Point Management Server into a new VPC on AliCloud. + +These types of Terraform resources are supported: +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - management Instance +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) + + +## Note +- Make sure your region and zone are supporting the management instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` +## Usage +- Fill all variables in the management-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan +- Create or modify the deployment: + terraform apply + +### terraform.tfvars variables: +| Name | Description | Type | Allowed values | Default | Required | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_name | (Optional) The name of the VPC | string | n/a | "cp-vpc" | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| vswitch_id | Vswitch id | string | n/a | n/a | yes | +| instance_name | AliCloud instance name to launch | string | n/a | "CP-Management-tf" | no | +| instance_type | AliCloud instance type | string | - ecs.g6e.large
- ecs.g6e.xlarge
- ecs.g6e.2xlarge
- ecs.g6e.4xlarge
- ecs.g6e.8xlarge | "ecs.g6e.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| eip | Allocate and associate an elastic IP with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_essd" | no | +| ram_role_name | RAM role name to attach to the instance profile, leave it empty for automatic creation | string | n/a | "" | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance | map(string) | n/a | {} | no | +| version_license | Version and license of the Check Point Security Management | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| password_hash | (Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | +| hostname | (Optional) Management prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | n/a | no | +| is_primary_management | Determines if this is the primary Management Server or not | bool | true/false | true | no | +| SICKey | "Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, SSH, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| primary_ntp | (Optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (Optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | +| bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | + +## Example for terraform.tfvars +``` +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +public_vswitchs_map = { + "us-east-1a" = 1 +} +vswitchs_bit_length = 8 + + +// --- ECS Instances Configuration --- +instance_name = "CP-Management-tf" +instance_type = "ecs.g6e.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_essd" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +version_license = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +password_hash = "" +hostname = "mgmt-tf" + +// --- Security Management Server Settings --- +is_primary_management = "true" +SICKey = "" +allow_upload_download = "true" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +``` + +## Outputs +| Name | Description | +|-------------------------------|-------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| vpc_public_vswitchs_ids_list | A list of the private vswitchs ids | +| vpc_private_vswitchs_ids_list | A list of the private vswitchs ids | +| image_id | The ami id of the deployed Security Gateway | +| management_instance_id | The deployed Management AliCloud instance id | +| management_instance_name | The deployed Management AliCloud instance name | +| management_instance_tags | The deployed Management AliCloud tags | +| management_public_ip | The deployed Management AliCloud public address | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230512 | New images with Jumbo Hotfix | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | +| 20211011 | First release of Check Point CloudGuard Management Terraform deployment into a new VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/alicloud/management-master/locals.tf b/terraform/alicloud/management-master/locals.tf new file mode 100755 index 00000000..d64e0b51 --- /dev/null +++ b/terraform/alicloud/management-master/locals.tf @@ -0,0 +1,20 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // Will fail if var.gateway_management is invalid + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_cidr or var.gateway_addresses are invalid + mgmt_vswitch_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_cidr must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" +} \ No newline at end of file diff --git a/terraform/alicloud/management-master/main.tf b/terraform/alicloud/management-master/main.tf new file mode 100755 index 00000000..1e47d448 --- /dev/null +++ b/terraform/alicloud/management-master/main.tf @@ -0,0 +1,40 @@ +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_name = var.vpc_name + vpc_cidr = var.vpc_cidr + public_vswitchs_map = var.public_vswitchs_map + private_vswitchs_map = {} + vswitchs_bit_length = var.vswitchs_bit_length +} + +module "launch_management_into_vpc" { + source = "../management" + + vpc_id = module.launch_vpc.vpc_id + vswitch_id = module.launch_vpc.public_vswitchs_ids_list[0] + ram_role_name = var.ram_role_name + + instance_name = var.instance_name + instance_type = var.instance_type + key_name = var.key_name + + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + disk_category = var.disk_category + instance_tags = var.instance_tags + version_license = var.version_license + admin_shell = var.admin_shell + password_hash = var.password_hash + hostname = var.hostname + is_primary_management = var.is_primary_management + SICKey = var.SICKey + allow_upload_download = var.allow_upload_download + gateway_management = var.gateway_management + admin_cidr = var.admin_cidr + gateway_addresses = var.gateway_addresses + bootstrap_script = var.bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp +} diff --git a/terraform/alicloud/management-master/output.tf b/terraform/alicloud/management-master/output.tf new file mode 100755 index 00000000..fa85cce2 --- /dev/null +++ b/terraform/alicloud/management-master/output.tf @@ -0,0 +1,25 @@ +output "Deployment" { + value = "Finalizing configuration may take up to 20 minutes after deployment is finished" +} + +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "vpc_public_vswitchs_ids_list" { + value = module.launch_vpc.public_vswitchs_ids_list +} +output "image_id" { + value = module.launch_management_into_vpc.image_id +} +output "management_instance_id" { + value = module.launch_management_into_vpc.management_instance_id +} +output "management_instance_name" { + value = module.launch_management_into_vpc.management_instance_name +} +output "management_instance_tags" { + value = module.launch_management_into_vpc.management_instance_tags +} +output "management_public_ip" { + value = module.launch_management_into_vpc.management_public_ip +} diff --git a/terraform/alicloud/management-master/terraform.tfvars b/terraform/alicloud/management-master/terraform.tfvars new file mode 100755 index 00000000..bf6cb990 --- /dev/null +++ b/terraform/alicloud/management-master/terraform.tfvars @@ -0,0 +1,40 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_name = "cp-vpc" +vpc_cidr = "10.0.0.0/16" +public_vswitchs_map = { + "us-east-1a" = 1 +} +vswitchs_bit_length = 8 + + +// --- ECS Instances Configuration --- +instance_name = "CP-Management-tf" +instance_type = "ecs.g6e.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_essd" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +version_license = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +password_hash = "" +hostname = "mgmt-tf" + +// --- Security Management Server Settings --- +is_primary_management = "true" +SICKey = "" +allow_upload_download = "true" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" diff --git a/terraform/alicloud/management-master/variables.tf b/terraform/alicloud/management-master/variables.tf new file mode 100755 index 00000000..aa9954f7 --- /dev/null +++ b/terraform/alicloud/management-master/variables.tf @@ -0,0 +1,137 @@ +// --- VPC Network Configuration --- +variable "vpc_name" { + type = string + description = "The name of the VPC" + default = "cp-vpc" +} +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "vswitchs_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value is 4, the resulting vswitch address will have length /20" +} +// --- ECS Instance Configuration --- +variable "instance_name" { + type = string + description = "AliCloud instance name to launch" + default = "CP-Management-tf" +} +variable "instance_type" { + type = string + description = "" + default ="ecs.g6e.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instances" +} +variable "allocate_and_associate_eip" { + type = bool + description = "When set to 'true', an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_essd" +} +variable "ram_role_name" { + type = string + description = "RAM role name to attach to the instance profile" + default = "" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance" +default = {} +} +// --- Check Point Settings --- +variable "version_license" { + type = string + description = "version and license" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.version_license +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "hostname" { + type = string + description = "(Optional)" + default = "" +} + +// --- Security Management Server Settings --- +variable "is_primary_management" { + type = bool + description = "true/false. Determines if this is the primary management server or not" + default = true +} +variable "SICKey" { + type = string + description = "Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address" + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, SSH, and graphical clients only from this network to communicate with the Management Server" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Management Server" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} +variable "bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/management-master/versions.tf b/terraform/alicloud/management-master/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/management-master/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/management/README.md b/terraform/alicloud/management/README.md new file mode 100755 index 00000000..ccff6e8f --- /dev/null +++ b/terraform/alicloud/management/README.md @@ -0,0 +1,128 @@ +# Check Point Management Server Terraform module for AliCloud + +Terraform module which deploys a Check Point Management Server into an existing VPC on AliCloud. + +These types of Terraform resources are supported: +* [Instance](https://www.terraform.io/docs/providers/alicloud/r/instance.html) - management Instance +* [Security group](https://www.terraform.io/docs/providers/alicloud/r/security_group.html) + + +## Note +- Make sure your region and zone are supporting the management instance types in **modules/common/instance_type/main.tf** + [Alicloud Instance_By_Region](https://ecs-buy.aliyun.com/instanceTypes/?spm=a2c63.p38356.879954.139.1eeb2d44eZQw2m#/instanceTypeByRegion) + +## Configuration +- Best practice is to configure credentials in the Environment variables - [Alicloud provider](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs) +``` +Configure environment variables in Linux: + +$ export ALICLOUD_ACCESS_KEY=anaccesskey +$ export ALICLOUD_SECRET_KEY=asecretkey +$ export ALICLOUD_REGION=cn-beijing + +Configure envrionment variables in Windows: + set ALICLOUD_ACCESS_KEY=anaccesskey + set ALICLOUD_SECRET_KEY=asecretkey + set ALICLOUD_REGION=cn-beijing + +``` + +## Usage +- Fill all variables in the management/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + terraform init +- Create an execution plan: + terraform plan +- Create or modify the deployment: + terraform apply + +### terraform.tfvars variables: +| Name | Description | Type | Allowed values | Default | Required | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| vswitch_id | Vswitch id | string | n/a | n/a | yes | +| instance_name | AliCloud instance name to launch | string | n/a | "CP-Management-tf" | no | +| instance_type | AliCloud instance type | string | - ecs.g6e.large
- ecs.g6e.xlarge
- ecs.g6e.2xlarge
- ecs.g6e.4xlarge
- ecs.g6e.8xlarge | "ecs.g6e.xlarge" | no | +| key_name | The ECS Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| eip | Allocate and associate an elastic IP with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) | number | n/a | 100 | no | +| disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_essd" | no | +| ram_role_name | RAM role name to attach to the instance profile, leave it empty for automatic creation | string | n/a | "" | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance | map(string) | n/a | {} | no | +| version_license | Version and license of the Check Point Security Management | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| password_hash | (Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | +| hostname | (Optional) Management prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | n/a | no | +| is_primary_management | Determines if this is the primary Management Server or not | bool | true/false | true | no | +| SICKey | "Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | n/a | true | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, SSH, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| primary_ntp | (Optional) | string | n/a | "ntp1.cloud.aliyuncs.com" | no | +| secondary_ntp | (Optional) | string | n/a | "ntp2.cloud.aliyuncs.com" | no | +| bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | + +## Example for terraform.tfvars + +``` +// --- VPC Network Configuration --- +vpc_id = "vpc-" +vswitch_id = "vsw-" + +// --- ECS Instances Configuration --- +instance_name = "CP-Management-tf" +instance_type = "ecs.g6e.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_essd" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +version_license = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +password_hash = "" +hostname = "mgmt-tf" + +// --- Security Management Server Settings --- +is_primary_management = "true" +SICKey = "" +allow_upload_download = "true" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" +``` + +## Outputs +| Name | Description | +|--------------------------|-------------------------------------------------| +| image_id | The ami id of the deployed Security Gateway | +| management_instance_id | The deployed Management AliCloud instance id | +| management_instance_name | The deployed Management AliCloud instance name | +| management_instance_tags | The deployed Management AliCloud tags | +| management_public_ip | The deployed Management AliCloud public address | + +## Revision History + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20230830 | Change default Check Point version to R81.20 | +| 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230512 | New images with Jumbo Hotfix | +| 20230420 | Change alicloud terraform provider version to 1.203.0 | +| 20230330 | - Added support of ECS disk category.
- Stability fixes. | +| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | +| 20211011 | First release of Check Point CloudGaurd Management Terraform deployment into an existing VPC in Alibaba cloud. | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/alicloud/management/locals.tf b/terraform/alicloud/management/locals.tf new file mode 100755 index 00000000..b6815a6f --- /dev/null +++ b/terraform/alicloud/management/locals.tf @@ -0,0 +1,24 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // Will fail if var.gateway_management is invalid + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_cidr or var.gateway_addresses are invalid + mgmt_vswitch_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_cidr must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" + version_split = element(split("-", var.version_license), 0) + gateway_bootstrap_script64 = base64encode(var.bootstrap_script) + gateway_SICkey_base64 = base64encode(var.SICKey) + gateway_password_hash_base64 = base64encode(var.password_hash) +} \ No newline at end of file diff --git a/terraform/alicloud/management/main.tf b/terraform/alicloud/management/main.tf new file mode 100755 index 00000000..33b6d436 --- /dev/null +++ b/terraform/alicloud/management/main.tf @@ -0,0 +1,177 @@ +module "images" { + source = "../modules/images" + + version_license = var.version_license + chkp_type = "management" +} + +resource "alicloud_security_group" "management_sg" { + name = format("%s-SecurityGroup", var.instance_name) + description = "TF Management security group" + vpc_id = var.vpc_id +} + +resource "alicloud_security_group_rule" "permissive_egress" { + type = "egress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "-1/-1" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = "0.0.0.0/0" +} + +resource "alicloud_security_group_rule" "management_ingress-257" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "257/257" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-8211" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "8211/8211" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-18191-2" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "18191/18192" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-18210-11" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "18210/18211" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-18221" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "18221/18221" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-18264" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "18264/18264" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.gateway_addresses +} + +resource "alicloud_security_group_rule" "management_ingress-22" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "22/22" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.admin_cidr +} + +resource "alicloud_security_group_rule" "management_ingress-433" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "433/433" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.admin_cidr +} + +resource "alicloud_security_group_rule" "management_ingress-18190" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "18190/18190" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.admin_cidr +} + +resource "alicloud_security_group_rule" "management_ingress-19009" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "19009/19009" + priority = 1 + security_group_id = alicloud_security_group.management_sg.id + cidr_ip = var.admin_cidr +} + +resource "alicloud_instance" "management_instance" { + instance_name = var.instance_name + instance_type = var.instance_type + key_name = var.key_name + image_id = module.images.image_id + vswitch_id = var.vswitch_id + security_groups = [alicloud_security_group.management_sg.id] + system_disk_size = var.volume_size + system_disk_category = var.disk_category + + tags = merge({ + Name = var.instance_name + }, var.instance_tags) + + user_data = templatefile("${path.module}/management_userdata.yaml", { + // script's arguments + Hostname = var.hostname, + PasswordHash = local.gateway_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + AdminSubnet = var.admin_cidr, + IsPrimary = var.is_primary_management, + SICKey = local.gateway_SICkey_base64, + AllocateElasticIP = var.allocate_and_associate_eip, + GatewayManagement = var.gateway_management, + BootstrapScript = local.gateway_bootstrap_script64, + OsVersion = local.version_split + }) +} + +module "common_eip" { + source = "../modules/common/elastic_ip" + allocate_and_associate_eip = var.allocate_and_associate_eip + instance_id = alicloud_instance.management_instance.id +} + +resource "alicloud_ram_role_attachment" "attach" { + count = var.ram_role_name != "" ? 1 : 0 + role_name = var.ram_role_name + instance_ids = alicloud_instance.management_instance.*.id +} \ No newline at end of file diff --git a/terraform/alicloud/management/management_userdata.yaml b/terraform/alicloud/management/management_userdata.yaml new file mode 100644 index 00000000..9d957968 --- /dev/null +++ b/terraform/alicloud/management/management_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" primary=\"${IsPrimary}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" "overTheInternet=\"${GatewayManagement}\"" bootstrapScript64=\"${BootstrapScript}\" diff --git a/terraform/alicloud/management/output.tf b/terraform/alicloud/management/output.tf new file mode 100755 index 00000000..82e2f5fe --- /dev/null +++ b/terraform/alicloud/management/output.tf @@ -0,0 +1,19 @@ +output "Deployment" { + value = "Finalizing configuration may take up to 20 minutes after deployment is finished" +} + +output "image_id" { + value = module.images.image_id +} +output "management_instance_id" { + value = alicloud_instance.management_instance.id +} +output "management_instance_name" { + value = alicloud_instance.management_instance.tags["Name"] +} +output "management_instance_tags" { + value = alicloud_instance.management_instance.tags +} +output "management_public_ip" { + value = module.common_eip.instance_eip_public_ip +} \ No newline at end of file diff --git a/terraform/alicloud/management/terraform.tfvars b/terraform/alicloud/management/terraform.tfvars new file mode 100755 index 00000000..9758387c --- /dev/null +++ b/terraform/alicloud/management/terraform.tfvars @@ -0,0 +1,35 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-" +vswitch_id = "vsw-" + +// --- ECS Instances Configuration --- +instance_name = "CP-Management-tf" +instance_type = "ecs.g6e.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +disk_category = "cloud_essd" +ram_role_name = "" +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +version_license = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +password_hash = "" +hostname = "mgmt-tf" + +// --- Security Management Server Settings --- +is_primary_management = "true" +SICKey = "" +allow_upload_download = "true" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "ntp1.cloud.aliyuncs.com" +secondary_ntp = "ntp2.cloud.aliyuncs.com" +bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" \ No newline at end of file diff --git a/terraform/alicloud/management/variables.tf b/terraform/alicloud/management/variables.tf new file mode 100755 index 00000000..c91dd06e --- /dev/null +++ b/terraform/alicloud/management/variables.tf @@ -0,0 +1,128 @@ +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "vswitch_id" { + type = string + description = "To access the instance from the internet, make sure the vswitch has a route to the internet" +} + +// --- ECS Instance Configuration --- +variable "instance_name" { + type = string + description = "AliCloud instance name to launch" + default = "CP-Management-tf" +} +variable "instance_type" { + type = string + description = "" + default ="ecs.g6e.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.instance_type +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instances" +} +variable "allocate_and_associate_eip" { + type = bool + description = "When set to 'true', an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_essd" +} +variable "ram_role_name" { + type = string + description = "RAM role name to attach to the instance profile" + default = "" +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance" +default = {} +} + +// --- Check Point Settings --- +variable "version_license" { + type = string + description = "version and license" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.version_license +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "hostname" { + type = string + description = "(Optional)" + default = "" +} + +// --- Security Management Server Settings --- +variable "is_primary_management" { + type = bool + description = "true/false. Determines if this is the primary management server or not" + default = true +} +variable "SICKey" { + type = string + description = "Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address" + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, SSH, and graphical clients only from this network to communicate with the Management Server" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Management Server" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} +variable "bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/management/versions.tf b/terraform/alicloud/management/versions.tf new file mode 100755 index 00000000..71e9843e --- /dev/null +++ b/terraform/alicloud/management/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} diff --git a/terraform/alicloud/modules/cluster-ram-role/locals.tf b/terraform/alicloud/modules/cluster-ram-role/locals.tf new file mode 100755 index 00000000..395b7d40 --- /dev/null +++ b/terraform/alicloud/modules/cluster-ram-role/locals.tf @@ -0,0 +1,5 @@ +locals { + ram_role_name = format("%s-ram-role-%s", var.gateway_name, random_id.ram_uuid.hex) + ram_policy_name = format("%s-ram-policy-%s", var.gateway_name, random_id.ram_uuid.hex) + +} \ No newline at end of file diff --git a/terraform/alicloud/modules/cluster-ram-role/main.tf b/terraform/alicloud/modules/cluster-ram-role/main.tf new file mode 100755 index 00000000..95840d8b --- /dev/null +++ b/terraform/alicloud/modules/cluster-ram-role/main.tf @@ -0,0 +1,54 @@ +resource "random_id" "ram_uuid" { + byte_length = 5 +} + +resource "alicloud_ram_role" "ram_role" { + name = local.ram_role_name + document = <= 100 ? 0 : "volume_size must be at least 100" +} +variable "disk_category" { + type = string + description = "(Optional) Category of the ECS disk" + default = "cloud_efficiency" +} +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateway" + default = "ecs.c5.xlarge" +} +module "validate_instance_type" { + source = "../instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instance" + default = {} +} +variable "key_name" { + type = string + description = "The ECS Key Pair name to allow SSH access to the instance" +} +variable "image_id" { + type = string + description = "The image ID to use for the instance" +} +variable "security_groups" { + type = list(string) + description = "The security groups of the instance" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash)" + default = "" +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional)" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/gateway_instance/versions.tf b/terraform/alicloud/modules/common/gateway_instance/versions.tf new file mode 100755 index 00000000..906a4df0 --- /dev/null +++ b/terraform/alicloud/modules/common/gateway_instance/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/instance_type/main.tf b/terraform/alicloud/modules/common/instance_type/main.tf new file mode 100755 index 00000000..4a3d6ba1 --- /dev/null +++ b/terraform/alicloud/modules/common/instance_type/main.tf @@ -0,0 +1,28 @@ +locals { + gw_types = [ + "ecs.g5ne.large", + "ecs.g5ne.xlarge", + "ecs.g5ne.2xlarge", + "ecs.g5ne.4xlarge", + "ecs.g5ne.8xlarge", + "ecs.g7ne.large", + "ecs.g7ne.xlarge", + "ecs.g7ne.2xlarge", + "ecs.g7ne.4xlarge", + "ecs.g7ne.8xlarge" + ] + mgmt_types = [ + "ecs.g6e.large", + "ecs.g6e.xlarge", + "ecs.g6e.2xlarge", + "ecs.g6e.4xlarge", + "ecs.g6e.8xlarge" + ] +} + +locals { + gw_values = var.chkp_type == "gateway" ? local.gw_types : [] + mgmt_values = var.chkp_type == "management" ? local.mgmt_types : [] + allowed_values = coalescelist(local.gw_values, local.mgmt_values) + is_allowed_type = index(local.allowed_values, var.instance_type) +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/instance_type/variables.tf b/terraform/alicloud/modules/common/instance_type/variables.tf new file mode 100755 index 00000000..f114cf20 --- /dev/null +++ b/terraform/alicloud/modules/common/instance_type/variables.tf @@ -0,0 +1,20 @@ +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} +locals { + type_allowed_values = [ + "gateway", + "management" + //"server" + ] + // Will fail if var.chkp_type is invalid + validate_instance_type = index(local.type_allowed_values, var.chkp_type) +} + +variable "instance_type" { + type = string + description = "Alicloud Instance type" +} + diff --git a/terraform/alicloud/modules/common/instance_type/versions.tf b/terraform/alicloud/modules/common/instance_type/versions.tf new file mode 100755 index 00000000..0ec4dcca --- /dev/null +++ b/terraform/alicloud/modules/common/instance_type/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/internal_default_route/locals.tf b/terraform/alicloud/modules/common/internal_default_route/locals.tf new file mode 100755 index 00000000..493c4d9a --- /dev/null +++ b/terraform/alicloud/modules/common/internal_default_route/locals.tf @@ -0,0 +1,3 @@ +locals { + internal_route_table_condition = var.private_route_table != "" ? 1 : 0 +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/internal_default_route/main.tf b/terraform/alicloud/modules/common/internal_default_route/main.tf new file mode 100755 index 00000000..7290ad9e --- /dev/null +++ b/terraform/alicloud/modules/common/internal_default_route/main.tf @@ -0,0 +1,7 @@ +resource "alicloud_route_entry" "internal_default_route" { + count = local.internal_route_table_condition + route_table_id = var.private_route_table + destination_cidrblock = "0.0.0.0/0" + nexthop_type = "NetworkInterface" + nexthop_id = var.internal_eni_id +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/internal_default_route/output.tf b/terraform/alicloud/modules/common/internal_default_route/output.tf new file mode 100755 index 00000000..fde54050 --- /dev/null +++ b/terraform/alicloud/modules/common/internal_default_route/output.tf @@ -0,0 +1,3 @@ +output "internal_default_route_id" { + value = alicloud_route_entry.internal_default_route.*.id +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/internal_default_route/variables.tf b/terraform/alicloud/modules/common/internal_default_route/variables.tf new file mode 100755 index 00000000..b8e2f458 --- /dev/null +++ b/terraform/alicloud/modules/common/internal_default_route/variables.tf @@ -0,0 +1,9 @@ +variable "private_route_table" { + type = string + description = "Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567)" + default="" +} +variable "internal_eni_id" { + type = string + description = "The internal-eni of the security gateway" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/internal_default_route/versions.tf b/terraform/alicloud/modules/common/internal_default_route/versions.tf new file mode 100755 index 00000000..906a4df0 --- /dev/null +++ b/terraform/alicloud/modules/common/internal_default_route/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/permissive_sg/main.tf b/terraform/alicloud/modules/common/permissive_sg/main.tf new file mode 100755 index 00000000..2ee7b17b --- /dev/null +++ b/terraform/alicloud/modules/common/permissive_sg/main.tf @@ -0,0 +1,27 @@ +resource "alicloud_security_group" "permissive_sg" { + name = format("%s-PermissiveSecurityGroup", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) + description = "Permissive security group" + vpc_id = var.vpc_id +} + +resource "alicloud_security_group_rule" "permissive_egress" { + type = "egress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "-1/-1" + priority = 1 + security_group_id = alicloud_security_group.permissive_sg.id + cidr_ip = "0.0.0.0/0" +} + +resource "alicloud_security_group_rule" "permissive_ingress" { + type = "ingress" + ip_protocol = "all" + nic_type = "intranet" + policy = "accept" + port_range = "-1/-1" + priority = 1 + security_group_id = alicloud_security_group.permissive_sg.id + cidr_ip = "0.0.0.0/0" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/permissive_sg/output.tf b/terraform/alicloud/modules/common/permissive_sg/output.tf new file mode 100755 index 00000000..d8b5df1e --- /dev/null +++ b/terraform/alicloud/modules/common/permissive_sg/output.tf @@ -0,0 +1,6 @@ +output "permissive_sg_id" { + value = alicloud_security_group.permissive_sg.id +} +output "permissive_sg_name" { + value = alicloud_security_group.permissive_sg.name +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/permissive_sg/variables.tf b/terraform/alicloud/modules/common/permissive_sg/variables.tf new file mode 100755 index 00000000..d2afaad2 --- /dev/null +++ b/terraform/alicloud/modules/common/permissive_sg/variables.tf @@ -0,0 +1,13 @@ +variable "vpc_id" { + type = string +} +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway-tf" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/permissive_sg/versions.tf b/terraform/alicloud/modules/common/permissive_sg/versions.tf new file mode 100755 index 00000000..906a4df0 --- /dev/null +++ b/terraform/alicloud/modules/common/permissive_sg/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/version_license/main.tf b/terraform/alicloud/modules/common/version_license/main.tf new file mode 100755 index 00000000..94d144cd --- /dev/null +++ b/terraform/alicloud/modules/common/version_license/main.tf @@ -0,0 +1,23 @@ +locals { + gw_versions = [ + //"R81-PAYG-NGTP", + // "R81-PAYG-NGTX", + "R81-BYOL", + "R81.10-BYOL", + "R81.20-BYOL" + ] + mgmt_versions = [ + //"R81-PAYG", + "R81-BYOL", + "R81.10-BYOL", + "R81.20-BYOL" + ] +} + +locals { + gw_values = var.chkp_type == "gateway" ? local.gw_versions : [] + mgmt_values = var.chkp_type == "management" ? local.mgmt_versions : [] + // standalone_values = var.chkp_type == "standalone" ? local.standalone_versions : [] + allowed_values = coalescelist(local.gw_values, local.mgmt_values)//, local.standalone_values) + is_allowed_type = index(local.allowed_values, var.version_license) +} \ No newline at end of file diff --git a/terraform/alicloud/modules/common/version_license/variables.tf b/terraform/alicloud/modules/common/version_license/variables.tf new file mode 100755 index 00000000..9ecf1643 --- /dev/null +++ b/terraform/alicloud/modules/common/version_license/variables.tf @@ -0,0 +1,19 @@ +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} +locals { + type_allowed_values = [ + "gateway", + "management", + "standalone",] + // Will fail if var.chkp_type is invalid + validate_chkp_type = index(local.type_allowed_values, var.chkp_type) +} + +variable "version_license" { + type = string + description = "AliCloud Version license" +} + diff --git a/terraform/alicloud/modules/common/version_license/versions.tf b/terraform/alicloud/modules/common/version_license/versions.tf new file mode 100755 index 00000000..906a4df0 --- /dev/null +++ b/terraform/alicloud/modules/common/version_license/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} \ No newline at end of file diff --git a/terraform/alicloud/modules/images/images.yaml b/terraform/alicloud/modules/images/images.yaml new file mode 100755 index 00000000..c2eb1d52 --- /dev/null +++ b/terraform/alicloud/modules/images/images.yaml @@ -0,0 +1,210 @@ +Description: Returns a Check Point AliCloud Machine ID (__VERSION__) +Parameters: + Version: + Description: Security Gateway or Management Server version + Type: String + Default: R81.20-BYOL-GW + AllowedValues: + - R81-BYOL-GW + - R81-BYOL-MGMT + - R81.10-BYOL-GW + - R81.10-BYOL-MGMT + - R81.20-BYOL-GW + - R81.20-BYOL-MGMT +Mappings: + ConverterMap: + R81-BYOL-GW: + Value: R81BYOLGW + R81-BYOL-MGMT: + Value: R81BYOLMGMT + R81.10-BYOL-GW: + Value: R8110BYOLGW + R81.10-BYOL-MGMT: + Value: R8110BYOLMGMT + R81.20-BYOL-GW: + Value: R8120BYOLGW + R81.20-BYOL-MGMT: + Value: R8120BYOLMGMT + RegionMap: + cn-hongkong: + R81BYOLMGMT: m-j6c55b1lpz95colzzz1y + R81BYOLGW: m-j6c3gd3gcahojs40842v + R8110BYOLMGMT: m-j6c5n6p0tkx8clx72qes + R8110BYOLGW: m-j6c0x6ugw2012axbdmkn + R8120BYOLMGMT: m-j6c2gv0tohwb5otjzbk4 + R8120BYOLGW: m-j6cdnsm44k0csckg4cxa + ap-southeast-1: + R81BYOLMGMT: m-t4ngdphpnhzw065e30jt + R81BYOLGW: m-t4n99ag8zbinnc7n7xmw + R8110BYOLMGMT: m-t4n9x963l2fx13d4mzi8 + R8110BYOLGW: m-t4ndsvficp1ukrcpt4as + R8120BYOLMGMT: m-t4n3m9t1icbv1ptf8b67 + R8120BYOLGW: m-t4nj16t8nnlp7a70214i + us-west-1: + R81BYOLMGMT: m-rj95ffd9q3c8u7rpc7v5 + R81BYOLGW: m-rj9eblv5oe0ypm77no86 + R8110BYOLMGMT: m-rj9ebcmy6gxp3lzkjnrp + R8110BYOLGW: m-rj952h5pzgaecqhg9h6u + R8120BYOLMGMT: m-rj92n7t0j5uvmss2dak5 + R8120BYOLGW: m-rj99hmyezcyqa0in2us9 + us-east-1: + R81BYOLMGMT: m-0xi064illsngi8q7ejln + R81BYOLGW: m-0xiiv7m3m3ex8zai0lq4 + R8110BYOLMGMT: m-0xie3j6n8rxa26v6abni + R8110BYOLGW: m-0xiebcmy6gxpiyg830vh + R8120BYOLMGMT: m-0xihsclzmkgsxpsmfil2 + R8120BYOLGW: m-0xickak3e8yimpt90lh9 + ap-southeast-2: + R81BYOLMGMT: m-p0w0pl2rajygi6otl2mh + R81BYOLGW: m-p0w78ynl3rpgo1yq43qf + R8110BYOLMGMT: m-p0w7z34zl8gl2nmgzo75 + R8110BYOLGW: m-p0w2nhgtaqxil6bruwe2 + R8120BYOLMGMT: m-p0w2mgbmrn1pq4973ncq + R8120BYOLGW: m-p0wd45q8v82grbipwqkw + ap-southeast-3: + R81BYOLMGMT: m-8psi42zrfpq57cibgu2b + R81BYOLGW: m-8ps8swns48itw97zsb2i + R8110BYOLMGMT: m-8psc710cdd9x9guiajuk + R8110BYOLGW: m-8ps6mel7llq3ffzc2txa + R8120BYOLMGMT: m-8psc710cdd9x6k9vbn5m + R8120BYOLGW: m-8psf1zkz08byz41qrt1r + ap-southeast-5: + R81BYOLMGMT: m-k1aajdkea2t5oyxicbu8 + R81BYOLGW: m-k1afqua8zzbgdaosx7sf + R8110BYOLMGMT: m-k1ahug645c79svl6tgbp + R8110BYOLGW: m-k1a6n0hj1qidjiig80o0 + R8120BYOLMGMT: m-k1ahgt585wlm71lmpmg1 + R8120BYOLGW: m-k1a20f2u7nspfcja9mfc + ap-southeast-6: + R81BYOLMGMT: m-5ts832hgbk52wwnxzjlx + R81BYOLGW: m-5tsf5buudxrwbijypr0v + R8110BYOLMGMT: m-5tsa5qwchhf7q22qj685 + R8110BYOLGW: m-5tsdw01mce246abvrnes + R8120BYOLMGMT: m-5ts5ukwjgsl6t34hx7po + R8120BYOLGW: m-5tsa5qwchhf7pw5n70as + ap-northeast-1: + R81BYOLMGMT: m-6we8l9kvu9shqf3j5v4e + R81BYOLGW: m-6we42rtltap69nckfynw + R8110BYOLMGMT: m-6we20qh4jffzabapyyle + R8110BYOLGW: m-6wefezctjbied9npzp1n + R8120BYOLMGMT: m-6weihbzpoyt5h6i2i42e + R8120BYOLGW: m-6we215381e51fkneyv5v + eu-central-1: + R81BYOLMGMT: m-gw81j322yjmx03hq26qt + R81BYOLGW: m-gw82fm7sbwj7x6fpj1mn + R8110BYOLMGMT: m-gw89gvg18gk6nzo3gxe1 + R8110BYOLGW: m-gw8divjg7azjl2ndt34v + R8120BYOLMGMT: m-gw8csbodb1ntgbtu653c + R8120BYOLGW: m-gw83wxmsb5524ke9f6m7 + eu-west-1: + R81BYOLMGMT: m-d7ocob57ud2nqiv9fk8w + R81BYOLGW: m-d7oez9xgn0qg5g815tip + R8110BYOLMGMT: m-d7o7nj4f81gs8cyo52jd + R8110BYOLGW: m-d7o7nj4f81gsnpfbofnh + R8120BYOLMGMT: m-d7o63e77fokjsv4aq4kt + R8120BYOLGW: m-d7oj29ec4xx04sr8h61z + me-east-1: + R81BYOLMGMT: m-eb35op3wyu89kabry2zw + R81BYOLGW: m-eb35op3wyu89iv0z0nmz + R8110BYOLMGMT: m-eb33tyrfiy726a0xlw6g + R8110BYOLGW: m-eb30m4ho9mkzfb3xi78i + R8120BYOLMGMT: m-eb3bbb1nen46tqmcujmn + R8120BYOLGW: m-eb3dphy5uzm33cduxr7i + ap-south-1: + R81BYOLMGMT: m-a2d16a0v0ms9mg5xh1nm + R81BYOLGW: m-a2didx39bhgf547thni0 + R8110BYOLMGMT: m-a2d4ffz0q8dflg62j0zq + R8110BYOLGW: m-a2d9j14yemliag92m9d1 + R8120BYOLMGMT: m-a2d1e5s7uy9vv5a6n9cn + R8120BYOLGW: m-a2d1e5s7uy9vxvxqa04e + ap-southeast-7: + R81BYOLMGMT: m-0jo742iyh0qbzg51b6fd + R81BYOLGW: m-0joian1mgt9qt2lpvfnk + R8110BYOLMGMT: m-0jo3qwrwsdx3663is0b4 + R8110BYOLGW: m-0jogq1yzljp8ziw4caci + R8120BYOLMGMT: m-0jo67k42jvg301wis5ol + R8120BYOLGW: m-0jo5t1ypg4zy4h12i9c5 + ap-northeast-2: + R81BYOLMGMT: m-mj75cxsn1dhdiqhfc3a0 + R81BYOLGW: m-mj7bybnr5b9gebqrf3xt + R8110BYOLMGMT: m-mj7h0j7db1ryrwczg9ef + R8110BYOLGW: m-mj73osasl4gyi0zqscr5 + R8120BYOLMGMT: m-mj7aktw6610pznjgb16z + R8120BYOLGW: m-mj79jylrqomj0fv99s3b + cn-qingdao: + R81BYOLMGMT: m-m5e1i33z6ohq98tllukn + R81BYOLGW: m-m5eb1zyo5cjbvte7ovay + R8110BYOLMGMT: m-m5eftm32pjq4ghtwcn25 + R8110BYOLGW: m-m5ef0hxxec3ws2c2y26b + R8120BYOLMGMT: m-m5ebt96quorb2gj7dhku + R8120BYOLGW: m-m5eftm32pjq4g9xrwf5o + cn-beijing: + R81BYOLMGMT: m-2ze5d2jit72gotjw5d77 + R81BYOLGW: m-2zec8i2qli4cnqfw9e3o + R8110BYOLMGMT: m-2zehvbpbae19t51owc0j + R8110BYOLGW: m-2zeiwvllkl9jybavtmey + R8120BYOLMGMT: m-2ze1781062lxfwe35d1p + R8120BYOLGW: m-2ze347cq3f6fg3udyb1p + cn-zhangjiakou: + R81BYOLMGMT: m-8vb1rjkshxdaynvqbexj + R81BYOLGW: m-8vb1rjkshxdax8kxdzkk + R8110BYOLMGMT: m-8vb83tbc4hwpesbvte9d + R8110BYOLGW: m-8vbblzj10mzvpnkzdint + R8120BYOLMGMT: m-8vbeoj3rrq2tm6o5bhaa + R8120BYOLGW: m-8vbd1bffbjhlxjkb0k4i + cn-huhehaote: + R81BYOLMGMT: m-hp309790we62uhpo5eed + R81BYOLGW: m-hp3ab2tvfxuar5snxu2r + R8110BYOLMGMT: m-hp3h3tzxij7kl9tdrqg2 + R8110BYOLGW: m-hp325dwey9rn4tyiyuyu + R8120BYOLMGMT: m-hp31ci7e1eeaj062wki0 + R8120BYOLGW: m-hp31ci7e1eealqtmjb9n + cn-wulanchabu: + R81BYOLMGMT: m-0jlhwuucdujv3wee7m96 + R81BYOLGW: m-0jle5qxpr97s1c64e72k + R8110BYOLMGMT: m-0jl54w11sr4odheytky1 + R8110BYOLGW: m-0jlbavg2r5fjc4jxypp7 + R8120BYOLMGMT: m-0jl54w11sr4oakubuo94 + R8120BYOLGW: m-0jlbavg2r5fiwm6736o3 + cn-hangzhou: + R81BYOLMGMT: m-bp14kps2wrk6qquv5ok0 + R81BYOLGW: m-bp1aa9u6zcazi4o1hnjh + R8110BYOLMGMT: m-bp1dz2nq9fqppcf8smpk + R8110BYOLGW: m-bp1hamqhfny1smyl8ql7 + R8120BYOLMGMT: m-bp149dep83kgo5p0dw3l + R8120BYOLGW: m-bp1gvq0d0413vbnakoqj + cn-shanghai: + R81BYOLMGMT: m-uf6cj9tqmxx1bsfmbu45 + R81BYOLGW: m-uf63qkdigbprn96zy3vm + R8110BYOLMGMT: m-uf655j7a9r7otwa2xemv + R8110BYOLGW: m-uf6idj2b3zt57omxvzbr + R8120BYOLMGMT: m-uf62vrhc5bapfoy9lw7n + R8120BYOLGW: m-uf6c9vxp1n58y56ep033 + cn-shenzhen: + R81BYOLMGMT: m-wz9d9s75jsh11z089uuj + R81BYOLGW: m-wz9czejz43gyhdztsjnr + R8110BYOLMGMT: m-wz95gswem9lea2z0d9se + R8110BYOLGW: m-wz93e5pwshkmiv35y9ii + R8120BYOLMGMT: m-wz9am290ax9js6dfdt5o + R8120BYOLGW: m-wz94fs2enyvm6qhx3ged + cn-heyuan: + R81BYOLMGMT: m-f8z61z784gwfm1fhxgre + R81BYOLGW: m-f8z7wvp6hhvsvevtpb0j + R8110BYOLMGMT: m-f8z5o7741si10yq0piws + R8110BYOLGW: m-f8z985hmyc9d8951pr76 + R8120BYOLMGMT: m-f8zj0s3cyg3glnlz414g + R8120BYOLGW: m-f8z5o7741si10ssxdczf + cn-guangzhou: + R81BYOLMGMT: m-7xv95xjo0yd0lg4y1z9p + R81BYOLGW: m-7xv95xjo0yd0k0u54jwr + R8110BYOLMGMT: m-7xv4bih29ge5i2je9amd + R8110BYOLGW: m-7xv7i7fhzogppdgxa2cc + R8120BYOLMGMT: m-7xv3lyr4gpzmp8ei0qgi + R8120BYOLGW: m-7xv7i7fhzogp9v36ejbr + cn-chengdu: + R81BYOLMGMT: m-2vcho1h20xnncjlroavq + R81BYOLGW: m-2vc0m9vq9oty74yz83d4 + R8110BYOLMGMT: m-2vc13w2rjk7p9o285gtj + R8110BYOLGW: m-2vc13w2rjk7pp0ivotxs + R8120BYOLMGMT: m-2vc0nlbyccv29t5ql0oh + R8120BYOLGW: m-2vcd6ume44qej9ffhaxg diff --git a/terraform/alicloud/modules/images/main.tf b/terraform/alicloud/modules/images/main.tf new file mode 100755 index 00000000..86231617 --- /dev/null +++ b/terraform/alicloud/modules/images/main.tf @@ -0,0 +1,20 @@ +locals { + images_yaml_regionMap = yamldecode(split("Resources", file("${path.module}/images.yaml"))[0]).Mappings.RegionMap + images_yaml_converterMap = yamldecode(split("Resources", file("${path.module}/images.yaml"))[0]).Mappings.ConverterMap + + + // Variables example: + // version_license = "R81.20-BYOL" + // RESULT: + // version_license_key = "R81.20-BYOL-GW" + // version_license_value = "R8120BYOLGW" + + version_license_key = format("%s%s", var.version_license, var.chkp_type == "gateway" ? "-GW" : var.chkp_type == "management" ? "-MGMT" : "") + version_license_value = local.images_yaml_converterMap[local.version_license_key]["Value"] + + // Variables example: + // region = "us-east-1" + // version_license_key - see above + // RESULT: local.image_id = "m-1234567" + image_id = local.images_yaml_regionMap[local.region][local.version_license_value] +} \ No newline at end of file diff --git a/terraform/alicloud/modules/images/output.tf b/terraform/alicloud/modules/images/output.tf new file mode 100755 index 00000000..a4611551 --- /dev/null +++ b/terraform/alicloud/modules/images/output.tf @@ -0,0 +1,6 @@ +output "image_id" { + value = local.image_id +} +output "version_license_with_sufix" { + value = local.version_license_key +} \ No newline at end of file diff --git a/terraform/alicloud/modules/images/variables.tf b/terraform/alicloud/modules/images/variables.tf new file mode 100755 index 00000000..0c646605 --- /dev/null +++ b/terraform/alicloud/modules/images/variables.tf @@ -0,0 +1,20 @@ +data "alicloud_regions" "current" { + current = true +} +locals { + region = data.alicloud_regions.current.regions.0.id +} + +// --- Version and license --- +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} + +variable "version_license" { + type = string + description = "Version and license" + default = "R81.20-BYOL" +} + diff --git a/terraform/alicloud/modules/images/versions.tf b/terraform/alicloud/modules/images/versions.tf new file mode 100755 index 00000000..0ec4dcca --- /dev/null +++ b/terraform/alicloud/modules/images/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/vpc/locals.tf b/terraform/alicloud/modules/vpc/locals.tf new file mode 100755 index 00000000..1e3622f2 --- /dev/null +++ b/terraform/alicloud/modules/vpc/locals.tf @@ -0,0 +1,6 @@ +locals { + regex_valid_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" +} \ No newline at end of file diff --git a/terraform/alicloud/modules/vpc/main.tf b/terraform/alicloud/modules/vpc/main.tf new file mode 100755 index 00000000..55ae14a9 --- /dev/null +++ b/terraform/alicloud/modules/vpc/main.tf @@ -0,0 +1,38 @@ +// --- VPC --- +resource "alicloud_vpc" "vpc" { + cidr_block = var.vpc_cidr + vpc_name = var.vpc_name +} + +// --- Public Vswitch --- +resource "alicloud_vswitch" "publicVsw" { + for_each = var.public_vswitchs_map + + vpc_id = alicloud_vpc.vpc.id + zone_id = each.key + cidr_block = cidrsubnet(alicloud_vpc.vpc.cidr_block, var.vswitchs_bit_length, each.value) + vswitch_name = format("Public-vswitch-%s", each.value) + tags = {} +} + +// --- Management Vswitch --- +resource "alicloud_vswitch" "managementVsw" { + for_each = var.management_vswitchs_map + + vpc_id = alicloud_vpc.vpc.id + zone_id = each.key + cidr_block = cidrsubnet(alicloud_vpc.vpc.cidr_block, var.vswitchs_bit_length, each.value) + vswitch_name = format("Management-vswitch-%s", each.value) + tags = {} +} + +// --- Private Vswitch --- +resource "alicloud_vswitch" "privateVsw" { + for_each = var.private_vswitchs_map + + vpc_id = alicloud_vpc.vpc.id + zone_id = each.key + cidr_block = cidrsubnet(alicloud_vpc.vpc.cidr_block, var.vswitchs_bit_length, each.value) + vswitch_name = format("Private-vswitch-%s", each.value) + tags = {} +} diff --git a/terraform/alicloud/modules/vpc/output.tf b/terraform/alicloud/modules/vpc/output.tf new file mode 100755 index 00000000..ce218660 --- /dev/null +++ b/terraform/alicloud/modules/vpc/output.tf @@ -0,0 +1,15 @@ +output "vpc_id" { + value = alicloud_vpc.vpc.id +} +output "vpc_name" { + value = alicloud_vpc.vpc.name +} +output "public_vswitchs_ids_list" { + value = [for public_vswitch in alicloud_vswitch.publicVsw : public_vswitch.id ] +} +output "management_vswitchs_ids_list" { + value = [for management_vswitch in alicloud_vswitch.managementVsw : management_vswitch.id ] +} +output "private_vswitchs_ids_list" { + value = [for private_vswitch in alicloud_vswitch.privateVsw : private_vswitch.id] +} diff --git a/terraform/alicloud/modules/vpc/variables.tf b/terraform/alicloud/modules/vpc/variables.tf new file mode 100755 index 00000000..bb0807f5 --- /dev/null +++ b/terraform/alicloud/modules/vpc/variables.tf @@ -0,0 +1,23 @@ +variable "vpc_cidr" { + type = string +} +variable "vpc_name" { + type = string +} +variable "public_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"cn-hangzhou-e\" = 1} ) " +} +variable "management_vswitchs_map" { + type = map(string) + description = "(Optional) A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"cn-hangzhou-e\" = 3} ) " + default = {} +} +variable "private_vswitchs_map" { + type = map(string) + description = "A map of pairs {availability-zone = vswitch-suffix-number}. Each entry creates a vswitch. Minimum 1 pair. (e.g. {\"cn-hangzhou-f\" = 3} ) " +} +variable "vswitchs_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a vswitchs_bit_length value is 4, the resulting vswitch address will have length /20" +} diff --git a/terraform/alicloud/modules/vpc/versions.tf b/terraform/alicloud/modules/vpc/versions.tf new file mode 100755 index 00000000..906a4df0 --- /dev/null +++ b/terraform/alicloud/modules/vpc/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + alicloud = { + source = "hashicorp/alicloud" + version = "1.203.0" + } + } +} \ No newline at end of file diff --git a/terraform/aws/README.md b/terraform/aws/README.md new file mode 100644 index 00000000..9af36f4f --- /dev/null +++ b/terraform/aws/README.md @@ -0,0 +1,13 @@ +# Check Point CloudGuard Network Terraform deployment modules for AWS + +This project was developed to allow Terraform deployments for Check Point CloudGuard Network solutions on AWS. + + +These modules use Terraform's [AWS provider](https://www.terraform.io/docs/providers/aws/index.html) in order to create and provision resources on AWS. + + + ## Prerequisites + +1. [Download Terraform](https://www.terraform.io/downloads.html) and follow the instructions according to your OS. +2. Get started with Terraform AWS provider - refer to [Terraform AWS provider best practices](https://www.terraform.io/docs/providers/aws/index.html). +3. Subscribe to Check Point CloudGuard Network's offers - visit [AWS Marketplace](https://aws.amazon.com/marketplace/seller-profile?id=a979fc8a-dd48-42c8-84cc-63d5d50e3a2f). diff --git a/terraform/aws/autoscale-gwlb/README.md b/terraform/aws/autoscale-gwlb/README.md new file mode 100755 index 00000000..a156f3cc --- /dev/null +++ b/terraform/aws/autoscale-gwlb/README.md @@ -0,0 +1,185 @@ +# Check Point CloudGuard Network Auto Scaling GWLB Terraform module for AWS + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into an existing VPC. + +These types of Terraform resources are supported: +* [Launch template](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) +* [Auto Scaling Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) +* [Security group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) +* [CloudWatch Metric Alarm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) + + +See the [CloudGuard Auto Scaling for AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CloudGuard_Network_for_AWS_AutoScaling_DeploymentGuide/Topics-AWS-AutoScale-DG/Check-Point-CloudGuard-Network-for-AWS.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/autoscale/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Environment --- + prefix = "env1" + asg_name = "autoscaling_group" + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + subnet_ids = ["subnet-abc123", "subnet-def456"] + + // --- Automatic Provisioning with Security Management Server Settings --- + gateways_provision_address_type = "private" + allocate_public_IP = false + management_server = "mgmt_env1" + configuration_template = "tmpl_env1" + + // --- EC2 Instances Configuration --- + gateway_name = "asg_gateway" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + instances_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Auto Scaling Configuration --- + minimum_group_size = 2 + maximum_group_size = 10 + target_groups = ["arn:aws:tg1/abc123", "arn:aws:tg2/def456"] + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_instance_connect = false + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + + +- Conditional creation + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission +- To tear down your resources: + ``` + terraform destroy + ``` + + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | +| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | +| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | +| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + +## Outputs +| Name | Description | +|------------------------------------------------|-------------------------------------------------------------------| +| autoscale_autoscaling_group_name | The name of the deployed AutoScaling Group | +| autoscale_autoscaling_group_arn | The ARN for the deployed AutoScaling Group | +| autoscale_autoscaling_group_availability_zones | The AZs on which the Autoscaling Group is configured | +| autoscale_autoscaling_group_desired_capacity | The deployed AutoScaling Group's desired capacity of instances | +| autoscale_autoscaling_group_min_size | The deployed AutoScaling Group's minimum number of instances | +| autoscale_autoscaling_group_max_size | The deployed AutoScaling Group's maximum number of instances | +| autoscale_autoscaling_group_target_group_arns | The deployed AutoScaling Group's configured target groups | +| autoscale_autoscaling_group_subnets | The subnets on which the deployed AutoScaling Group is configured | +| autoscale_launch_template_id | The id of the Launch Template | +| autoscale_autoscale_security_group_id | The deployed AutoScaling Group's security group id | +| autoscale_iam_role_name | The deployed AutoScaling Group's IAM role name (if created) | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20220414 | First release of Check Point Auto Scaling GWLB Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240414 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/autoscale-gwlb/asg_userdata.yaml b/terraform/aws/autoscale-gwlb/asg_userdata.yaml new file mode 100755 index 00000000..bb095c01 --- /dev/null +++ b/terraform/aws/autoscale-gwlb/asg_userdata.yaml @@ -0,0 +1,29 @@ +#cloud-config +network: + version: 1 + config: + - type: bridge + name: br0 + mtu: *eth0-mtu + subnets: + - address: *eth0-private + type: static + gateway: *default-gateway + dns_nameservers: + - *eth0-dns1 + bridge_interfaces: + - eth0 +kernel_parameters: + sim: + - sim_geneve_enabled=1 + - sim_geneve_br_dev=br0 + fw: + + - fwtls_bridge_mode_inspection=1 + - fw_geneve_enabled=1 +bootcmd: + - echo "brctl hairpin br0 eth0 on" >> /etc/rc.local + - echo "cpprod_util CPPROD_SetValue \"fw1\" \"AwsGwlb\" 4 1 1" >> /etc/rc.local +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"autoscale_gwlb\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/autoscale-gwlb/locals.tf b/terraform/aws/autoscale-gwlb/locals.tf new file mode 100755 index 00000000..ef1abdf2 --- /dev/null +++ b/terraform/aws/autoscale-gwlb/locals.tf @@ -0,0 +1,56 @@ +locals { + asg_name = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.asg_name) + create_iam_role = var.enable_cloudwatch ? 1 : 0 + + gateways_provision_address_type_allowed_values = [ + "public", + "private" + ] + // Will fail if var.gateways_provision_address_type is invalid + validate_gateways_provision_address_type = index(local.gateways_provision_address_type_allowed_values, var.gateways_provision_address_type) + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SICKey is invalid + regex_sic_result = regex(local.regex_valid_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SICKey] must be at least 8 alphanumeric characters" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + + tags_asg_format = null_resource.tags_as_list_of_maps.*.triggers + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_SICkey_base64 = base64encode(var.gateway_SICKey) + gateway_password_hash_base64 = base64encode(var.gateway_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) + is_gwlb_ami = length(regexall(".*R80.40.*", var.gateway_version)) > 0 + +} +resource "null_resource" "tags_as_list_of_maps" { + count = length(keys(var.instances_tags)) + + triggers = { + "key" = keys(var.instances_tags)[count.index] + "value" = values(var.instances_tags)[count.index] + "propagate_at_launch" = "true" + } +} diff --git a/terraform/aws/autoscale-gwlb/main.tf b/terraform/aws/autoscale-gwlb/main.tf new file mode 100755 index 00000000..3c7b7948 --- /dev/null +++ b/terraform/aws/autoscale-gwlb/main.tf @@ -0,0 +1,202 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + version_license = var.gateway_version + amis_url = local.is_gwlb_ami == true ? "https://cgi-cfts.s3.amazonaws.com/gwlb/amis-gwlb.yaml" : "https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml" + +} + +resource "aws_security_group" "permissive_sg" { + name_prefix = format("%s_PermissiveSecurityGroup", local.asg_name) + description = "Permissive security group" + vpc_id = var.vpc_id + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + tags = { + Name = format("%s_PermissiveSecurityGroup", local.asg_name) + } +} + +resource "aws_launch_template" "asg_launch_template" { + name_prefix = local.asg_name + image_id = module.amis.ami_id + instance_type = var.gateway_instance_type + key_name = var.key_name + network_interfaces { + associate_public_ip_address = var.allocate_public_IP + security_groups = [aws_security_group.permissive_sg.id] + } + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + iam_instance_profile { + name = ( var.enable_cloudwatch ? aws_iam_instance_profile.instance_profile[0].name : "") + } + + monitoring { + enabled = true + } + + block_device_mappings { + device_name = "/dev/xvda" + ebs { + volume_type = var.volume_type + volume_size = var.volume_size + encrypted = var.enable_volume_encryption + } + } + + description = "Initial template version" + + user_data = base64encode(templatefile("${path.module}/asg_userdata.yaml", { + // script's arguments + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64, + EnableCloudWatch = var.enable_cloudwatch, + EnableInstanceConnect = var.enable_instance_connect, + Shell = var.admin_shell, + SICKey = local.gateway_SICkey_base64, + AllowUploadDownload = var.allow_upload_download, + BootstrapScript = local.gateway_bootstrap_script64, + OsVersion = local.version_split + })) +} +resource "aws_autoscaling_group" "asg" { + name_prefix = local.asg_name + launch_template { + id = aws_launch_template.asg_launch_template.id + version = aws_launch_template.asg_launch_template.latest_version + } + min_size = var.minimum_group_size + max_size = var.maximum_group_size + target_group_arns = var.target_groups + vpc_zone_identifier = var.subnet_ids + health_check_grace_period = 3600 + health_check_type = "ELB" + + tag { + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) + propagate_at_launch = true + } + + tag { + key = "x-chkp-tags" + value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) + propagate_at_launch = true + } + + tag { + key = "x-chkp-topology" + value = "internal" + propagate_at_launch = true + } + + tag { + key = "x-chkp-solution" + value = "autoscale_gwlb" + propagate_at_launch = true + } + + dynamic "tag" { + for_each = var.instances_tags + content { + key = tag.key + value = tag.value + propagate_at_launch = true + } + } +} + +data "aws_iam_policy_document" "assume_role_policy_document" { + version = "2012-10-17" + statement { + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + effect = "Allow" + } +} + +resource "aws_iam_role" "role" { + count = local.create_iam_role + name_prefix = format("%s-iam_role", local.asg_name) + assume_role_policy = data.aws_iam_policy_document.assume_role_policy_document.json + path = "/" +} +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.create_iam_role + role = aws_iam_role.role[count.index].name + tag_name = local.asg_name +} +resource "aws_iam_instance_profile" "instance_profile" { + count = local.create_iam_role + name_prefix = format("%s-iam_instance_profile", local.asg_name) + path = "/" + role = aws_iam_role.role[count.index].name +} + +// Scaling metrics +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_low" { + alarm_name = format("%s_alarm_low", aws_autoscaling_group.asg.name) + metric_name = "CPUUtilization" + alarm_description = "Scale-down if CPU < 60% for 10 minutes" + namespace = "AWS/EC2" + statistic = "Average" + period = 300 + evaluation_periods = 2 + threshold = 60 + alarm_actions = [aws_autoscaling_policy.scale_down_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.asg.name + } + comparison_operator = "LessThanThreshold" +} +resource "aws_autoscaling_policy" "scale_down_policy" { + autoscaling_group_name = aws_autoscaling_group.asg.name + name = format("%s_scale_down", aws_autoscaling_group.asg.name) + adjustment_type = "ChangeInCapacity" + cooldown = 300 + scaling_adjustment = -1 +} +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_high" { + alarm_name = format("%s_alarm_high", aws_autoscaling_group.asg.name) + metric_name = "CPUUtilization" + alarm_description = "Scale-up if CPU > 80% for 10 minutes" + namespace = "AWS/EC2" + statistic = "Average" + period = 300 + evaluation_periods = 2 + threshold = 80 + alarm_actions = [aws_autoscaling_policy.scale_up_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.asg.name + } + comparison_operator = "GreaterThanThreshold" +} +resource "aws_autoscaling_policy" "scale_up_policy" { + autoscaling_group_name = aws_autoscaling_group.asg.name + name = format("%s_scale_up", aws_autoscaling_group.asg.name) + adjustment_type = "ChangeInCapacity" + cooldown = 300 + scaling_adjustment = 1 +} diff --git a/terraform/aws/autoscale-gwlb/output.tf b/terraform/aws/autoscale-gwlb/output.tf new file mode 100755 index 00000000..ce5f76ce --- /dev/null +++ b/terraform/aws/autoscale-gwlb/output.tf @@ -0,0 +1,41 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} + +output "autoscale_autoscaling_group_name" { + value = aws_autoscaling_group.asg.name +} +output "autoscale_autoscaling_group_arn" { + value = aws_autoscaling_group.asg.arn +} +output "autoscale_autoscaling_group_availability_zones" { + value = aws_autoscaling_group.asg.availability_zones +} +output "autoscale_autoscaling_group_desired_capacity" { + value = aws_autoscaling_group.asg.desired_capacity +} +output "autoscale_autoscaling_group_min_size" { + value = aws_autoscaling_group.asg.min_size +} +output "autoscale_autoscaling_group_max_size" { + value = aws_autoscaling_group.asg.max_size +} +output "autoscale_autoscaling_group_target_group_arns" { + value = aws_autoscaling_group.asg.target_group_arns +} +output "autoscale_autoscaling_group_subnets" { + value = aws_autoscaling_group.asg.vpc_zone_identifier +} + +output "autoscale_launch_template_id" { + value = aws_launch_template.asg_launch_template.id +} + +output "autoscale_security_group_id" { + value = aws_security_group.permissive_sg.id +} + +output "autoscale_iam_role_name" { + value = aws_iam_role.role.*.name +} + diff --git a/terraform/aws/autoscale-gwlb/terraform.tfvars b/terraform/aws/autoscale-gwlb/terraform.tfvars new file mode 100755 index 00000000..4cced958 --- /dev/null +++ b/terraform/aws/autoscale-gwlb/terraform.tfvars @@ -0,0 +1,42 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Environment --- +prefix = "env1" +asg_name = "autoscaling_group" + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +subnet_ids = ["subnet-abc123", "subnet-def456"] + +// --- Automatic Provisioning with Security Management Server Settings --- +gateways_provision_address_type = "private" +allocate_public_IP = false +management_server = "mgmt_env1" +configuration_template = "tmpl_env1" + +// --- EC2 Instances Configuration --- +gateway_name = "asg_gateway" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +instances_tags = { + key1 = "value1" + key2 = "value2" +} +metadata_imdsv2_required = true + +// --- Auto Scaling Configuration --- +minimum_group_size = 2 +maximum_group_size = 10 +target_groups = ["arn:aws:tg1/abc123", "arn:aws:tg2/def456"] + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_instance_connect = false +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + diff --git a/terraform/aws/autoscale-gwlb/variables.tf b/terraform/aws/autoscale-gwlb/variables.tf new file mode 100644 index 00000000..cb1a985c --- /dev/null +++ b/terraform/aws/autoscale-gwlb/variables.tf @@ -0,0 +1,191 @@ +// Module: Check Point CloudGuard Network Auto Scaling Group into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Environment --- +variable "prefix" { + type = string + description = "(Optional) Instances name prefix" + default = "" +} +variable "asg_name" { + type = string + description = "Autoscaling Group name" + default = "Check-Point-ASG-tf" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "subnet_ids" { + type = list(string) + description = "List of public subnet IDs to launch resources into. Recommended at least 2" +} + +// --- Automatic Provisioning with Security Management Server Settings --- +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} + +variable "allocate_public_IP" { + type = bool + description = "Allocate an Elastic IP for security gateway." + default = false +} + +resource "null_resource" "invalid_allocation" { + // Will fail if var.gateways_provision_address_type is public and var.allocate_public_IP is false + count = var.gateways_provision_address_type != "public" ? 0 : var.allocate_public_IP == true ? 0 : "Gateway's selected to be provisioned by public IP, but [allocate_public_IP] parameter is false" +} + +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the CME configuration" +} +variable "configuration_template" { + type = string + description = "Name of the provisioning template in the CME configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters." + } +} + +// --- EC2 Instances Configuration --- +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateways instances" + default = "Check-Point-ASG-gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "instances_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances" + default = {} +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} + +// --- Auto Scaling Configuration --- +variable "minimum_group_size" { + type = number + description = "The minimum number of instances in the Auto Scaling group" + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximum number of instances in the Auto Scaling group" + default = 10 +} +variable "target_groups" { + type = list(string) + description = "(Optional) List of Target Group ARNs to associate with the Auto Scaling group" + default = [] +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gwlb_gw" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} + +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} \ No newline at end of file diff --git a/terraform/aws/autoscale-gwlb/versions.tf b/terraform/aws/autoscale-gwlb/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/autoscale-gwlb/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/autoscale/README.md b/terraform/aws/autoscale/README.md new file mode 100755 index 00000000..eb13ecd4 --- /dev/null +++ b/terraform/aws/autoscale/README.md @@ -0,0 +1,199 @@ +# Check Point CloudGuard Network Auto Scaling Terraform module for AWS + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into an existing VPC. + +These types of Terraform resources are supported: +* [Launch template](https://www.terraform.io/docs/providers/aws/r/launch_template.html) +* [Auto Scaling Group](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html) +* [Security group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [CloudWatch Metric Alarm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation +* [Proxy Elastic Load Balancer](https://www.terraform.io/docs/providers/aws/r/elb.html) - conditional creation + + +See the [CloudGuard Auto Scaling for AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CloudGuard_Network_for_AWS_AutoScaling_DeploymentGuide/Default.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/autoscale/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Environment --- + prefix = "env1" + asg_name = "autoscaling_group" + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + subnet_ids = ["subnet-abc123", "subnet-def456"] + + // --- Automatic Provisioning with Security Management Server Settings --- + gateways_provision_address_type = "private" + management_server = "mgmt_env1" + configuration_template = "tmpl_env1" + + // --- EC2 Instances Configuration --- + gateway_name = "asg_gateway" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + instances_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Auto Scaling Configuration --- + minimum_group_size = 2 + maximum_group_size = 10 + target_groups = ["arn:aws:tg1/abc123", "arn:aws:tg2/def456"] + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_instance_connect = false + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + // --- Outbound Proxy Configuration (optional) --- + proxy_elb_type = "internet-facing" + proxy_elb_clients = "0.0.0.0/0" + proxy_elb_port = 8080 + ``` + +- Conditional creation + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To create an ASG configuration without a proxy ELB: + ``` + proxy_elb_type= "none" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | +| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | +| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | +| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| proxy_elb_type | Type of ELB to create as an HTTP/HTTPS outbound proxy | string | - none
- internal
- internet-facing | none | no | +| proxy_elb_port | The TCP port on which the proxy will be listening | number | n/a | 8080 | no | +| proxy_elb_clients | The CIDR range of the clients of the proxy | string | n/a | 0.0.0.0/0 | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|------------------------------------------------|-------------------------------------------------------------------| +| autoscale_autoscaling_group_name | The name of the deployed AutoScaling Group | +| autoscale_autoscaling_group_arn | The ARN for the deployed AutoScaling Group | +| autoscale_autoscaling_group_availability_zones | The AZs on which the Autoscaling Group is configured | +| autoscale_autoscaling_group_desired_capacity | The deployed AutoScaling Group's desired capacity of instances | +| autoscale_autoscaling_group_min_size | The deployed AutoScaling Group's minimum number of instances | +| autoscale_autoscaling_group_max_size | The deployed AutoScaling Group's maximum number of instances | +| autoscale_autoscaling_group_load_balancers | The deployed AutoScaling Group's configured load balancers | +| autoscale_autoscaling_group_target_group_arns | The deployed AutoScaling Group's configured target groups | +| autoscale_autoscaling_group_subnets | The subnets on which the deployed AutoScaling Group is configured | +| autoscale_launch_template_id | The id of the Launch Template | +| autoscale_autoscale_security_group_id | The deployed AutoScaling Group's security group id | +| autoscale_iam_role_name | The deployed AutoScaling Group's IAM role name (if created) | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20200318 | First release of Check Point Auto Scaling Terraform module for AWS | +| 20210309 | AWS Terraform modules refactor | +| 20210329 | Stability fixes | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240414 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/autoscale/asg_userdata.yaml b/terraform/aws/autoscale/asg_userdata.yaml new file mode 100755 index 00000000..ea6de749 --- /dev/null +++ b/terraform/aws/autoscale/asg_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"autoscale\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" diff --git a/terraform/aws/autoscale/locals.tf b/terraform/aws/autoscale/locals.tf new file mode 100755 index 00000000..72fa5951 --- /dev/null +++ b/terraform/aws/autoscale/locals.tf @@ -0,0 +1,62 @@ +locals { + asg_name = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.asg_name) + create_iam_role = var.enable_cloudwatch ? 1 : 0 + + gateways_provision_address_type_allowed_values = [ + "public", + "private" + ] + // Will fail if var.gateways_provision_address_type is invalid + validate_gateways_provision_address_type = index(local.gateways_provision_address_type_allowed_values, var.gateways_provision_address_type) + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SICKey is invalid + regex_sic_result = regex(local.regex_valid_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SICKey] must be at least 8 alphanumeric characters" + + proxy_elb_type_allowed_values = [ + "none", + "internal", + "internet-facing" + ] + // Will fail if var.proxy_elb_type is invalid + validate_proxy_elb_type = index(local.proxy_elb_type_allowed_values, var.proxy_elb_type) + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.proxy_elb_clients is invalid + regex_cidr_result = regex(local.regex_valid_cidr_range, var.proxy_elb_clients) == var.proxy_elb_clients ? 0 : "Variable [proxy_elb_clients] must be a valid CIDR range" + + tags_asg_format = null_resource.tags_as_list_of_maps.*.triggers + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_password_hash_base64 = base64encode(var.gateway_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) + gateway_SICkey_base64 = base64encode(var.gateway_SICKey) +} +resource "null_resource" "tags_as_list_of_maps" { + count = length(keys(var.instances_tags)) + + triggers = { + "key" = keys(var.instances_tags)[count.index] + "value" = values(var.instances_tags)[count.index] + "propagate_at_launch" = "true" + } +} \ No newline at end of file diff --git a/terraform/aws/autoscale/main.tf b/terraform/aws/autoscale/main.tf new file mode 100755 index 00000000..dea10eca --- /dev/null +++ b/terraform/aws/autoscale/main.tf @@ -0,0 +1,248 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.gateway_version +} + +resource "aws_security_group" "permissive_sg" { + name_prefix = format("%s_PermissiveSecurityGroup", local.asg_name) + description = "Permissive security group" + vpc_id = var.vpc_id + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + tags = { + Name = format("%s_PermissiveSecurityGroup", local.asg_name) + } +} + +resource "aws_launch_template" "asg_launch_template" { + name_prefix = local.asg_name + image_id = module.amis.ami_id + instance_type = var.gateway_instance_type + key_name = var.key_name + network_interfaces { + associate_public_ip_address = true + security_groups = [aws_security_group.permissive_sg.id] + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + iam_instance_profile { + name = ( var.enable_cloudwatch ? aws_iam_instance_profile.instance_profile[0].name : "") + } + monitoring { + enabled = true + } + + block_device_mappings { + device_name = "/dev/xvda" + ebs { + volume_type = "gp3" + volume_size = var.volume_size + encrypted = var.enable_volume_encryption + } + } + description = "Initial template version" + + + user_data = base64encode(templatefile("${path.module}/asg_userdata.yaml", { + // script's arguments + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64 + EnableCloudWatch = var.enable_cloudwatch, + EnableInstanceConnect = var.enable_instance_connect, + Shell = var.admin_shell, + SICKey = local.gateway_SICkey_base64, + AllowUploadDownload = var.allow_upload_download, + BootstrapScript = local.gateway_bootstrap_script64, + OsVersion = local.version_split + })) +} +resource "aws_autoscaling_group" "asg" { + name_prefix = local.asg_name + launch_template { + id = aws_launch_template.asg_launch_template.id + version = aws_launch_template.asg_launch_template.latest_version + } + min_size = var.minimum_group_size + max_size = var.maximum_group_size + load_balancers = aws_elb.proxy_elb.*.name + target_group_arns = var.target_groups + vpc_zone_identifier = var.subnet_ids + health_check_grace_period = 3600 + health_check_type = "ELB" + + tag { + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) + propagate_at_launch = true + } + + tag { + key = "x-chkp-tags" + value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) + propagate_at_launch = true + } + + dynamic "tag" { + for_each = var.instances_tags + content { + key = tag.key + value = tag.value + propagate_at_launch = true + } + } +} + +data "aws_iam_policy_document" "assume_role_policy_document" { + version = "2012-10-17" + statement { + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + effect = "Allow" + } +} + +resource "aws_iam_role" "role" { + count = local.create_iam_role + name_prefix = format("%s-iam_role", local.asg_name) + assume_role_policy = data.aws_iam_policy_document.assume_role_policy_document.json + path = "/" +} +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.create_iam_role + role = aws_iam_role.role[count.index].name + tag_name = local.asg_name +} + +resource "aws_iam_instance_profile" "instance_profile" { + count = local.create_iam_role + name_prefix = format("%s-iam_instance_profile", local.asg_name) + path = "/" + role = aws_iam_role.role[count.index].name +} + +// Proxy ELB +locals { + proxy_elb_condition = var.proxy_elb_type != "none" ? 1 : 0 +} +resource "random_id" "proxy_elb_uuid" { + byte_length = 5 +} +resource "aws_elb" "proxy_elb" { + count = local.proxy_elb_condition + name = format("%s-proxy-elb-%s", var.prefix, random_id.proxy_elb_uuid.hex) + internal = var.proxy_elb_type == "internal" + cross_zone_load_balancing = true + listener { + instance_port = var.proxy_elb_port + instance_protocol = "TCP" + lb_port = var.proxy_elb_port + lb_protocol = "TCP" + } + health_check { + target = format("TCP:%s", var.proxy_elb_port) + healthy_threshold = 3 + unhealthy_threshold = 5 + interval = 30 + timeout = 5 + } + subnets = var.subnet_ids + security_groups = [aws_security_group.elb_security_group[count.index].id] +} +resource "aws_load_balancer_policy" "proxy_elb_policy" { + count = local.proxy_elb_condition + load_balancer_name = aws_elb.proxy_elb[count.index].name + policy_name = "EnableProxyProtocol" + policy_type_name = "ProxyProtocolPolicyType" + + policy_attribute { + name = "ProxyProtocol" + value = "true" + } +} +resource "aws_security_group" "elb_security_group" { + count = local.proxy_elb_condition + description = "ELB security group" + vpc_id = var.vpc_id + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + protocol = "tcp" + cidr_blocks = [var.proxy_elb_clients] + from_port = var.proxy_elb_port + to_port = var.proxy_elb_port + } +} + +// Scaling metrics +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_low" { + alarm_name = format("%s_alarm_low", aws_autoscaling_group.asg.name) + metric_name = "CPUUtilization" + alarm_description = "Scale-down if CPU < 60% for 10 minutes" + namespace = "AWS/EC2" + statistic = "Average" + period = 300 + evaluation_periods = 2 + threshold = 60 + alarm_actions = [aws_autoscaling_policy.scale_down_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.asg.name + } + comparison_operator = "LessThanThreshold" +} +resource "aws_autoscaling_policy" "scale_down_policy" { + autoscaling_group_name = aws_autoscaling_group.asg.name + name = format("%s_scale_down", aws_autoscaling_group.asg.name) + adjustment_type = "ChangeInCapacity" + cooldown = 300 + scaling_adjustment = -1 +} +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_high" { + alarm_name = format("%s_alarm_high", aws_autoscaling_group.asg.name) + metric_name = "CPUUtilization" + alarm_description = "Scale-up if CPU > 80% for 10 minutes" + namespace = "AWS/EC2" + statistic = "Average" + period = 300 + evaluation_periods = 2 + threshold = 80 + alarm_actions = [aws_autoscaling_policy.scale_up_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.asg.name + } + comparison_operator = "GreaterThanThreshold" +} +resource "aws_autoscaling_policy" "scale_up_policy" { + autoscaling_group_name = aws_autoscaling_group.asg.name + name = format("%s_scale_up", aws_autoscaling_group.asg.name) + adjustment_type = "ChangeInCapacity" + cooldown = 300 + scaling_adjustment = 1 +} diff --git a/terraform/aws/autoscale/output.tf b/terraform/aws/autoscale/output.tf new file mode 100755 index 00000000..152bb744 --- /dev/null +++ b/terraform/aws/autoscale/output.tf @@ -0,0 +1,43 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} + +output "autoscale_autoscaling_group_name" { + value = aws_autoscaling_group.asg.name +} +output "autoscale_autoscaling_group_arn" { + value = aws_autoscaling_group.asg.arn +} +output "autoscale_autoscaling_group_availability_zones" { + value = aws_autoscaling_group.asg.availability_zones +} +output "autoscale_autoscaling_group_desired_capacity" { + value = aws_autoscaling_group.asg.desired_capacity +} +output "autoscale_autoscaling_group_min_size" { + value = aws_autoscaling_group.asg.min_size +} +output "autoscale_autoscaling_group_max_size" { + value = aws_autoscaling_group.asg.max_size +} +output "autoscale_autoscaling_group_load_balancers" { + value = aws_autoscaling_group.asg.load_balancers +} +output "autoscale_autoscaling_group_target_group_arns" { + value = aws_autoscaling_group.asg.target_group_arns +} +output "autoscale_autoscaling_group_subnets" { + value = aws_autoscaling_group.asg.vpc_zone_identifier +} +output "autoscale_launch_template_id" { + value = aws_launch_template.asg_launch_template.id +} + +output "autoscale_security_group_id" { + value = aws_security_group.permissive_sg.id +} + +output "autoscale_iam_role_name" { + value = aws_iam_role.role.*.name +} + diff --git a/terraform/aws/autoscale/terraform.tfvars b/terraform/aws/autoscale/terraform.tfvars new file mode 100755 index 00000000..d513fcd5 --- /dev/null +++ b/terraform/aws/autoscale/terraform.tfvars @@ -0,0 +1,45 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Environment --- +prefix = "env1" +asg_name = "autoscaling_group" + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +subnet_ids = ["subnet-abc123", "subnet-def456"] + +// --- Automatic Provisioning with Security Management Server Settings --- +gateways_provision_address_type = "private" +management_server = "mgmt_env1" +configuration_template = "tmpl_env1" + +// --- EC2 Instances Configuration --- +gateway_name = "asg_gateway" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +instances_tags = { + key1 = "value1" + key2 = "value2" +} +metadata_imdsv2_required = true + +// --- Auto Scaling Configuration --- +minimum_group_size = 2 +maximum_group_size = 10 +target_groups = ["arn:aws:tg1/abc123", "arn:aws:tg2/def456"] + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_instance_connect = false +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + +// --- Outbound Proxy Configuration (optional) --- +proxy_elb_type = "internet-facing" +proxy_elb_clients = "0.0.0.0/0" +proxy_elb_port = 8080 diff --git a/terraform/aws/autoscale/variables.tf b/terraform/aws/autoscale/variables.tf new file mode 100755 index 00000000..81d256ab --- /dev/null +++ b/terraform/aws/autoscale/variables.tf @@ -0,0 +1,190 @@ +// Module: Check Point CloudGuard Network Auto Scaling Group into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Environment --- +variable "prefix" { + type = string + description = "(Optional) Instances name prefix" + default = "" +} +variable "asg_name" { + type = string + description = "Autoscaling Group name" + default = "Check-Point-ASG-tf" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "subnet_ids" { + type = list(string) + description = "List of public subnet IDs to launch resources into. Recommended at least 2" +} + +// --- Automatic Provisioning with Security Management Server Settings --- +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the CME configuration" +} +variable "configuration_template" { + type = string + description = "Name of the provisioning template in the CME configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters." + } +} + +// --- EC2 Instances Configuration --- +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateways instances" + default = "Check-Point-ASG-gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "instances_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances" + default = {} +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} + +// --- Auto Scaling Configuration --- +variable "minimum_group_size" { + type = number + description = "The minimum number of instances in the Auto Scaling group" + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximum number of instances in the Auto Scaling group" + default = 10 +} +variable "target_groups" { + type = list(string) + description = "(Optional) List of Target Group ARNs to associate with the Auto Scaling group" + default = [] +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} + +// --- (Optional) Outbound Proxy Configuration --- +variable "proxy_elb_type" { + type = string + description = "Type of ELB to create as an HTTP/HTTPS outbound proxy" + default = "none" +} +variable "proxy_elb_port" { + type = number + description = "The TCP port on which the proxy will be listening" + default = 8080 +} +variable "proxy_elb_clients" { + type = string + description = "The CIDR range of the clients of the proxy" + default = "0.0.0.0/0" +} diff --git a/terraform/aws/autoscale/versions.tf b/terraform/aws/autoscale/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/autoscale/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/cluster-master/README.md b/terraform/aws/cluster-master/README.md new file mode 100755 index 00000000..cfabfd18 --- /dev/null +++ b/terraform/aws/cluster-master/README.md @@ -0,0 +1,221 @@ +# Check Point CloudGuard Network Security Cluster Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cluster into a new VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk104418) for additional information + +This solution uses the following modules: +- /terraform/aws/cluster +- /terraform/aws/modules/amis +- /terraform/aws/modules/vpc +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cluster-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cluster: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cluster: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cluster-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + - Due to terraform limitation, the apply command is: + ``` + terraform apply -target=aws_route_table.private_subnet_rtb -auto-approve && terraform apply + ``` + >Once terraform is updated, we will update accordingly. + +- Variables are configured in /terraform/aws/cluster-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + } + private_subnets_map = { + "us-east-1a" = 2 + } + subnets_bit_length = 8 + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to each cluster member instance: + ``` + allocate_and_associate_eip = "true" + ``` + - To create IAM Role: + ``` + predefined_role = "" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint module.launch_cluster_into_vpc.aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pairs. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + +## Outputs +| Name | Description | +|--------------------|-----------------------------------------------------| +| ami_id | The ami id of the deployed Security Cluster members | +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Cluster Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/cluster-master/locals.tf b/terraform/aws/cluster-master/locals.tf new file mode 100755 index 00000000..b77484fe --- /dev/null +++ b/terraform/aws/cluster-master/locals.tf @@ -0,0 +1,52 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + create_iam_role = var.predefined_role == "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" +} diff --git a/terraform/aws/cluster-master/main.tf b/terraform/aws/cluster-master/main.tf new file mode 100755 index 00000000..29746863 --- /dev/null +++ b/terraform/aws/cluster-master/main.tf @@ -0,0 +1,64 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + subnets_bit_length = var.subnets_bit_length +} + +resource "aws_route_table" "private_subnet_rtb" { + depends_on = [module.launch_vpc] + vpc_id = module.launch_vpc.vpc_id + tags = { + Name = "Private Subnets Route Table" + } +} +resource "aws_route_table_association" "private_rtb_to_private_subnets" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[0] +} +module "launch_cluster_into_vpc" { + source = "../cluster" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + public_subnet_id = module.launch_vpc.public_subnets_ids_list[0] + private_subnet_id = module.launch_vpc.private_subnets_ids_list[0] + private_route_table = aws_route_table.private_subnet_rtb.id + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + predefined_role = var.predefined_role + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + memberAToken = var.memberAToken + memberBToken = var.memberBToken + resources_tag_name = var.resources_tag_name + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp +} diff --git a/terraform/aws/cluster-master/output.tf b/terraform/aws/cluster-master/output.tf new file mode 100755 index 00000000..c1f47385 --- /dev/null +++ b/terraform/aws/cluster-master/output.tf @@ -0,0 +1,24 @@ +output "ami_id" { + value = module.launch_cluster_into_vpc.ami_id +} +output "cluster_public_ip" { + value = module.launch_cluster_into_vpc.cluster_public_ip +} +output "member_a_public_ip" { + value = module.launch_cluster_into_vpc.member_a_public_ip +} +output "member_b_public_ip" { + value = module.launch_cluster_into_vpc.member_b_public_ip +} +output "member_a_ssh" { + value = module.launch_cluster_into_vpc.member_a_ssh +} +output "member_b_ssh" { + value = module.launch_cluster_into_vpc.member_b_ssh +} +output "member_a_url" { + value = module.launch_cluster_into_vpc.member_a_url +} +output "member_b_url" { + value = module.launch_cluster_into_vpc.member_b_url +} \ No newline at end of file diff --git a/terraform/aws/cluster-master/terraform.tfvars b/terraform/aws/cluster-master/terraform.tfvars new file mode 100755 index 00000000..1e7b2c78 --- /dev/null +++ b/terraform/aws/cluster-master/terraform.tfvars @@ -0,0 +1,47 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 +} +private_subnets_map = { + "us-east-1a" = 2 +} +subnets_bit_length = 8 + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/cluster-master/variables.tf b/terraform/aws/cluster-master/variables.tf new file mode 100755 index 00000000..d1faf72c --- /dev/null +++ b/terraform/aws/cluster-master/variables.tf @@ -0,0 +1,183 @@ +// Module: Check Point CloudGuard Network Security Cluster into a new VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pairs. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instance" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/cluster-master/versions.tf b/terraform/aws/cluster-master/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/cluster-master/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/cluster/README.md b/terraform/aws/cluster/README.md new file mode 100755 index 00000000..073c7fe7 --- /dev/null +++ b/terraform/aws/cluster/README.md @@ -0,0 +1,201 @@ +# Check Point CloudGuard Network Security Cluster Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cluster into an existing VPC on AWS. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) - conditional creation +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk104418) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cluster/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cluster/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/cluster/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + public_subnet_id = "subnet-123456" + private_subnet_id = "subnet-345678" + private_route_table = "rtb-12345678" + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to each cluster member instance: + ``` + allocate_and_associate_eip = "true" + ``` + - To create IAM Role: + ``` + predefined_role = "" + ``` + - To create route from '0.0.0.0/0' to the Active Cluster member instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + +## Outputs +| Name | Description | +|--------------------|-----------------------------------------------------| +| ami_id | The ami id of the deployed Security Cluster members | +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Cluster Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/cluster/cluster_member_a_userdata.yaml b/terraform/aws/cluster/cluster_member_a_userdata.yaml new file mode 100755 index 00000000..6329e2cf --- /dev/null +++ b/terraform/aws/cluster/cluster_member_a_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberAPublicAddress}\" templateVersion=\"20231012\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cluster/cluster_member_b_userdata.yaml b/terraform/aws/cluster/cluster_member_b_userdata.yaml new file mode 100755 index 00000000..36d29dc5 --- /dev/null +++ b/terraform/aws/cluster/cluster_member_b_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberBPublicAddress}\" templateVersion=\"20231012\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cluster/locals.tf b/terraform/aws/cluster/locals.tf new file mode 100755 index 00000000..d64b39e7 --- /dev/null +++ b/terraform/aws/cluster/locals.tf @@ -0,0 +1,69 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + enable_cloudwatch_policy = var.enable_cloudwatch ? 1 : 0 + create_iam_role = var.predefined_role == "" ? 1 : 0 + provided_roue_table = var.private_route_table == "" ? 0 : 1 + internal_route_table_condition = var.private_route_table != "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + regex_token_valid = "(^https://(.+).checkpoint.com/app/maas/api/v1/tenant(.+)|^$)" + //TokenA: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenA = split(" ", var.memberAToken) + tokenA_decode = base64decode(element(local.split_tokenA, length(local.split_tokenA)-1)) + regex_tokenA = regex(local.regex_token_valid, local.tokenA_decode) == local.tokenA_decode ? 0 : "Smart-1 Cloud token A is invalid format" + + //TokenB: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenB = split(" ", var.memberBToken) + tokenB_decode = base64decode(element(local.split_tokenB, length(local.split_tokenB)-1)) + regex_tokenB = regex(local.regex_token_valid, local.tokenB_decode) == local.tokenB_decode ? 0 : "Smart-1 Cloud token B is invalid format" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_SICkey_base64 = base64encode(var.gateway_SICKey) + gateway_password_hash_base64=base64encode(var.gateway_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) +} diff --git a/terraform/aws/cluster/main.tf b/terraform/aws/cluster/main.tf new file mode 100755 index 00000000..8282b24b --- /dev/null +++ b/terraform/aws/cluster/main.tf @@ -0,0 +1,291 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.gateway_version + chkp_type = "gateway" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name +} + +resource "aws_iam_instance_profile" "cluster_instance_profile" { + path = "/" + role = local.create_iam_role == 1 ? join("", module.cluster_iam_role.*.cluster_iam_role_name) : var.predefined_role +} + +module "cluster_iam_role" { + source = "../modules/cluster-iam-role" + count = local.create_iam_role +} + +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.enable_cloudwatch_policy + role = aws_iam_instance_profile.cluster_instance_profile.role + tag_name = var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name +} + +resource "aws_network_interface" "member_a_external_eni" { + subnet_id = var.public_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member A external" + source_dest_check = false + lifecycle { + ignore_changes = [private_ips_count,] + } + private_ips_count = 1 + tags = { + Name = format("%s-Member_A_ExternalInterface", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} + +resource "aws_network_interface" "member_b_external_eni" { + subnet_id = var.public_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member B external" + source_dest_check = false + tags = { + Name = format("%s-Member_B_ExternalInterface", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} + +resource "aws_network_interface" "member_a_internal_eni" { + subnet_id = var.private_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member A internal" + source_dest_check = false + lifecycle { + ignore_changes = [private_ips_count,] + } + private_ips_count = 1 + tags = { + Name = format("%s-Member_A_InternalInterface", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} + +resource "aws_network_interface" "member_b_internal_eni" { + subnet_id = var.private_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member B internal" + source_dest_check = false + tags = { + Name = format("%s-Member_B_InternalInterface", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} + +resource "aws_route" "internal_default_route" { + count = local.internal_route_table_condition + route_table_id = var.private_route_table + lifecycle { + ignore_changes = [network_interface_id,] + } + destination_cidr_block = "0.0.0.0/0" + network_interface_id = aws_network_interface.member_a_internal_eni.id +} + +resource "aws_route_table_association" "private_rtb_to_private_subnet" { + count = var.private_route_table == "" ? 0 : 1 + route_table_id = var.private_route_table + subnet_id = var.private_subnet_id +} + +resource "aws_launch_template" "member_a_launch_template" { + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = aws_iam_instance_profile.cluster_instance_profile.id + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.member_a_external_eni.id + device_index = 0 + } + network_interfaces { + network_interface_id = aws_network_interface.member_a_internal_eni.id + device_index = 1 + } +} + +resource "aws_launch_template" "member_b_launch_template" { + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = aws_iam_instance_profile.cluster_instance_profile.id + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.member_b_external_eni.id + device_index = 0 + } + network_interfaces { + network_interface_id = aws_network_interface.member_b_internal_eni.id + device_index = 1 + } +} + +resource "aws_instance" "member-a-instance" { + depends_on = [ + aws_network_interface.member_a_external_eni, + aws_network_interface.member_a_internal_eni + ] + + launch_template { + id = aws_launch_template.member_a_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = format("%s-Member-A",var.gateway_name), + x-chkp-member-ips = format("public-ip=%s:external-private-ip=%s:internal-private-ip=%s", + var.allocate_and_associate_eip ? aws_eip.member_a_eip[0].public_ip : "", aws_network_interface.member_a_external_eni.private_ip,aws_network_interface.member_a_internal_eni.private_ip), + x-chkp-cluster-ips = format("cluster-ip=%s:cluster-eth0-private-ip=%s:cluster-eth1-private-ip=%s", + aws_eip.cluster_eip.public_ip, element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0), + element(tolist(setsubtract(tolist(aws_network_interface.member_a_internal_eni.private_ips), [aws_network_interface.member_a_internal_eni.private_ip])), 0)) + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + lifecycle { + ignore_changes = [ebs_block_device,] + } + + user_data = templatefile("${path.module}/cluster_member_a_userdata.yaml", { + // script's arguments + Hostname = var.gateway_hostname, + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + EnableInstanceConnect = var.enable_instance_connect, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenA = var.memberAToken, + MemberAPublicAddress = var.allocate_and_associate_eip ? aws_eip.member_a_eip[0].public_ip : "", + AllocateAddress = var.allocate_and_associate_eip, + OsVersion = local.version_split + }) +} + +resource "aws_instance" "member-b-instance" { + depends_on = [ + aws_network_interface.member_b_external_eni, + aws_network_interface.member_b_internal_eni + ] + + launch_template { + id = aws_launch_template.member_b_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = format("%s-Member-B",var.gateway_name), + x-chkp-member-ips = format("public-ip=%s:external-private-ip=%s:internal-private-ip=%s", + var.allocate_and_associate_eip ? aws_eip.member_b_eip[0].public_ip : "", aws_network_interface.member_b_external_eni.private_ip,aws_network_interface.member_b_internal_eni.private_ip), + x-chkp-cluster-ips = format("cluster-ip=%s:cluster-eth0-private-ip=%s:cluster-eth1-private-ip=%s", + aws_eip.cluster_eip.public_ip, element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0), + element(tolist(setsubtract(tolist(aws_network_interface.member_a_internal_eni.private_ips), [aws_network_interface.member_a_internal_eni.private_ip])), 0)) + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + lifecycle { + ignore_changes = [ebs_block_device,] + } + + user_data = templatefile("${path.module}/cluster_member_b_userdata.yaml", { + // script's arguments + Hostname = var.gateway_hostname, + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + EnableInstanceConnect = var.enable_instance_connect, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenB = var.memberBToken, + MemberBPublicAddress = var.allocate_and_associate_eip ? aws_eip.member_b_eip[0].public_ip : "", + AllocateAddress = var.allocate_and_associate_eip, + OsVersion = local.version_split + }) +} + +resource "aws_eip" "cluster_eip" { +} + +resource "aws_eip" "member_a_eip" { + count = var.allocate_and_associate_eip ? 1 : 0 +} + +resource "aws_eip" "member_b_eip" { + count = var.allocate_and_associate_eip ? 1 : 0 +} + +resource "aws_eip_association" "cluster_address_assoc" { + depends_on = [aws_instance.member-a-instance] + allocation_id = aws_eip.cluster_eip.id + lifecycle { + ignore_changes = [ + network_interface_id, private_ip_address + ] + } + network_interface_id = aws_network_interface.member_a_external_eni.id + private_ip_address = length(tolist(aws_network_interface.member_a_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0) : ""//extracting member's secondary ip which represent the cluster ip +} +resource "aws_eip_association" "member_a_address_assoc" { + depends_on = [aws_instance.member-a-instance] + count = var.allocate_and_associate_eip ? 1 : 0 + allocation_id = aws_eip.member_a_eip[0].id + network_interface_id = aws_network_interface.member_a_external_eni.id + private_ip_address = aws_network_interface.member_a_external_eni.private_ip //primary +} +resource "aws_eip_association" "member_b_address_assoc" { + depends_on = [aws_instance.member-b-instance] + count = var.allocate_and_associate_eip ? 1 : 0 + allocation_id = aws_eip.member_b_eip[0].id + network_interface_id = aws_network_interface.member_b_external_eni.id + private_ip_address = aws_network_interface.member_b_external_eni.private_ip //primary +} + diff --git a/terraform/aws/cluster/output.tf b/terraform/aws/cluster/output.tf new file mode 100755 index 00000000..6e8f5cbf --- /dev/null +++ b/terraform/aws/cluster/output.tf @@ -0,0 +1,24 @@ +output "ami_id" { + value = module.amis.ami_id +} +output "cluster_public_ip" { + value = aws_eip.cluster_eip.*.public_ip +} +output "member_a_public_ip" { + value = aws_eip.member_a_eip.*.public_ip +} +output "member_b_public_ip" { + value = aws_eip.member_b_eip.*.public_ip +} +output "member_a_ssh" { + value = var.allocate_and_associate_eip ? format("ssh -i %s admin@%s", var.key_name, aws_eip.member_a_eip[0].public_ip) : "" +} +output "member_b_ssh" { + value = var.allocate_and_associate_eip ? format("ssh -i %s admin@%s", var.key_name, aws_eip.member_b_eip[0].public_ip) : "" +} +output "member_a_url" { + value = var.allocate_and_associate_eip ? format("https://%s", aws_eip.member_a_eip[0].public_ip) : "" +} +output "member_b_url" { + value = var.allocate_and_associate_eip ? format("https://%s", aws_eip.member_b_eip[0].public_ip) : "" +} \ No newline at end of file diff --git a/terraform/aws/cluster/terraform.tfvars b/terraform/aws/cluster/terraform.tfvars new file mode 100755 index 00000000..179fe10b --- /dev/null +++ b/terraform/aws/cluster/terraform.tfvars @@ -0,0 +1,43 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +public_subnet_id = "subnet-123456" +private_subnet_id = "subnet-345678" +private_route_table = "rtb-12345678" + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/cluster/variables.tf b/terraform/aws/cluster/variables.tf new file mode 100755 index 00000000..1b515744 --- /dev/null +++ b/terraform/aws/cluster/variables.tf @@ -0,0 +1,181 @@ +// Module: Check Point CloudGuard Network Security Cluster into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_subnet_id" { + type = string + description = "The public subnet of the cluster. The cluster's public IPs will be generated from this subnet" +} +variable "private_subnet_id" { + type = string + description = "The private subnet of the cluster. The cluster's private IPs will be generated from this subnet" +} +variable "private_route_table" { + type = string + description = "(Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route" + default= "" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Single AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/cluster/versions.tf b/terraform/aws/cluster/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/cluster/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/cme-iam-role-gwlb/README.md b/terraform/aws/cme-iam-role-gwlb/README.md new file mode 100644 index 00000000..2d6e639b --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/README.md @@ -0,0 +1,101 @@ +# AWS IAM Role for Cloud Management Extension (CME) manages Gateway Load Balancer Auto Scale Group Terraform module + +Terraform module which creates an AWS IAM Role for Cloud Management Extension (CME) manages Gateway Load Balancer Auto Scale Group on Security Management Server. + +These types of Terraform resources are supported: +* [AWS IAM role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) +* [AWS IAM policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) +* [AWS IAM policy attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) + +This type of Terraform data source is supported: +* [AWS IAM policy document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) + +See the [Creating an AWS IAM Role for Security Management Server](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122074) for additional information + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cme-iam-role-gwlb/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cme-iam-role-gwlb/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/cme-iam-role-gwlb/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + permissions = "Create with read permissions" + sts_roles = ['arn:aws:iam::111111111111:role/role_name'] + trusted_account = "" + ``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|----------| +| permissions | The IAM role permissions | string | - Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | +| sts_roles | The IAM role will be able to assume these STS Roles (map of string ARNs) | list(string) | n/a | [] | no | +| trusted_account | A 12 digits number that represents the ID of a trusted account. IAM users in this account will be able assume the IAM role and receive the permissions attached to it | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|----------------------|---------------------------------------| +| cme_iam_role_arn | The created AWS IAM Role arn | +| cme_iam_role_name | The created AWS IAM Role name | +| cme_iam_profile_name | The created AWS instance profile name | +| cme_iam_profile_arn | The created AWS instance profile arn | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------------------------------------| +| 20230926 | CME instance profile for IAM Role | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240507 | Add ec2:DescribeRegions read permission to the IAM role policy | + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/cme-iam-role-gwlb/main.tf b/terraform/aws/cme-iam-role-gwlb/main.tf new file mode 100644 index 00000000..33ea37ab --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/main.tf @@ -0,0 +1,110 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +resource "aws_iam_role" "cme_iam_role_gwlb" { + assume_role_policy = data.aws_iam_policy_document.cme_role_assume_policy_document.json + path = "/" +} + +data "aws_iam_policy_document" "cme_role_assume_policy_document" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + principals { + type = var.trusted_account == "" ? "Service" : "AWS" + identifiers = var.trusted_account == "" ? ["ec2.amazonaws.com"] : [var.trusted_account] + } + } +} + +locals { + provided_sts_roles = length(var.sts_roles) == 0 ? 0 : 1 + allow_read_permissions = var.permissions == "Create with read-write permissions" || var.permissions == "Create with read permissions" ? 1 : 0 + allow_write_permissions = var.permissions == "Create with read-write permissions" ? 1 : 0 +} + +data "aws_iam_policy_document" "cme_role_sts_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + resources = var.sts_roles + } +} +resource "aws_iam_policy" "cme_role_sts_policy" { + count = local.provided_sts_roles + policy = data.aws_iam_policy_document.cme_role_sts_policy_doc.json + +} +resource "aws_iam_role_policy_attachment" "attach_sts_policy" { + count = local.provided_sts_roles + policy_arn = aws_iam_policy.cme_role_sts_policy[0].arn + role = aws_iam_role.cme_iam_role_gwlb.id +} + +data "aws_iam_policy_document" "cme_role_read_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = [ + "autoscaling:DescribeAutoScalingGroups", + "ec2:DescribeRegions", + "ec2:DescribeInstances", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeRouteTables", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs", + "ec2:DescribeInternetGateways", + "ec2:DescribeVpcEndpoints", + "ec2:DescribeVpcEndpointServiceConfigurations", + "elasticloadbalancing:DescribeLoadBalancers", + "elasticloadbalancing:DescribeTags", + "elasticloadbalancing:DescribeListeners", + "elasticloadbalancing:DescribeTargetGroups", + "elasticloadbalancing:DescribeRules", + "elasticloadbalancing:DescribeTargetHealth"] + resources = ["*"] + } +} +resource "aws_iam_policy" "cme_role_read_policy" { + count = local.allow_read_permissions + policy = data.aws_iam_policy_document.cme_role_read_policy_doc.json +} +resource "aws_iam_role_policy_attachment" "attach_read_policy" { + count = local.allow_read_permissions + policy_arn = aws_iam_policy.cme_role_read_policy[0].arn + role = aws_iam_role.cme_iam_role_gwlb.id +} + +data "aws_iam_policy_document" "cme_role_write_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = [ + "ec2:CreateRoute", + "ec2:ReplaceRoute", + "ec2:DeleteRoute", + "ec2:CreateRouteTable", + "ec2:AssociateRouteTable", + "ec2:CreateTags" +] + resources = ["*"] + } +} +resource "aws_iam_policy" "cme_role_write_policy" { + count = local.allow_write_permissions + policy = data.aws_iam_policy_document.cme_role_write_policy_doc.json +} +resource "aws_iam_role_policy_attachment" "attach_write_policy" { + count = local.allow_write_permissions + policy_arn = aws_iam_policy.cme_role_write_policy[0].arn + role = aws_iam_role.cme_iam_role_gwlb.id +} +resource "aws_iam_instance_profile" "iam_instance_profile" { + role = aws_iam_role.cme_iam_role_gwlb.id +} \ No newline at end of file diff --git a/terraform/aws/cme-iam-role-gwlb/output.tf b/terraform/aws/cme-iam-role-gwlb/output.tf new file mode 100644 index 00000000..8c86901a --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/output.tf @@ -0,0 +1,13 @@ +output "cme_iam_role_arn" { + value = aws_iam_role.cme_iam_role_gwlb.arn +} +output "cme_iam_role_name" { + value = aws_iam_role.cme_iam_role_gwlb.name +} +output "cme_iam_profile_name" { + value = aws_iam_instance_profile.iam_instance_profile.name +} +output "cme_iam_profile_arn" { + value = aws_iam_instance_profile.iam_instance_profile.arn +} + diff --git a/terraform/aws/cme-iam-role-gwlb/terraform.tfvars b/terraform/aws/cme-iam-role-gwlb/terraform.tfvars new file mode 100644 index 00000000..9914eae9 --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/terraform.tfvars @@ -0,0 +1,5 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +permissions = "Create with read permissions" +sts_roles = [] +trusted_account = "" \ No newline at end of file diff --git a/terraform/aws/cme-iam-role-gwlb/variables.tf b/terraform/aws/cme-iam-role-gwlb/variables.tf new file mode 100644 index 00000000..3a0fe740 --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/variables.tf @@ -0,0 +1,42 @@ +// Module: IAM role for selected permissions + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +variable "permissions" { + type = string + description = "The IAM role permissions" + default = "Create with read permissions" +} +locals { + permissions_allowed_values = [ + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.permissions) +} +variable "sts_roles" { + type = list(string) + description = "The IAM role will be able to assume these STS Roles (map of string ARNs)" + default = [] +} +variable "trusted_account" { + type = string + description = "A 12 digits number that represents the ID of a trusted account. IAM users in this account will be able assume the IAM role and receive the permissions attached to it" + default = "" +} diff --git a/terraform/aws/cme-iam-role-gwlb/versions.tf b/terraform/aws/cme-iam-role-gwlb/versions.tf new file mode 100644 index 00000000..b3e24059 --- /dev/null +++ b/terraform/aws/cme-iam-role-gwlb/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + } +} diff --git a/terraform/aws/cme-iam-role/README.md b/terraform/aws/cme-iam-role/README.md new file mode 100755 index 00000000..203326cb --- /dev/null +++ b/terraform/aws/cme-iam-role/README.md @@ -0,0 +1,102 @@ +# AWS IAM Role for Cloud Management Extension (CME) Terraform module + +Terraform module which creates an AWS IAM Role for Cloud Management Extension (CME) on Security Management Server. + +These types of Terraform resources are supported: +* [AWS IAM role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) +* [AWS IAM policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) +* [AWS IAM policy attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) + +This type of Terraform data source is supported: +* [AWS IAM policy document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) + +See the [Creating an AWS IAM Role for Security Management Server](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122074) for additional information + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cme-iam-role/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cme-iam-role/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/cme-iam-role/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + permissions = "Create with read permissions" + sts_roles = ['arn:aws:iam::111111111111:role/role_name'] + trusted_account = "" + ``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|----------| +| permissions | The IAM role permissions | string | - Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | +| sts_roles | The IAM role will be able to assume these STS Roles (map of string ARNs) | list(string) | n/a | [] | no | +| trusted_account | A 12 digits number that represents the ID of a trusted account. IAM users in this account will be able assume the IAM role and receive the permissions attached to it | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|----------------------|---------------------------------------| +| cme_iam_role_arn | The created AWS IAM Role arn | +| cme_iam_role_name | The created AWS IAM Role name | +| cme_iam_profile_name | The created AWS instance profile name | +| cme_iam_profile_arn | The created AWS instance profile arn | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|--------------------------------------------------------------------| +| 20210309 | First release of Check Point CME IAM Role Terraform module for AWS | +| 20230514 | CME instance profile for IAM Role | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240507 | Add ec2:DescribeRegions read permission to the IAM role policy | + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/cme-iam-role/main.tf b/terraform/aws/cme-iam-role/main.tf new file mode 100755 index 00000000..817e3b90 --- /dev/null +++ b/terraform/aws/cme-iam-role/main.tf @@ -0,0 +1,136 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +resource "aws_iam_role" "cme_iam_role" { + assume_role_policy = data.aws_iam_policy_document.cme_role_assume_policy_document.json + path = "/" +} + +data "aws_iam_policy_document" "cme_role_assume_policy_document" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + principals { + type = var.trusted_account == "" ? "Service" : "AWS" + identifiers = var.trusted_account == "" ? ["ec2.amazonaws.com"] : [var.trusted_account] + } + } +} + +locals { + provided_sts_roles = length(var.sts_roles) == 0 ? 0 : 1 + allow_read_permissions = var.permissions == "Create with read-write permissions" || var.permissions == "Create with read permissions" ? 1 : 0 + allow_write_permissions = var.permissions == "Create with read-write permissions" ? 1 : 0 +} + +data "aws_iam_policy_document" "cme_role_sts_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + resources = var.sts_roles + } +} +resource "aws_iam_policy" "cme_role_sts_policy" { + count = local.provided_sts_roles + policy = data.aws_iam_policy_document.cme_role_sts_policy_doc.json + +} +resource "aws_iam_role_policy_attachment" "attach_sts_policy" { + count = local.provided_sts_roles + policy_arn = aws_iam_policy.cme_role_sts_policy[0].arn + role = aws_iam_role.cme_iam_role.id +} + +data "aws_iam_policy_document" "cme_role_read_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = [ + "autoscaling:DescribeAutoScalingGroups", + "ec2:DescribeRegions", + "ec2:DescribeCustomerGateways", + "ec2:DescribeInstances", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeRouteTables", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:DescribeTransitGateways", + "ec2:DescribeTransitGatewayAttachments", + "ec2:DescribeTransitGatewayRouteTables", + "ec2:DescribeVpcs", + "ec2:DescribeVpnGateways", + "ec2:DescribeVpnConnections", + "ec2:GetTransitGatewayAttachmentPropagations", + "elasticloadbalancing:DescribeLoadBalancers", + "elasticloadbalancing:DescribeTags", + "elasticloadbalancing:DescribeListeners", + "elasticloadbalancing:DescribeTargetGroups", + "elasticloadbalancing:DescribeRules", + "elasticloadbalancing:DescribeTargetHealth"] + resources = ["*"] + } +} +resource "aws_iam_policy" "cme_role_read_policy" { + count = local.allow_read_permissions + policy = data.aws_iam_policy_document.cme_role_read_policy_doc.json +} +resource "aws_iam_role_policy_attachment" "attach_read_policy" { + count = local.allow_read_permissions + policy_arn = aws_iam_policy.cme_role_read_policy[0].arn + role = aws_iam_role.cme_iam_role.id +} + +data "aws_iam_policy_document" "cme_role_write_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = [ + "ec2:AssociateTransitGatewayRouteTable", + "ec2:AttachVpnGateway", + "ec2:CreateCustomerGateway", + "ec2:CreateVpnConnection", + "ec2:CreateVpnGateway", + "ec2:DeleteCustomerGateway", + "ec2:DeleteVpnConnection", + "ec2:DeleteVpnGateway", + "ec2:DetachVpnGateway", + "ec2:DisableTransitGatewayRouteTablePropagation", + "ec2:DisableVgwRoutePropagation", + "ec2:DisassociateTransitGatewayRouteTable", + "ec2:EnableTransitGatewayRouteTablePropagation", + "ec2:EnableVgwRoutePropagation"] + resources = ["*"] + } + statement { + effect = "Allow" + actions = [ + "cloudformation:DescribeStacks", + "cloudformation:DescribeStackResources", + "cloudformation:ListStacks"] + resources = ["*"] + } + statement { + effect = "Allow" + actions = [ + "cloudformation:CreateStack", + "cloudformation:DeleteStack"] + resources = ["arn:aws:cloudformation:*:*:stack/vpn-by-tag--*/*"] + } +} +resource "aws_iam_policy" "cme_role_write_policy" { + count = local.allow_write_permissions + policy = data.aws_iam_policy_document.cme_role_write_policy_doc.json +} +resource "aws_iam_role_policy_attachment" "attach_write_policy" { + count = local.allow_write_permissions + policy_arn = aws_iam_policy.cme_role_write_policy[0].arn + role = aws_iam_role.cme_iam_role.id +} +resource "aws_iam_instance_profile" "iam_instance_profile" { + role = aws_iam_role.cme_iam_role.id +} \ No newline at end of file diff --git a/terraform/aws/cme-iam-role/output.tf b/terraform/aws/cme-iam-role/output.tf new file mode 100755 index 00000000..cad35709 --- /dev/null +++ b/terraform/aws/cme-iam-role/output.tf @@ -0,0 +1,12 @@ +output "cme_iam_role_arn" { + value = aws_iam_role.cme_iam_role.arn +} +output "cme_iam_role_name" { + value = aws_iam_role.cme_iam_role.name +} +output "cme_iam_profile_name" { + value = aws_iam_instance_profile.iam_instance_profile.name +} +output "cme_iam_profile_arn" { + value = aws_iam_instance_profile.iam_instance_profile.arn +} \ No newline at end of file diff --git a/terraform/aws/cme-iam-role/terraform.tfvars b/terraform/aws/cme-iam-role/terraform.tfvars new file mode 100755 index 00000000..9914eae9 --- /dev/null +++ b/terraform/aws/cme-iam-role/terraform.tfvars @@ -0,0 +1,5 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +permissions = "Create with read permissions" +sts_roles = [] +trusted_account = "" \ No newline at end of file diff --git a/terraform/aws/cme-iam-role/variables.tf b/terraform/aws/cme-iam-role/variables.tf new file mode 100755 index 00000000..3a0fe740 --- /dev/null +++ b/terraform/aws/cme-iam-role/variables.tf @@ -0,0 +1,42 @@ +// Module: IAM role for selected permissions + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +variable "permissions" { + type = string + description = "The IAM role permissions" + default = "Create with read permissions" +} +locals { + permissions_allowed_values = [ + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.permissions) +} +variable "sts_roles" { + type = list(string) + description = "The IAM role will be able to assume these STS Roles (map of string ARNs)" + default = [] +} +variable "trusted_account" { + type = string + description = "A 12 digits number that represents the ID of a trusted account. IAM users in this account will be able assume the IAM role and receive the permissions attached to it" + default = "" +} diff --git a/terraform/aws/cme-iam-role/versions.tf b/terraform/aws/cme-iam-role/versions.tf new file mode 100755 index 00000000..b3e24059 --- /dev/null +++ b/terraform/aws/cme-iam-role/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + } +} diff --git a/terraform/aws/cross-az-cluster-master/README.md b/terraform/aws/cross-az-cluster-master/README.md new file mode 100755 index 00000000..9209ec51 --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/README.md @@ -0,0 +1,219 @@ +# Check Point CloudGuard Network Security Cross AZ Cluster Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cross AZ Cluster into into a new VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Default.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/cross-az-cluster +- /terraform/aws/modules/amis +- /terraform/aws/modules/vpc +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cross-az-cluster-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cross-az-cluster: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cross-az-cluster: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cross-az-cluster-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + - Due to terraform limitation, the apply command is: + ``` + terraform apply -target=aws_route_table.private_subnet_rtb -auto-approve && terraform apply + ``` + >Once terraform is updated, we will update accordingly. + +- Variables are configured in /terraform/aws/cross-az-cluster-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + } + private_subnets_map = { + "us-east-1a" = 3 + "us-east-1a" = 4 + } + subnets_bit_length = 8 + + + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create IAM Role: + ``` + predefined_role = "" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint module.launch_cluster_into_vpc.aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + +## Outputs +| Name | Description | +|--------------------|--------------------------------------------------------------| +| ami_id | The ami id of the deployed Security Cross AZ Cluster members | +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20221123 | First release of Check Point Security Cross AZ Cluster Master Terraform module for AWS | +| 20221123 | Changed default version and added instances types | +| 20221123 | R81.20 version support | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../cross-az/LICENSE) file for details diff --git a/terraform/aws/cross-az-cluster-master/locals.tf b/terraform/aws/cross-az-cluster-master/locals.tf new file mode 100755 index 00000000..68e4523f --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/locals.tf @@ -0,0 +1,58 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + create_iam_role = var.predefined_role == "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) +} diff --git a/terraform/aws/cross-az-cluster-master/main.tf b/terraform/aws/cross-az-cluster-master/main.tf new file mode 100755 index 00000000..f12ae536 --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/main.tf @@ -0,0 +1,70 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + subnets_bit_length = var.subnets_bit_length +} + +resource "aws_route_table" "private_subnet_rtb" { + depends_on = [module.launch_vpc] + vpc_id = module.launch_vpc.vpc_id + tags = { + Name = "Private Subnets Route Table" + } +} +resource "aws_route_table_association" "private_rtb_to_private_subnets_a" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[0] +} +resource "aws_route_table_association" "private_rtb_to_private_subnets_b" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[1] +} + +module "launch_cluster_into_vpc" { + source = "../cross-az-cluster" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + public_subnet_ids = module.launch_vpc.public_subnets_ids_list + private_subnet_ids = module.launch_vpc.private_subnets_ids_list + private_route_table = aws_route_table.private_subnet_rtb.id + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + predefined_role = var.predefined_role + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + memberAToken = var.memberAToken + memberBToken = var.memberBToken + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + resources_tag_name = var.resources_tag_name + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + volume_type = var.volume_type +} diff --git a/terraform/aws/cross-az-cluster-master/output.tf b/terraform/aws/cross-az-cluster-master/output.tf new file mode 100755 index 00000000..c1f47385 --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/output.tf @@ -0,0 +1,24 @@ +output "ami_id" { + value = module.launch_cluster_into_vpc.ami_id +} +output "cluster_public_ip" { + value = module.launch_cluster_into_vpc.cluster_public_ip +} +output "member_a_public_ip" { + value = module.launch_cluster_into_vpc.member_a_public_ip +} +output "member_b_public_ip" { + value = module.launch_cluster_into_vpc.member_b_public_ip +} +output "member_a_ssh" { + value = module.launch_cluster_into_vpc.member_a_ssh +} +output "member_b_ssh" { + value = module.launch_cluster_into_vpc.member_b_ssh +} +output "member_a_url" { + value = module.launch_cluster_into_vpc.member_a_url +} +output "member_b_url" { + value = module.launch_cluster_into_vpc.member_b_url +} \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster-master/terraform.tfvars b/terraform/aws/cross-az-cluster-master/terraform.tfvars new file mode 100755 index 00000000..28cb64a3 --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/terraform.tfvars @@ -0,0 +1,48 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 +} +private_subnets_map = { + "us-east-1a" = 3 + "us-east-1b" = 4 +} +subnets_bit_length = 8 + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster-master/variables.tf b/terraform/aws/cross-az-cluster-master/variables.tf new file mode 100755 index 00000000..d49cf50c --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/variables.tf @@ -0,0 +1,183 @@ +// Module: Check Point CloudGuard Network Security Cross AZ Cluster into a new VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instance" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/cross-az-cluster-master/versions.tf b/terraform/aws/cross-az-cluster-master/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/cross-az-cluster-master/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/cross-az-cluster/README.md b/terraform/aws/cross-az-cluster/README.md new file mode 100755 index 00000000..f473732d --- /dev/null +++ b/terraform/aws/cross-az-cluster/README.md @@ -0,0 +1,196 @@ +# Check Point CloudGuard Network Security Cross AZ Cluster Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cross AZ Cluster into an existing VPC on AWS. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) - conditional creation +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Default.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cross-az-cluster/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cross-az-cluster/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/cross-az-cluster/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + public_subnet_ids = ["subnet-abc123", "subnet-def456"] + private_subnet_ids = ["subnet-abc234", "subnet-def567"] + private_route_table = "rtb-12345678" + + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create IAM Role: + ``` + predefined_role = "" + ``` + - To create route from '0.0.0.0/0' to the Active Cluster member instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_ids | List of public subnet IDs to launch resources into. At least 2 | list(string) | n/a | n/a | yes | +| private_subnet_ids | List of private subnet IDs to launch resources into. At least 2 | list(string) | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------|--------------------------------------------------------------| +| ami_id | The ami id of the deployed Security Cross AZ Cluster members | +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20221123 | First release of Check Point Security Cross AZ Cluster Terraform module for AWS | +| 20221123 | Changed default version and added instances types | +| 20221123 | R81.20 version support | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../cross-az/LICENSE) file for details diff --git a/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml new file mode 100755 index 00000000..1a3095e2 --- /dev/null +++ b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberAPublicAddress}\" otherMemberIp=\"${MemberBPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberAPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberBPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml new file mode 100755 index 00000000..9ec9d23a --- /dev/null +++ b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberBPublicAddress}\" otherMemberIp=\"${MemberAPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberBPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberAPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/locals.tf b/terraform/aws/cross-az-cluster/locals.tf new file mode 100755 index 00000000..19f67f30 --- /dev/null +++ b/terraform/aws/cross-az-cluster/locals.tf @@ -0,0 +1,75 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + enable_cloudwatch_policy = var.enable_cloudwatch ? 1 : 0 + create_iam_role = var.predefined_role == "" ? 1 : 0 + provided_roue_table = var.private_route_table == "" ? 0 : 1 + internal_route_table_condition = var.private_route_table != "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + regex_token_valid = "(^https://(.+).checkpoint.com/app/maas/api/v1/tenant(.+)|^$)" + //TokenA: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenA = split(" ", var.memberAToken) + tokenA_decode = base64decode(element(local.split_tokenA, length(local.split_tokenA)-1)) + regex_tokenA = regex(local.regex_token_valid, local.tokenA_decode) == local.tokenA_decode ? 0 : "Smart-1 Cloud token A is invalid format" + + //TokenB: will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_tokenB = split(" ", var.memberBToken) + tokenB_decode = base64decode(element(local.split_tokenB, length(local.split_tokenB)-1)) + regex_tokenB = regex(local.regex_token_valid, local.tokenB_decode) == local.tokenB_decode ? 0 : "Smart-1 Cloud token B is invalid format" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_SICkey_base64=base64encode(var.gateway_SICKey) + gateway_password_hash_base64=base64encode(var.gateway_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) +} diff --git a/terraform/aws/cross-az-cluster/main.tf b/terraform/aws/cross-az-cluster/main.tf new file mode 100755 index 00000000..d6a3bda3 --- /dev/null +++ b/terraform/aws/cross-az-cluster/main.tf @@ -0,0 +1,294 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.gateway_version + chkp_type = "gateway" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name +} + +resource "aws_iam_instance_profile" "cluster_instance_profile" { + path = "/" + role = local.create_iam_role == 1 ? join("", module.cluster_iam_role.*.cluster_iam_role_name) : var.predefined_role +} + +module "cluster_iam_role" { + source = "../modules/cluster-iam-role" + count = local.create_iam_role +} + +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.enable_cloudwatch_policy + role = aws_iam_instance_profile.cluster_instance_profile.role + tag_name = var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name +} + +resource "aws_network_interface" "member_a_external_eni" { + subnet_id = var.public_subnet_ids[0] + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member A external" + source_dest_check = false + private_ips_count = 1 + tags = { + x-chkp-interface-type = "external" } +} + +resource "aws_network_interface" "member_b_external_eni" { + subnet_id = var.public_subnet_ids[1] + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member B external" + source_dest_check = false + private_ips_count = 1 + tags = { + x-chkp-interface-type = "external" } +} + +resource "aws_network_interface" "member_a_internal_eni" { + subnet_id = var.private_subnet_ids[0] + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member A internal" + source_dest_check = false + tags = { + x-chkp-interface-type = "internal" } +} + +resource "aws_network_interface" "member_b_internal_eni" { + subnet_id = var.private_subnet_ids[1] + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "Member B internal" + source_dest_check = false + tags = { + x-chkp-interface-type = "internal" } +} + +resource "aws_route" "internal_default_route" { + count = local.internal_route_table_condition + route_table_id = var.private_route_table + lifecycle { + ignore_changes = [network_interface_id,] + } + destination_cidr_block = "0.0.0.0/0" + network_interface_id = aws_network_interface.member_a_internal_eni.id +} + +resource "aws_route_table_association" "private_rtb_a" { + count = var.private_route_table == "" ? 0 : 1 + route_table_id = var.private_route_table + subnet_id = var.private_subnet_ids[0] +} +resource "aws_route_table_association" "private_rtb_b" { + count = var.private_route_table == "" ? 0 : 1 + route_table_id = var.private_route_table + subnet_id = var.private_subnet_ids[1] +} + +resource "aws_launch_template" "member_a_launch_template" { + depends_on = [ + aws_network_interface.member_a_external_eni, + aws_network_interface.member_a_internal_eni + ] + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = aws_iam_instance_profile.cluster_instance_profile.id + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.member_a_external_eni.id + device_index = 0 + } + network_interfaces { + network_interface_id = aws_network_interface.member_a_internal_eni.id + device_index = 1 + } +} + +resource "aws_launch_template" "member_b_launch_template" { + depends_on = [ + aws_network_interface.member_b_external_eni, + aws_network_interface.member_b_internal_eni + ] + instance_type = var.gateway_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = aws_iam_instance_profile.cluster_instance_profile.id + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.member_b_external_eni.id + device_index = 0 + } + network_interfaces { + network_interface_id = aws_network_interface.member_b_internal_eni.id + device_index = 1 + } +} + +resource "aws_instance" "member-a-instance" { + depends_on = [ + aws_launch_template.member_a_launch_template + ] + + launch_template { + id = aws_launch_template.member_a_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = format("%s-Member-A",var.gateway_name), + x-chkp-member-ips = format("public-ip=%s:external-private-ip=%s:internal-private-ip=%s", + aws_eip.member_a_eip.public_ip, aws_network_interface.member_a_external_eni.private_ip,aws_network_interface.member_a_internal_eni.private_ip), + x-chkp-cluster-ips = format("cluster-ip=%s:secondary-external-private-ip=%s", + aws_eip.cluster_eip.public_ip, element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0)) + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + lifecycle { + ignore_changes = [ebs_block_device,] + } + + user_data = templatefile("${path.module}/cluster_member_a_userdata.yaml", { + // script's arguments + Hostname = var.gateway_hostname, + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64 + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + EnableInstanceConnect = var.enable_instance_connect, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenA = var.memberAToken, + MemberAPublicAddress = aws_eip.member_a_eip.public_ip, + PublicAddressCluster = aws_eip.cluster_eip.public_ip, + MemberAPrivateAddressSecondary = length(tolist(aws_network_interface.member_a_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0) : "",//extracting member's secondary ip which represent the cluster ip + MemberBPrivateAddressCluster = aws_network_interface.member_b_internal_eni.private_ip, + MemberBPrivateAddressSecondary = length(tolist(aws_network_interface.member_b_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_b_external_eni.private_ips), [aws_network_interface.member_b_external_eni.private_ip])), 0) : "", + AllocateAddress = true, + OsVersion = local.version_split + }) +} + +resource "aws_instance" "member-b-instance" { + depends_on = [ + aws_launch_template.member_b_launch_template + ] + + launch_template { + id = aws_launch_template.member_b_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = format("%s-Member-B",var.gateway_name), + x-chkp-member-ips = format("public-ip=%s:external-private-ip=%s:internal-private-ip=%s", + aws_eip.member_b_eip.public_ip, aws_network_interface.member_b_external_eni.private_ip,aws_network_interface.member_b_internal_eni.private_ip), + x-chkp-cluster-ips = format("cluster-ip=%s:secondary-external-private-ip=%s", + aws_eip.cluster_eip.public_ip, element(tolist(setsubtract(tolist(aws_network_interface.member_b_external_eni.private_ips), [aws_network_interface.member_b_external_eni.private_ip])), 0)) + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + lifecycle { + ignore_changes = [ebs_block_device,] + } + + user_data = templatefile("${path.module}/cluster_member_b_userdata.yaml", { + // script's arguments + Hostname = var.gateway_hostname, + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64 + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + EnableInstanceConnect = var.enable_instance_connect, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + SICKey = local.gateway_SICkey_base64, + TokenB = var.memberBToken, + MemberBPublicAddress = aws_eip.member_b_eip.public_ip, + PublicAddressCluster=aws_eip.cluster_eip.public_ip, + MemberBPrivateAddressSecondary = length(tolist(aws_network_interface.member_b_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_b_external_eni.private_ips), [aws_network_interface.member_b_external_eni.private_ip])), 0) : "", //extracting member's secondary ip which represent the member ip + MemberAPrivateAddressCluster=aws_network_interface.member_a_internal_eni.private_ip, + MemberAPrivateAddressSecondary = length(tolist(aws_network_interface.member_a_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0) : "", + AllocateAddress = true, + OsVersion = local.version_split + }) +} + +resource "aws_eip" "cluster_eip" { +} +resource "aws_eip" "member_a_eip" { +} +resource "aws_eip" "member_b_eip" { +} + +resource "aws_eip_association" "cluster_address_assoc" { + depends_on = [aws_instance.member-a-instance] + allocation_id = aws_eip.cluster_eip.id + lifecycle { + ignore_changes = [ + network_interface_id, private_ip_address + ] + } + network_interface_id = aws_network_interface.member_a_external_eni.id + private_ip_address = length(tolist(aws_network_interface.member_a_external_eni.private_ips)) > 1 ? element(tolist(setsubtract(tolist(aws_network_interface.member_a_external_eni.private_ips), [aws_network_interface.member_a_external_eni.private_ip])), 0) : ""//extracting member's secondary ip which represent the cluster ip +} +resource "aws_eip_association" "member_a_address_assoc" { + depends_on = [aws_instance.member-a-instance] + allocation_id = aws_eip.member_a_eip.id + network_interface_id = aws_network_interface.member_a_external_eni.id + private_ip_address = aws_network_interface.member_a_external_eni.private_ip //primary +} +resource "aws_eip_association" "member_b_address_assoc" { + depends_on = [aws_instance.member-b-instance] + allocation_id = aws_eip.member_b_eip.id + network_interface_id = aws_network_interface.member_b_external_eni.id + private_ip_address = aws_network_interface.member_b_external_eni.private_ip //primary +} \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/output.tf b/terraform/aws/cross-az-cluster/output.tf new file mode 100755 index 00000000..e475a650 --- /dev/null +++ b/terraform/aws/cross-az-cluster/output.tf @@ -0,0 +1,30 @@ +output "ami_id" { + value = module.amis.ami_id +} +output "cluster_public_ip" { + value = aws_eip.cluster_eip.*.public_ip +} +output "member_a_public_ip" { + value = aws_eip.member_a_eip.*.public_ip +} +output "member_b_public_ip" { + value = aws_eip.member_b_eip.*.public_ip +} +output "member_a_eni" { + value = aws_network_interface.member_a_external_eni.id +} +output "member_a_ssh" { + value = format("ssh -i %s admin@%s", var.key_name, aws_eip.member_a_eip.public_ip) +} +output "member_b_ssh" { + value = format("ssh -i %s admin@%s", var.key_name, aws_eip.member_b_eip.public_ip) +} +output "member_a_url" { + value = format("https://%s", aws_eip.member_a_eip.public_ip) +} +output "member_b_url" { + value = format("https://%s", aws_eip.member_b_eip.public_ip) +} +output "member_b_eni" { + value = aws_network_interface.member_b_external_eni.id +} \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/terraform.tfvars b/terraform/aws/cross-az-cluster/terraform.tfvars new file mode 100755 index 00000000..8c6aff9b --- /dev/null +++ b/terraform/aws/cross-az-cluster/terraform.tfvars @@ -0,0 +1,42 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +public_subnet_ids = ["subnet-abc123", "subnet-def456"] +private_subnet_ids = ["subnet-abc234", "subnet-def567"] +private_route_table = "rtb-12345678" + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/variables.tf b/terraform/aws/cross-az-cluster/variables.tf new file mode 100755 index 00000000..c2d66839 --- /dev/null +++ b/terraform/aws/cross-az-cluster/variables.tf @@ -0,0 +1,181 @@ +// Module: Check Point CloudGuard Network Security Cross AZ Cluster into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_subnet_ids" { + type = list(string) + description = "List of public subnet IDs to launch resources into. At least 2" +} +variable "private_subnet_ids" { + type = list(string) + description = "List of public subnet IDs to launch resources into. At least 2" +} +variable "private_route_table" { + type = string + description = "(Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route" + default= "" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/cross-az-cluster/versions.tf b/terraform/aws/cross-az-cluster/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/cross-az-cluster/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/gateway-master/README.md b/terraform/aws/gateway-master/README.md new file mode 100755 index 00000000..e6f56bec --- /dev/null +++ b/terraform/aws/gateway-master/README.md @@ -0,0 +1,216 @@ +# Check Point CloudGuard Network Security Gateway Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway into a new VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Security group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation + + +See the [Automatically Provision a CloudGuard Security Gateway in AWS](https://supportcenter.us.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk131434) for additional information + +This solution uses the following modules: +- /terraform/aws/gateway +- /terraform/aws/modules/amis +- /terraform/aws/modules/vpc + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/gateway-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/gateway: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/gateway: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + + +## Usage +- Fill all variables in the /terraform/aws/gateway-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + - Due to terraform limitation, the apply command is: + ``` + terraform apply -target=aws_route_table.private_subnet_rtb -auto-approve && terraform apply + ``` + >Once terraform is updated, we will update accordingly. + +- Variables are configured in /terraform/aws/gateway-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + } + private_subnets_map = { + "us-east-1a" = 2 + } + subnets_bit_length = 8 + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Gateway-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + // --- Quick connect to Smart-1 Cloud (Recommended) --- + gateway_TokenKey = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + + // --- (Optional) Automatic Provisioning with Security Management Server Settings --- + control_gateway_over_public_or_private_address = "private" + management_server = "" + configuration_template = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to the Gateway instance: + ``` + allocate_and_associate_eip = true + ``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| gateway_name | (Optional) The name tag of the Security Gateway instance | string | n/a | Check-Point-Gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| gateway_hostname | (Optional) Security Gateway prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| control_gateway_over_public_or_private_address | Determines if the Security Gateway is provisioned using its private or public address | string | - public
- private | private | no | +| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | "" | no | +| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | "" | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + +## Outputs +| Name | Description | +|------------------------------|----------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| internal_rt_id | The internal route table id | +| vpc_public_subnets_ids_list | A list of the public subnets ids | +| vpc_private_subnets_ids_list | A list of the private subnets ids | +| ami_id | The ami id of the deployed Security Gateway | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group id name | +| gateway_url | URL to the portal of the deployed Security Gateway | +| gateway_public_ip | The deployed Security Gateway Server AWS public ip | +| gateway_instance_id | The deployed Security Gateway AWS instance id | +| gateway_instance_name | The deployed Security Gateway AWS instance name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Gateway Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/aws/gateway-master/locals.tf b/terraform/aws/gateway-master/locals.tf new file mode 100755 index 00000000..0ca4134f --- /dev/null +++ b/terraform/aws/gateway-master/locals.tf @@ -0,0 +1,48 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters." + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.control_gateway_over_public_or_private_address) + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + regex_valid_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SICKey is invalid + regex_sic_result = regex(local.regex_valid_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SICKey] must be at least 8 alphanumeric characters" +} \ No newline at end of file diff --git a/terraform/aws/gateway-master/main.tf b/terraform/aws/gateway-master/main.tf new file mode 100755 index 00000000..dd09ebb4 --- /dev/null +++ b/terraform/aws/gateway-master/main.tf @@ -0,0 +1,66 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + subnets_bit_length = var.subnets_bit_length +} + +resource "aws_route_table" "private_subnet_rtb" { + depends_on = [module.launch_vpc] + vpc_id = module.launch_vpc.vpc_id + tags = { + Name = "Private Subnets Route Table" + } +} +resource "aws_route_table_association" "private_rtb_to_private_subnets" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[0] +} + +module "launch_gateway_into_vpc" { + source = "../gateway" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + public_subnet_id = module.launch_vpc.public_subnets_ids_list[0] + private_subnet_id = module.launch_vpc.private_subnets_ids_list[0] + private_route_table = aws_route_table.private_subnet_rtb.id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_TokenKey = var.gateway_TokenKey + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + control_gateway_over_public_or_private_address = var.control_gateway_over_public_or_private_address + management_server = var.management_server + configuration_template = var.configuration_template +} diff --git a/terraform/aws/gateway-master/output.tf b/terraform/aws/gateway-master/output.tf new file mode 100755 index 00000000..2d8a716c --- /dev/null +++ b/terraform/aws/gateway-master/output.tf @@ -0,0 +1,33 @@ +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "internal_rtb_id" { + value = aws_route_table.private_subnet_rtb.id +} +output "vpc_public_subnets_ids_list" { + value = module.launch_vpc.public_subnets_ids_list +} +output "vpc_private_subnets_ids_list" { + value = module.launch_vpc.private_subnets_ids_list +} +output "ami_id" { + value = module.launch_gateway_into_vpc.ami_id +} +output "permissive_sg_id" { + value = module.launch_gateway_into_vpc.permissive_sg_id +} +output "permissive_sg_name" { + value = module.launch_gateway_into_vpc.permissive_sg_name +} +output "gateway_url" { + value = module.launch_gateway_into_vpc.gateway_url +} +output "gateway_public_ip" { + value = module.launch_gateway_into_vpc.gateway_public_ip +} +output "gateway_instance_id" { + value = module.launch_gateway_into_vpc.gateway_instance_id +} +output "gateway_instance_name" { + value = module.launch_gateway_into_vpc.gateway_instance_name +} \ No newline at end of file diff --git a/terraform/aws/gateway-master/terraform.tfvars b/terraform/aws/gateway-master/terraform.tfvars new file mode 100755 index 00000000..a8eb1d58 --- /dev/null +++ b/terraform/aws/gateway-master/terraform.tfvars @@ -0,0 +1,50 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 +} +private_subnets_map = { + "us-east-1a" = 2 +} +subnets_bit_length = 8 + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" + +// --- (Optional) Automatic Provisioning with Security Management Server Settings --- +control_gateway_over_public_or_private_address = "private" +management_server = "" +configuration_template = "" \ No newline at end of file diff --git a/terraform/aws/gateway-master/variables.tf b/terraform/aws/gateway-master/variables.tf new file mode 100755 index 00000000..1c00c4f3 --- /dev/null +++ b/terraform/aws/gateway-master/variables.tf @@ -0,0 +1,195 @@ +// Module: Check Point CloudGuard Network Security Gateway into a new VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20." +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instance" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateway" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instance" + default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) Security Gateway prompt hostname" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} + +// --- (Optional) Automatic Provisioning with Security Management Server Settings --- +variable "control_gateway_over_public_or_private_address" { + type = string + description = "Determines if the Security Gateway is provisioned using its private or public address" + default = "private" +} +variable "management_server" { + type = string + description = "(Optional) The name that represents the Security Management Server in the automatic provisioning configuration" + default = "" +} +variable "configuration_template" { + type = string + description = "(Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration" + default = "" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters." + } +} \ No newline at end of file diff --git a/terraform/aws/gateway-master/versions.tf b/terraform/aws/gateway-master/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/gateway-master/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/gateway/README.md b/terraform/aws/gateway/README.md new file mode 100755 index 00000000..0ee957ff --- /dev/null +++ b/terraform/aws/gateway/README.md @@ -0,0 +1,191 @@ +# Check Point CloudGuard Network Security Gateway Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) - conditional creation + +See the [Automatically Provision a CloudGuard Security Gateway in AWS](https://supportcenter.us.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk131434) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/gateway/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/gateway/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/gateway/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + public_subnet_id = "subnet-123456" + private_subnet_id = "subnet-345678" + private_route_table = "rtb-12345678" + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Gateway-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + gateway_TokenKey = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + + // --- Automatic Provisioning with Security Management Server Settings (optional) --- + control_gateway_over_public_or_private_address = "private" + management_server = "" + configuration_template = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to the Gateway instance: + ``` + allocate_and_associate_eip = true + ``` + - To create route from '0.0.0.0/0' to the Security Gateway instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the security gateway | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the security gateway | string | n/a | n/a | yes | +| private_route_table | Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instance | string | n/a | Check-Point-Gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| gateway_hostname | (Optional) Security Gateway prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| control_gateway_over_public_or_private_address | Determines if the Security Gateway is provisioned using its private or public address | string | - public
- private | private | no | +| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | "" | no | +| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | "" | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|-----------------------|----------------------------------------------------| +| ami_id | The ami id of the deployed Security Gateway | +| permissive_sg_id | The permissive security group id | +| permissive_sg_name | The permissive security group id name | +| gateway_url | URL to the portal of the deployed Security Gateway | +| gateway_public_ip | The deployed Security Gateway Server AWS public ip | +| gateway_instance_id | The deployed Security Gateway AWS instance id | +| gateway_instance_name | The deployed Security Gateway AWS instance name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Gateway Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/aws/gateway/locals.tf b/terraform/aws/gateway/locals.tf new file mode 100755 index 00000000..79c894db --- /dev/null +++ b/terraform/aws/gateway/locals.tf @@ -0,0 +1,48 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + enable_cloudwatch_policy = var.enable_cloudwatch ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + //will fail if decode token should contain https:// and .checkpoint.com/app/maas/api/v1/tenant or empty string + split_token = split(" ", var.gateway_TokenKey) + token_decode = base64decode(element(local.split_token, length(local.split_token)-1)) + regex_token_valid = "(^https://(.+).checkpoint.com/app/maas/api/v1/tenant(.+)|^$)" + regex_token = regex(local.regex_token_valid, local.token_decode) == local.token_decode ? 0 : "Smart-1 Cloud token is invalid format" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.control_gateway_over_public_or_private_address) + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" +} \ No newline at end of file diff --git a/terraform/aws/gateway/main.tf b/terraform/aws/gateway/main.tf new file mode 100755 index 00000000..164d6bf0 --- /dev/null +++ b/terraform/aws/gateway/main.tf @@ -0,0 +1,119 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.gateway_version + chkp_type = "gateway" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.gateway_name +} + +resource "aws_iam_instance_profile" "gateway_instance_profile" { + count = local.enable_cloudwatch_policy + path = "/" + role = aws_iam_role.gateway_iam_role[count.index].name +} + +resource "aws_iam_role" "gateway_iam_role" { + count = local.enable_cloudwatch_policy + assume_role_policy = data.aws_iam_policy_document.gateway_role_assume_policy_document.json + path = "/" +} + +data "aws_iam_policy_document" "gateway_role_assume_policy_document" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + } +} + +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.enable_cloudwatch_policy + role = aws_iam_role.gateway_iam_role[count.index].name + tag_name = var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name +} + +resource "aws_network_interface" "public_eni" { + subnet_id = var.public_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "eth0" + source_dest_check = false + tags = { + Name = format("%s-external-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} +resource "aws_network_interface" "private_eni" { + subnet_id = var.private_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "eth1" + source_dest_check = false + tags = { + Name = format("%s-internal-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) } +} + +module "common_eip" { + source = "../modules/common/elastic_ip" + depends_on = [ + module.common_gateway_instance + ] + + allocate_and_associate_eip = var.allocate_and_associate_eip + external_eni_id = aws_network_interface.public_eni.id + private_ip_address = aws_network_interface.public_eni.private_ip +} + +module "common_internal_default_route" { + source = "../modules/common/internal_default_route" + + private_route_table = var.private_route_table + internal_eni_id = aws_network_interface.private_eni.id +} + +module "common_gateway_instance" { + source = "../modules/common/gateway_instance" + + external_eni_id = aws_network_interface.public_eni.id + internal_eni_id = aws_network_interface.private_eni.id + gateway_name = var.gateway_name + management_server = var.management_server + configuration_template = var.configuration_template + control_gateway_over_public_or_private_address = var.control_gateway_over_public_or_private_address + volume_size = var.volume_size + volume_encryption = var.volume_encryption + gateway_version = module.amis.version_license_with_suffix + gateway_instance_type = var.gateway_instance_type + instance_tags = var.instance_tags + key_name = var.key_name + iam_instance_profile_id = (local.enable_cloudwatch_policy == 1 ? aws_iam_instance_profile.gateway_instance_profile[0].id : "") + ami_id = module.amis.ami_id + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_TokenKey = var.gateway_TokenKey + gateway_bootstrap_script = var.gateway_bootstrap_script + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required +} \ No newline at end of file diff --git a/terraform/aws/gateway/output.tf b/terraform/aws/gateway/output.tf new file mode 100755 index 00000000..ab3c934f --- /dev/null +++ b/terraform/aws/gateway/output.tf @@ -0,0 +1,21 @@ +output "ami_id" { + value = module.amis.ami_id +} +output "permissive_sg_id" { + value = module.common_permissive_sg.permissive_sg_id +} +output "permissive_sg_name" { + value = module.common_permissive_sg.permissive_sg_name +} +output "gateway_url" { + value = format("https://%s", module.common_eip.gateway_eip_public_ip[0]) +} +output "gateway_public_ip" { + value = module.common_eip.gateway_eip_public_ip +} +output "gateway_instance_id" { + value = module.common_gateway_instance.gateway_instance_id +} +output "gateway_instance_name" { + value = module.common_gateway_instance.gateway_instance_name +} \ No newline at end of file diff --git a/terraform/aws/gateway/terraform.tfvars b/terraform/aws/gateway/terraform.tfvars new file mode 100755 index 00000000..02b1f781 --- /dev/null +++ b/terraform/aws/gateway/terraform.tfvars @@ -0,0 +1,46 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +public_subnet_id = "subnet-123456" +private_subnet_id = "subnet-345678" +private_route_table = "rtb-12345678" + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Gateway-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +gateway_TokenKey = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" + +// --- Automatic Provisioning with Security Management Server Settings (optional) --- +control_gateway_over_public_or_private_address = "private" +management_server = "" +configuration_template = "" \ No newline at end of file diff --git a/terraform/aws/gateway/variables.tf b/terraform/aws/gateway/variables.tf new file mode 100755 index 00000000..7d32ab1a --- /dev/null +++ b/terraform/aws/gateway/variables.tf @@ -0,0 +1,192 @@ +// Module: Check Point CloudGuard Network Security Gateway into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_subnet_id" { + type = string + description = "The public subnet of the security gateway" +} +variable "private_subnet_id" { + type = string + description = "The private subnet of the security gateway" +} +variable "private_route_table" { + type = string + description = "Sets '0.0.0.0/0' route to the Security Gateway instance in the specified route table (e.g. rtb-12a34567)" + default= "" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instance" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateway" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance" + default = {} +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) Security Gateway prompt hostname" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} + +// --- (Optional) Automatic Provisioning with Security Management Server Settings --- +variable "control_gateway_over_public_or_private_address" { + type = string + description = "Determines if the Security Gateway is provisioned using its private or public address" + default = "private" +} +variable "management_server" { + type = string + description = "(Optional) The name that represents the Security Management Server in the automatic provisioning configuration" + default = "" +} +variable "configuration_template" { + type = string + description = "(Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration" + default = "" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters." + } +} \ No newline at end of file diff --git a/terraform/aws/gateway/versions.tf b/terraform/aws/gateway/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/gateway/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/gwlb-master/README.md b/terraform/aws/gwlb-master/README.md new file mode 100755 index 00000000..4fcdeaa2 --- /dev/null +++ b/terraform/aws/gwlb-master/README.md @@ -0,0 +1,235 @@ +# Check Point CloudGuard Network Gateway Load Balancer Master Terraform module for AWS + +Terraform module which deploys an AWS Auto Scaling group configured for Gateway Load Balancer into a new VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) +* [VPC](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) +* [Security Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) +* [Load Balancer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) +* [Load Balancer Target Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) +* [Launch template](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) +* [Auto Scaling Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) +* [IAM Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) - conditional creation + +See the [Check Point CloudGuard Gateway Load Balancer on AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_AWS_Centralized_Gateway_Load_Balancer/Content/Topics-AWS-GWLB-VPC-DG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale-gwlb +- /terraform/aws/management +- /terraform/aws/cme-iam-role-gwlb +- /terraform/aws/modules/amis +- /terraform/aws/modules/vpc +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale-gwlb, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/gwlb/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` + - Create or modify the deployment: + ``` + terraform apply + ``` + + - Variables are configured in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + + // --- Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + } + subnets_bit_length = 8 + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + volume_size = 100 + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + management_server = "CP-Management-gwlb-tf" + configuration_template = "gwlb-configuration" + admin_shell = "/etc/cli.sh" + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = "gwlb1" + target_group_name = "tg1" + connection_acceptance_required = "false" + enable_cross_zone_load_balancing = "true" + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-GW-tf" + gateway_instance_type = "c5.xlarge" + minimum_group_size = 2 + maximum_group_size = 10 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + gateways_provision_address_type = "private" + allocate_public_IP = false + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateway_management = "Locally managed" + admin_cidr = "" + gateways_addresses = "" + + // --- Other parameters --- + volume_type = "gp3" + + + ``` + +- Conditional creation + - To enable cloudwatch for gwlb-master: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/ a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|---------------------|---------------------------------------------------------------------------------------| +| managment_public_ip | The deployed Security Management AWS instance public IP | +| load_balancer_url | The URL of the external Load Balancer | +| template_name | Name of a gateway configuration template in the automatic provisioning configuration. | +| controller_name | The controller name in CME. | +| gwlb_name | The name of the deployed Gateway Load Balancer | +| gwlb_service_name | The service name for the deployed Gateway Load Balancer | +| gwlb_arn | The arn for the deployed Gateway Load Balancer | + + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------| +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer master module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221215 | Support ASG Launch Template instead of Launch Configuration | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/gwlb-master/locals.tf b/terraform/aws/gwlb-master/locals.tf new file mode 100755 index 00000000..29a557ee --- /dev/null +++ b/terraform/aws/gwlb-master/locals.tf @@ -0,0 +1,61 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.gateways_provision_address_type) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + + regex_valid_admin_cidr = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) + +} \ No newline at end of file diff --git a/terraform/aws/gwlb-master/main.tf b/terraform/aws/gwlb-master/main.tf new file mode 100755 index 00000000..da8bf39c --- /dev/null +++ b/terraform/aws/gwlb-master/main.tf @@ -0,0 +1,69 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + + +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = {} + subnets_bit_length = var.subnets_bit_length +} + +module "gwlb" { + source = "../gwlb" + providers = { + aws = aws + } + vpc_id = module.launch_vpc.vpc_id + subnet_ids = module.launch_vpc.public_subnets_ids_list + + // --- General Settings --- + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + volume_size = var.volume_size + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + allow_upload_download = var.allow_upload_download + management_server = var.management_server + configuration_template = var.configuration_template + admin_shell = var.admin_shell + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = var.gateway_load_balancer_name + target_group_name = var.target_group_name + connection_acceptance_required = false + enable_cross_zone_load_balancing = var.enable_cross_zone_load_balancing + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + minimum_group_size = var.minimum_group_size + maximum_group_size = var.maximum_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + gateways_provision_address_type = var.gateways_provision_address_type + allocate_public_IP = var.allocate_public_IP + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = var.management_deploy + management_instance_type = var.management_instance_type + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + gateways_policy = var.gateways_policy + gateway_management = var.gateway_management + admin_cidr = var.admin_cidr + gateways_addresses = var.gateways_addresses + + volume_type = var.volume_type +} \ No newline at end of file diff --git a/terraform/aws/gwlb-master/output.tf b/terraform/aws/gwlb-master/output.tf new file mode 100755 index 00000000..15cb48a3 --- /dev/null +++ b/terraform/aws/gwlb-master/output.tf @@ -0,0 +1,24 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} +output "management_public_ip" { + depends_on = [module.gwlb] + value = module.gwlb[*].management_public_ip +} +output "gwlb_arn" { + depends_on = [module.gwlb] + value = module.gwlb[*].gwlb_arn +} +output "gwlb_service_name" { + depends_on = [module.gwlb] + value = module.gwlb[*].gwlb_service_name +} +output "gwlb_name" { + value = var.gateway_load_balancer_name +} +output "controller_name" { + value = "gwlb-controller" +} +output "template_name" { + value = var.configuration_template +} \ No newline at end of file diff --git a/terraform/aws/gwlb-master/terraform.tfvars b/terraform/aws/gwlb-master/terraform.tfvars new file mode 100755 index 00000000..f0f13c92 --- /dev/null +++ b/terraform/aws/gwlb-master/terraform.tfvars @@ -0,0 +1,56 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 +} +subnets_bit_length = 8 + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +volume_size = 100 +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +management_server = "CP-Management-gwlb-tf" +configuration_template = "gwlb-configuration" +admin_shell = "/etc/cli.sh" + +// --- Gateway Load Balancer Configuration --- +gateway_load_balancer_name = "gwlb1" +target_group_name = "tg1" +connection_acceptance_required = "false" +enable_cross_zone_load_balancing = "true" + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-GW-tf" +gateway_instance_type = "c5.xlarge" +minimum_group_size = 2 +maximum_group_size = 10 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +gateways_provision_address_type = "private" +allocate_public_IP = false +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Other parameters --- +volume_type = "gp3" + diff --git a/terraform/aws/gwlb-master/variables.tf b/terraform/aws/gwlb-master/variables.tf new file mode 100755 index 00000000..fd72c46c --- /dev/null +++ b/terraform/aws/gwlb-master/variables.tf @@ -0,0 +1,274 @@ +// Module: Check Point CloudGuard Network Gateway Load Balancer into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Network Configuration --- +variable "number_of_AZs" { + type = number + description = "Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter" + default = 2 +} +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the automatic provisioning configuration." +} +variable "configuration_template" { + type = string + description = "A name of a gateway configuration template in the automatic provisioning configuration." + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Gateway Load Balancer Configuration --- + +variable "gateway_load_balancer_name" { + type = string + description = "Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "gwlb1" +} +resource "null_resource" "gateway_load_balancer_name_too_long" { + // Will fail if gateway_load_balancer_name more than 32 + count = length(var.gateway_load_balancer_name) <= 32 ? 0 : "variable gateway_load_balancer_name must be at most 32" +} +variable "target_group_name" { + type = string + description = "Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "tg1" +} +resource "null_resource" "target_group_name_too_long" { + // Will fail if target_group_name more than 32 + count = length(var.target_group_name) <= 32 ? 0 : "variable target_group_name must be at most 32" +} +variable "connection_acceptance_required" { + type = bool + description = "Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required)." + default = false +} +variable "enable_cross_zone_load_balancing" { + type = bool + description = "Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges." + default = true +} + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateway instances. (optional)" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The EC2 instance type for the Security Gateways." + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "minimum_group_size" { + type = number + description = "The minimal number of Security Gateways." + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximal number of Security Gateways." + default = 10 +} +variable "gateway_version" { + type = string + description = "The version and license to install on the Security Gateways." + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gwlb_gw" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} + +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} + +variable "allocate_public_IP" { + type = bool + description = "Allocate an Elastic IP for security gateway." + default = false +} + +resource "null_resource" "invalid_allocation" { + // Will fail if var.gateways_provision_address_type is public and var.allocate_public_IP is false + count = var.gateways_provision_address_type != "public" ? 0 : var.allocate_public_IP == true ? 0 : "Gateway's selected to be provisioned by public IP, but [allocate_public_IP] parameter is false" +} + +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics." + default = false +} + +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- + +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the management instance, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address." + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + +// --- Other parameters --- +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} \ No newline at end of file diff --git a/terraform/aws/gwlb-master/versions.tf b/terraform/aws/gwlb-master/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/gwlb-master/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/gwlb/README.md b/terraform/aws/gwlb/README.md new file mode 100755 index 00000000..4363e8c9 --- /dev/null +++ b/terraform/aws/gwlb/README.md @@ -0,0 +1,228 @@ +# Check Point CloudGuard Network Gateway Load Balancer Terraform module for AWS + +Terraform module which deploys an AWS Auto Scaling group configured for Gateway Load Balancer into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) +* [Security Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) +* [Load Balancer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) +* [Load Balancer Target Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) +* [Launch template](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) +* [Auto Scaling Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) +* [IAM Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) - conditional creation + +See the [Check Point CloudGuard Gateway Load Balancer on AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_AWS_Centralized_Gateway_Load_Balancer/Content/Topics-AWS-GWLB-VPC-DG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale-gwlb +- /terraform/aws/management +- /terraform/aws/cme-iam-role-gwlb +- /terraform/aws/modules/amis +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale-gwlb, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/gwlb/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + + - Variables are configured in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345" + subnet_ids = ["subnet-123457", "subnet-123456"] + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + volume_size = 100 + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + management_server = "CP-Management-gwlb-tf" + configuration_template = "gwlb-configuration" + admin_shell = "/etc/cli.sh" + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = "gwlb1" + target_group_name = "tg1" + connection_acceptance_required = "false" + enable_cross_zone_load_balancing = "true" + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-GW-tf" + gateway_instance_type = "c5.xlarge" + minimum_group_size = 2 + maximum_group_size = 10 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + gateways_provision_address_type = "private" + allocate_public_IP = false + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateway_management = "Locally managed" + admin_cidr = "" + gateways_addresses = "" + + // --- Other parameters --- + volume_type = "gp3" + + + ``` + +- Conditional creation + - To enable cloudwatch for GWLB: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| subnet_ids | The VPC subnets ID | string | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + +## Outputs +| Name | Description | +|---------------------|---------------------------------------------------------------------------------------| +| managment_public_ip | The deployed Security Management AWS instance public IP | +| load_balancer_url | The URL of the external Load Balancer | +| template_name | Name of a gateway configuration template in the automatic provisioning configuration. | +| controller_name | The controller name in CME. | +| gwlb_name | The name of the deployed Gateway Load Balancer | +| gwlb_service_name | The service name for the deployed Gateway Load Balancer | +| gwlb_arn | The arn for the deployed Gateway Load Balancer | + + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------| +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer module for AWS | +| 20220523 | Add support for cross zone load balancing | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20231022 | Fixed template to populate x-chkp-tags correctly | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/gwlb/locals.tf b/terraform/aws/gwlb/locals.tf new file mode 100755 index 00000000..44363311 --- /dev/null +++ b/terraform/aws/gwlb/locals.tf @@ -0,0 +1,55 @@ +locals { + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.gateways_provision_address_type) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_admin_cidr = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) +} \ No newline at end of file diff --git a/terraform/aws/gwlb/main.tf b/terraform/aws/gwlb/main.tf new file mode 100755 index 00000000..7c4e4616 --- /dev/null +++ b/terraform/aws/gwlb/main.tf @@ -0,0 +1,99 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +module "gateway_load_balancer" { + source = "../modules/common/load_balancer" + + load_balancers_type = "gateway" + instances_subnets = var.subnet_ids + prefix_name = var.gateway_load_balancer_name + internal = true + + security_groups = [] + tags = { + x-chkp-management = var.management_server + x-chkp-template = var.configuration_template + } + vpc_id = var.vpc_id + load_balancer_protocol = "GENEVE" + target_group_port = 6081 + listener_port = 6081 + cross_zone_load_balancing = var.enable_cross_zone_load_balancing +} + +resource "aws_vpc_endpoint_service" "gwlb_endpoint_service" { +depends_on = [module.gateway_load_balancer] + gateway_load_balancer_arns = module.gateway_load_balancer[*].load_balancer_arn + acceptance_required = var.connection_acceptance_required + + tags = { + "Name" = "gwlb-endpoint-service-${var.gateway_load_balancer_name}" + } +} + +module "autoscale_gwlb" { + source = "../autoscale-gwlb" + providers = { + aws = aws + } + depends_on = [module.gateway_load_balancer] + + target_groups = module.gateway_load_balancer[*].target_group_arn + vpc_id = var.vpc_id + subnet_ids = var.subnet_ids + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + enable_instance_connect = var.enable_instance_connect + metadata_imdsv2_required = var.metadata_imdsv2_required + minimum_group_size = var.minimum_group_size + maximum_group_size = var.maximum_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + admin_shell = var.admin_shell + gateways_provision_address_type = var.gateways_provision_address_type + allocate_public_IP = var.allocate_public_IP + management_server = var.management_server + configuration_template = var.configuration_template + volume_type = var.volume_type +} + +data "aws_region" "current"{} + +module "management" { + providers = { + aws = aws + } + count = local.deploy_management_condition ? 1 : 0 + source = "../management" + + vpc_id = var.vpc_id + subnet_id = var.subnet_ids[0] + management_name = var.management_server + management_instance_type = var.management_instance_type + key_name = var.key_name + allocate_and_associate_eip = true + volume_encryption = var.enable_volume_encryption ? "alias/aws/ebs" : "" + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + allow_upload_download = var.allow_upload_download + admin_cidr = var.admin_cidr + admin_shell = var.admin_shell + gateway_addresses = var.gateways_addresses + gateway_management = var.gateway_management + management_bootstrap_script = "echo -e '\nStarting Bootstrap script\n'; cv_json_path='/etc/cloud-version.json'\n cv_json_path_tmp='/etc/cloud-version-tmp.json'\n if test -f \"$cv_json_path\"; then cat \"$cv_json_path\" | jq '.template_name = \"'\"management_gwlb\"'\"' > \"$cv_json_path_tmp\"; mv \"$cv_json_path_tmp\" \"$cv_json_path\"; fi; autoprov_cfg -f init AWS -mn ${var.management_server} -tn ${var.configuration_template} -cn gwlb-controller -po ${var.gateways_policy} -otp ${var.gateway_SICKey} -r ${data.aws_region.current.name} -ver ${split("-", var.gateway_version)[0]} -iam; echo -e '\nFinished Bootstrap script\n'" + volume_type = var.volume_type + is_gwlb_iam = true +} diff --git a/terraform/aws/gwlb/output.tf b/terraform/aws/gwlb/output.tf new file mode 100755 index 00000000..3beba7ee --- /dev/null +++ b/terraform/aws/gwlb/output.tf @@ -0,0 +1,22 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} +output "gwlb_arn" { + value = module.gateway_load_balancer.load_balancer_arn +} +output "gwlb_service_name" { + value = "com.amazonaws.vpce.${data.aws_region.current.name}.${aws_vpc_endpoint_service.gwlb_endpoint_service.id}" +} +output "management_public_ip" { + depends_on = [module.management] + value = module.management[*].management_public_ip +} +output "gwlb_name" { + value = var.gateway_load_balancer_name +} +output "controller_name" { + value = "gwlb-controller" +} +output "template_name" { + value = var.configuration_template +} \ No newline at end of file diff --git a/terraform/aws/gwlb/terraform.tfvars b/terraform/aws/gwlb/terraform.tfvars new file mode 100755 index 00000000..0e26ad11 --- /dev/null +++ b/terraform/aws/gwlb/terraform.tfvars @@ -0,0 +1,52 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +subnet_ids = ["subnet-123456", "subnet-345678"] + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +volume_size = 100 +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +management_server = "CP-Management-gwlb-tf" +configuration_template = "gwlb-configuration" +admin_shell = "/etc/cli.sh" + +// --- Gateway Load Balancer Configuration --- +gateway_load_balancer_name = "gwlb1" +target_group_name = "tg1" +connection_acceptance_required = "false" +enable_cross_zone_load_balancing = "true" + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-GW-tf" +gateway_instance_type = "c5.xlarge" +minimum_group_size = 2 +maximum_group_size = 10 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +gateways_provision_address_type = "private" +allocate_public_IP = false +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Other parameters --- +volume_type = "gp3" + diff --git a/terraform/aws/gwlb/variables.tf b/terraform/aws/gwlb/variables.tf new file mode 100755 index 00000000..5f099c6c --- /dev/null +++ b/terraform/aws/gwlb/variables.tf @@ -0,0 +1,263 @@ +// Module: Check Point CloudGuard Network Gateway Load Balancer into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Network Configuration --- +variable "vpc_id" { + type = string +} +variable "subnet_ids" { + type = list(string) + description = "List of public subnet IDs to launch resources into. Recommended at least 2" +} + +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the automatic provisioning configuration." +} +variable "configuration_template" { + type = string + description = "A name of a gateway configuration template in the automatic provisioning configuration." + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Gateway Load Balancer Configuration --- + +variable "gateway_load_balancer_name" { + type = string + description = "Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "gwlb1" +} +resource "null_resource" "gateway_load_balancer_name_too_long" { + // Will fail if gateway_load_balancer_name more than 32 + count = length(var.gateway_load_balancer_name) <= 32 ? 0 : "variable gateway_load_balancer_name must be at most 32" +} +variable "target_group_name" { + type = string + description = "Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "tg1" +} +resource "null_resource" "target_group_name_too_long" { + // Will fail if target_group_name more than 32 + count = length(var.target_group_name) <= 32 ? 0 : "variable target_group_name must be at most 32" +} +variable "connection_acceptance_required" { + type = bool + description = "Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required)." + default = false +} +variable "enable_cross_zone_load_balancing" { + type = bool + description = "Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges." + default = true +} + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateway instances. (optional)" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The EC2 instance type for the Security Gateways." + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "minimum_group_size" { + type = number + description = "The minimal number of Security Gateways." + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximal number of Security Gateways." + default = 10 +} +variable "gateway_version" { + type = string + description = "The version and license to install on the Security Gateways." + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gwlb_gw" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} + +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} + +variable "allocate_public_IP" { + type = bool + description = "Allocate an Elastic IP for security gateway." + default = false +} + +resource "null_resource" "invalid_allocation" { + // Will fail if var.gateways_provision_address_type is public and var.allocate_public_IP is false + count = var.gateways_provision_address_type != "public" ? 0 : var.allocate_public_IP == true ? 0 : "Gateway's selected to be provisioned by public IP, but [allocate_public_IP] parameter is false" +} + +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics." + default = false +} + +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- + +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the management instance, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address." + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + +// --- Other parameters --- +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} \ No newline at end of file diff --git a/terraform/aws/gwlb/versions.tf b/terraform/aws/gwlb/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/gwlb/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/management/README.md b/terraform/aws/management/README.md new file mode 100755 index 00000000..dd57ea4d --- /dev/null +++ b/terraform/aws/management/README.md @@ -0,0 +1,200 @@ +# Check Point CloudGuard Network Security Management Server Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Management Server into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Security Management Server with CloudGuard for AWS](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk130372) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/cme-iam-role + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/management/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/management/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/management/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + subnet_id = "subnet-abc123" + + // --- EC2 Instances Configuration --- + management_name = "CP-Management-tf" + management_instance_type = "m5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- IAM Permissions --- + iam_permissions = "Create with read permissions" + predefined_role = "" + sts_roles = [] + + // --- Check Point Settings --- + management_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + // --- Security Management Server Settings --- + management_hostname = "mgmt-tf" + management_installation_type = "Primary management" + SICKey = "" + allow_upload_download = "true" + gateway_management = "Locally managed" + admin_cidr = "0.0.0.0/0" + gateway_addresses = "0.0.0.0/0" + primary_ntp = "" + secondary_ntp = "" + management_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to the Management instance: + ``` + allocate_and_associate_eip = true + ``` + - To create IAM Role: + ``` + iam_permissions = "Create with read permissions" | "Create with read-write permissions" | "Create with assume role permissions (specify an STS role ARN)" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_id | To access the instance from the internet, make sure the subnet has a route to the internet | string | n/a | n/a | yes | +| management_name | (Optional) The name tag of the Security Management instance | string | n/a | Check-Point-Management-tf | no | +| management_instance_type | The instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Management EC2 Instance | map(string) | n/a | {} | no | +| iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | +| predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | +| sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | +| management_version | Management version and license | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| management_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | +| management_hostname | (Optional) Security Management Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| management_installation_type | Determines if this is the primary management server, secondary management server or log server | string | - Primary management
- Secondary management
- Log Server
| Primary management | yes | +| SICKey | Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Security Management Server | string | valid CIDR | 0.0.0.0/0 | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| management_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------------|--------------------------------------------------------------| +| management_instance_id | The deployed Security Management Server AWS instance id | +| management_instance_name | The deployed Security Management AWS instance name | +| management_instance_tags | The deployed Security Management Server AWS tags | +| management_public_ip | The deployed Security Management Server AWS public ip | +| management_url | URL to the portal of the deployed Security Management Server | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Management Server Terraform module for AWS | +| 20210329 | Stability fixes | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240207 | Added Log Server installation support | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/management/locals.tf b/terraform/aws/management/locals.tf new file mode 100755 index 00000000..896719ba --- /dev/null +++ b/terraform/aws/management/locals.tf @@ -0,0 +1,76 @@ +locals { + permissions_allowed_values = [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.iam_permissions) + + use_role = var.iam_permissions == "None (configure later)" ? 0 : 1 + create_iam_role = var.iam_permissions == "Create with assume role permissions (specify an STS role ARN)" || var.iam_permissions == "Create with read permissions" || var.iam_permissions == "Create with read-write permissions" + pre_role = (local.use_role == 1 && local.create_iam_role == false) ? 1 : 0 + new_instance_profile = (local.create_iam_role == true && local.use_role == 1) ? 1 : 0 + + new_instance_profile_general = local.new_instance_profile == 1 && var.is_gwlb_iam == false ? 1 : 0 + new_instance_profile_gwlb = local.new_instance_profile == 1 && var.is_gwlb_iam ? 1 : 0 + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // Will fail if var.gateway_management is invalid + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_subnet or var.gateway_addresses are invalid + mgmt_subnet_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_subnet must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + regex_valid_sic_key = "(|[a-zA-Z0-9]{8,})" + // Will fail if var.SICKey is invalid + regex_sic_result = regex(local.regex_valid_sic_key, var.SICKey) == var.SICKey ? 0 : "Variable [SICKey] must be at least 8 alphanumeric characters" + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.management_version), 0) + + management_bootstrap_script64 = base64encode(var.management_bootstrap_script) + management_SICkey_base64=base64encode(var.SICKey) + management_password_hash_base64=base64encode(var.management_password_hash) + maintenance_mode_password_hash_base64=base64encode(var.management_maintenance_mode_password_hash) + + manage_over_the_internet = var.gateway_management == "Over the internet" ? true : false + manage_over_internet_and_EIP = var.allocate_and_associate_eip && local.manage_over_the_internet ? true : false + pub_mgmt = local.manage_over_internet_and_EIP ? true : false + + management_installation_type_allowed_values = [ + "Primary management", + "Secondary management", + "Log Server"] + validate_management_installation_type = index(local.management_installation_type_allowed_values, var.management_installation_type) +} \ No newline at end of file diff --git a/terraform/aws/management/main.tf b/terraform/aws/management/main.tf new file mode 100755 index 00000000..3714dfa2 --- /dev/null +++ b/terraform/aws/management/main.tf @@ -0,0 +1,221 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.management_version + chkp_type = "management" +} + +resource "aws_security_group" "management_sg" { + description = "terraform Management security group" + vpc_id = var.vpc_id + name_prefix = format("%s_SecurityGroup", var.management_name) + // Group name + tags = { + Name = format("%s_SecurityGroup", var.management_name) + // Resource name + } + ingress { + from_port = 257 + to_port = 257 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18191 + to_port = 18191 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18192 + to_port = 18192 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18208 + to_port = 18208 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18210 + to_port = 18210 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18211 + to_port = 18211 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18221 + to_port = 18221 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18264 + to_port = 18264 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + + ingress { + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 18190 + to_port = 18190 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 19009 + to_port = 19009 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_network_interface" "external-eni" { + subnet_id = var.subnet_id + security_groups = [aws_security_group.management_sg.id] + description = "eth0" + source_dest_check = true + tags = { + Name = format("%s-network_interface", var.management_name) + } +} + +resource "aws_eip" "eip" { + count = var.allocate_and_associate_eip ? 1 : 0 + network_interface = aws_network_interface.external-eni.id +} + +resource "aws_iam_instance_profile" "management_instance_profile" { + count = local.pre_role + path = "/" + role = var.predefined_role +} + +resource "aws_launch_template" "management_launch_template" { + depends_on = [ + aws_network_interface.external-eni, + aws_eip.eip + ] + + instance_type = var.management_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = local.use_role == 1 ? (local.pre_role == 1 ? aws_iam_instance_profile.management_instance_profile[0].id : join("", (var.is_gwlb_iam == true ? module.cme_iam_role_gwlb.*.cme_iam_profile_name : module.cme_iam_role.*.cme_iam_profile_name))): "" + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.external-eni.id + device_index = 0 + } +} + +resource "aws_instance" "management-instance" { + depends_on = [ + aws_launch_template.management_launch_template + ] + + launch_template { + id = aws_launch_template.management_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = var.management_name + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = var.volume_type + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + lifecycle { + ignore_changes = [ebs_block_device,] + } + + user_data = templatefile("${path.module}/management_userdata.yaml", { + // script's arguments + Hostname = var.management_hostname, + PasswordHash = local.management_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + NTPPrimary = var.primary_ntp + NTPSecondary = var.secondary_ntp + Shell = var.admin_shell, + AdminSubnet = var.admin_cidr + ManagementInstallationType = var.management_installation_type + SICKey = local.management_SICkey_base64, + OsVersion = local.version_split + EnableInstanceConnect = var.enable_instance_connect + AllocateElasticIP = var.allocate_and_associate_eip + GatewayManagement = var.gateway_management + BootstrapScript = local.management_bootstrap_script64 + PubMgmt = local.pub_mgmt + + }) +} + +module "cme_iam_role" { + source = "../cme-iam-role" + providers = { + aws = aws + } + count = local.new_instance_profile_general + + sts_roles = var.sts_roles + permissions = var.iam_permissions +} + +module "cme_iam_role_gwlb" { + source = "../cme-iam-role-gwlb" + providers = { + aws = aws + } + count = local.new_instance_profile_gwlb + + sts_roles = var.sts_roles + permissions = var.iam_permissions +} diff --git a/terraform/aws/management/management_userdata.yaml b/terraform/aws/management/management_userdata.yaml new file mode 100755 index 00000000..0f3801ff --- /dev/null +++ b/terraform/aws/management/management_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" "management_installation_type=\"${ManagementInstallationType}\"" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" overTheInternet=\"${PubMgmt}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/management/output.tf b/terraform/aws/management/output.tf new file mode 100755 index 00000000..da20727b --- /dev/null +++ b/terraform/aws/management/output.tf @@ -0,0 +1,19 @@ +output "Deployment" { + value = "Finalizing configuration may take up to 20 minutes after deployment is finished." +} + +output "management_instance_id" { + value = aws_instance.management-instance.id +} +output "management_instance_name" { + value = aws_instance.management-instance.tags["Name"] +} +output "management_instance_tags" { + value = aws_instance.management-instance.tags +} +output "management_public_ip" { + value = aws_instance.management-instance.public_ip +} +output "management_url" { + value = format("https://%s", aws_instance.management-instance.public_ip) +} \ No newline at end of file diff --git a/terraform/aws/management/terraform.tfvars b/terraform/aws/management/terraform.tfvars new file mode 100755 index 00000000..81891681 --- /dev/null +++ b/terraform/aws/management/terraform.tfvars @@ -0,0 +1,42 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +subnet_id = "subnet-abc123" + +// --- EC2 Instances Configuration --- +management_name = "CP-Management-tf" +management_instance_type = "m5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- IAM Permissions --- +iam_permissions = "Create with read permissions" +predefined_role = "" +sts_roles = [] + +// --- Check Point Settings --- +management_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +// --- Security Management Server Settings --- +management_hostname = "mgmt-tf" +management_installation_type = "Primary management" +SICKey = "" +allow_upload_download = "true" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "" +secondary_ntp = "" +management_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" diff --git a/terraform/aws/management/variables.tf b/terraform/aws/management/variables.tf new file mode 100755 index 00000000..763918f0 --- /dev/null +++ b/terraform/aws/management/variables.tf @@ -0,0 +1,194 @@ +// Module: Check Point CloudGuard Network Security Management Server into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "subnet_id" { + type = string + description = "To access the instance from the internet, make sure the subnet has a route to the internet" +} + +// --- EC2 Instance Configuration --- +variable "management_name" { + type = string + description = "(Optional) The name tag of the Security Management instance" + default = "Check-Point-Management-tf" +} +variable "management_instance_type" { + type = string + description = "The instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable AWS Instance Connect - Ec2 Instance Connect is not supported with versions prior to R80.40" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Management EC2 Instance" + default = {} +} + +// --- IAM Permissions (ignored when the installation is not Primary Management Server) --- +variable "iam_permissions" { + type = string + description = "IAM role to attach to the instance profile" + default = "Create with read permissions" +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing'" + default = "" +} +variable "sts_roles" { + type = list(string) + description = "(Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing'" + default = [] +} + +// --- Check Point Settings --- +variable "management_version" { + type = string + description = "Management version and license" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Security Management Server Settings --- +variable "management_hostname" { + type = string + description = "(Optional) Security Management Server prompt hostname" + default = "" +} +variable "management_installation_type" { + type = string + description = "Determines the Management Server installation type: Primary management, Secondary management, Log Server" + default = "Primary management" +} +variable "SICKey" { + type = string + description = "Mandatory only when deploying a secondary Management Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address" + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" + default = "0.0.0.0/0" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Security Management Server" + default = "0.0.0.0/0" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} +variable "management_bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "is_gwlb_iam" { + type = bool + default = false +} \ No newline at end of file diff --git a/terraform/aws/management/versions.tf b/terraform/aws/management/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/management/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/mds/README.md b/terraform/aws/mds/README.md new file mode 100755 index 00000000..5da9667d --- /dev/null +++ b/terraform/aws/mds/README.md @@ -0,0 +1,190 @@ +# Check Point CloudGuard Network Multi-Domain Server Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Multi-Domain Server into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Multi-Domain Management Deployment on AWS](https://supportcenter.us.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk143213) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/cme-iam-role + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/mds/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/mds/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/mds/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + subnet_id = "subnet-abc123" + + // --- EC2 Instances Configuration --- + mds_name = "CP-MDS-tf" + mds_instance_type = "m5.12xlarge" + key_name = "publickey" + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- IAM Permissions --- + iam_permissions = "Create with read permissions" + predefined_role = "" + sts_roles = [] + + // --- Check Point Settings --- + mds_version = "R81.20-BYOL" + mds_admin_shell = "/etc/cli.sh" + mds_password_hash = "" + mds_maintenance_mode_password_hash = "" + + // --- Multi-Domain Server Settings --- + mds_hostname = "mds-tf" + mds_SICKey = "" + allow_upload_download = "true" + mds_installation_type = "Primary Multi-Domain Server" + admin_cidr = "0.0.0.0/0" + gateway_addresses = "0.0.0.0/0" + primary_ntp = "" + secondary_ntp = "" + mds_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + ``` + +- Conditional creation + - To create IAM Role: + ``` + iam_permissions = "Create with read permissions" | "Create with read-write permissions" | "Create with assume role permissions (specify an STS role ARN)" + and + mds_installation_type = "Primary Multi-Domain Server" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_id | To access the instance from the internet, make sure the subnet has a route to the internet | string | n/a | n/a | yes | +| mds_name | (Optional) The name tag of the Multi-Domain Server instance | string | n/a | Check-Point-MDS-tf | no | +| mds_instance_type | The instance type of the Multi-Domain Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.12xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Multi-Domain Server EC2 Instance | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | +| predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | +| sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | +| mds_version | Multi-Domain Server version and license | string | - R80.40-BYOL
- R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| mds_admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| mds_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | +| mds_hostname | (Optional) Multi-Domain Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| mds_SICKey | Mandatory if deploying a Secondary Multi-Domain Server or Multi-Domain Log Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| mds_installation_type | Determines the Multi-Domain Server installation type | string | - Primary Multi-Domain Server
- Secondary Multi-Domain Server
- Multi-Domain Log Server | Primary Multi-Domain Server | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Multi-Domain Server | string | valid CIDR | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Multi-Domain Server | string | valid CIDR | 0.0.0.0/0 | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| mds_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| mds_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|-------------------|----------------------------------------------------| +| mds_instance_id | The deployed Multi-Domain Server AWS instance id | +| mds_instance_name | The deployed Multi-Domain Server AWS instance name | +| mds_instance_tags | The deployed Multi-Domain Server AWS tags | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Multi-Domain Server Terraform module for AWS | +| 20210329 | Stability fixes | +| 20221123 | R81.20 version support | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/mds/locals.tf b/terraform/aws/mds/locals.tf new file mode 100755 index 00000000..7dd690a2 --- /dev/null +++ b/terraform/aws/mds/locals.tf @@ -0,0 +1,69 @@ +locals { + permissions_allowed_values = [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.iam_permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.iam_permissions) + + installation_type_allowed_values = [ + "Primary Multi-Domain Server", + "Secondary Multi-Domain Server", + "Multi-Domain Log Server"] + // Will fail if var.mds_installation_type is invalid + validate_installation_type = index(local.installation_type_allowed_values, var.mds_installation_type) + + primary_mds = var.mds_installation_type == "Primary Multi-Domain Server" + secondary_mds = var.mds_installation_type == "Secondary Multi-Domain Server" + + use_role = var.iam_permissions != "None (configure later)" && local.primary_mds ? 1 : 0 + create_iam_role = (local.primary_mds) && (var.iam_permissions == "Create with assume role permissions (specify an STS role ARN)" || var.iam_permissions == "Create with read permissions" || var.iam_permissions == "Create with read-write permissions") + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.mds_admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_subnet or var.gateway_addresses are invalid + mgmt_subnet_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_subnet must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.mds_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.mds_hostname) == var.mds_hostname ? 0 : "Variable [mds_hostname] must be a valid hostname label or an empty string" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + regex_valid_mds_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.mds_password_hash is invalid + regex_mds_password_hash = regex(local.regex_valid_mds_password_hash, var.mds_password_hash) == var.mds_password_hash ? 0 : "Variable [mds_password_hash] must be a valid password hash" + regex_maintenance_mode_password_hash = regex(local.regex_valid_mds_password_hash, var.mds_maintenance_mode_password_hash) == var.mds_maintenance_mode_password_hash ? 0 : "Variable [mds_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_sic_key = "(|[a-zA-Z0-9]{8,})" + // Will fail if var.mds_SICKey is invalid + regex_sic_result = regex(local.regex_valid_sic_key, var.mds_SICKey) == var.mds_SICKey ? 0 : "Variable [mds_SICKey] must be at least 8 alphanumeric characters" + //Splits the version and licence and returns the os version + version_split = element(split("-", var.mds_version), 0) + + mds_bootstrap_script64 = base64encode(var.mds_bootstrap_script) + mds_SICkey_base64 = base64encode(var.mds_SICKey) + mds_password_hash_base64 =base64encode(var.mds_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.mds_maintenance_mode_password_hash) +} \ No newline at end of file diff --git a/terraform/aws/mds/main.tf b/terraform/aws/mds/main.tf new file mode 100755 index 00000000..8a22b264 --- /dev/null +++ b/terraform/aws/mds/main.tf @@ -0,0 +1,194 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.mds_version + chkp_type = "mds" +} + +resource "aws_security_group" "mds_sg" { + description = "terraform Multi-Domain Server security group" + vpc_id = var.vpc_id + name_prefix = format("%s_SecurityGroup", var.mds_name) + // Group name + tags = { + Name = format("%s_SecurityGroup", var.mds_name) + // Resource name + } + ingress { + from_port = 257 + to_port = 257 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 8211 + to_port = 8211 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18191 + to_port = 18191 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18192 + to_port = 18192 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18208 + to_port = 18208 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18210 + to_port = 18210 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18211 + to_port = 18211 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18221 + to_port = 18221 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 18264 + to_port = 18264 + protocol = "tcp" + cidr_blocks = [var.gateway_addresses] + } + ingress { + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 18190 + to_port = 18190 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + ingress { + from_port = 19009 + to_port = 19009 + protocol = "tcp" + cidr_blocks = [var.admin_cidr] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_iam_instance_profile" "mds_instance_profile" { + count = local.use_role + path = "/" + role = local.create_iam_role ? join("", module.cme_iam_role.*.cme_iam_role_name) : var.predefined_role +} + +resource "aws_network_interface" "external-eni" { + subnet_id = var.subnet_id + security_groups = [aws_security_group.mds_sg.id] + description = "eth0" + source_dest_check = true + tags = { + Name = format("%s-network_interface", var.mds_name) + } +} + +resource "aws_launch_template" "mds_launch_template" { + instance_type = var.mds_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = local.use_role == 1 ? aws_iam_instance_profile.mds_instance_profile[0].id : "" + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.external-eni.id + device_index = 0 + } +} + +resource "aws_instance" "mds-instance" { + launch_template { + id = aws_launch_template.mds_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = var.mds_name + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + user_data = templatefile("${path.module}/mds_userdata.yaml", { + // script's arguments + Hostname = var.mds_hostname, + PasswordHash = local.mds_password_hash_base64 + MaintenanceModePassword = local.maintenance_mode_password_hash_base64 + AllowUploadDownload = var.allow_upload_download, + NTPPrimary = var.primary_ntp + NTPSecondary = var.secondary_ntp + Shell = var.mds_admin_shell, + AdminSubnet = var.admin_cidr + IsPrimary = local.primary_mds + IsSecondary = local.secondary_mds + SICKey = local.mds_SICkey_base64, + EnableInstanceConnect = var.enable_instance_connect + BootstrapScript = local.mds_bootstrap_script64 + OsVersion = local.version_split + }) +} + +module "cme_iam_role" { + source = "../cme-iam-role" + providers = { + aws = aws + } + count = local.create_iam_role ? 1 : 0 + + sts_roles = var.sts_roles + permissions = var.iam_permissions +} diff --git a/terraform/aws/mds/mds_userdata.yaml b/terraform/aws/mds/mds_userdata.yaml new file mode 100755 index 00000000..3321cd60 --- /dev/null +++ b/terraform/aws/mds/mds_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"mds\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"mds\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" primary=\"${IsPrimary}\" secondary=\"${IsSecondary}\" adminSubnet=\"${AdminSubnet}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/mds/output.tf b/terraform/aws/mds/output.tf new file mode 100755 index 00000000..c1d3783a --- /dev/null +++ b/terraform/aws/mds/output.tf @@ -0,0 +1,13 @@ +output "Deployment" { + value = "Finalizing configuration may take up to 20 minutes after deployment is finished." +} + +output "mds_instance_id" { + value = aws_instance.mds-instance.id +} +output "mds_instance_name" { + value = aws_instance.mds-instance.tags["Name"] +} +output "mds_instance_tags" { + value = aws_instance.mds-instance.tags +} \ No newline at end of file diff --git a/terraform/aws/mds/terraform.tfvars b/terraform/aws/mds/terraform.tfvars new file mode 100755 index 00000000..e79af359 --- /dev/null +++ b/terraform/aws/mds/terraform.tfvars @@ -0,0 +1,41 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +subnet_id = "subnet-abc123" + +// --- EC2 Instances Configuration --- +mds_name = "CP-MDS-tf" +mds_instance_type = "m5.12xlarge" +key_name = "publickey" +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- IAM Permissions --- +iam_permissions = "Create with read permissions" +predefined_role = "" +sts_roles = [] + +// --- Check Point Settings --- +mds_version = "R81.20-BYOL" +mds_admin_shell = "/etc/cli.sh" +mds_password_hash = "" +mds_maintenance_mode_password_hash = "" + +// --- Multi-Domain Server Settings --- +mds_hostname = "mds-tf" +mds_SICKey = "" +allow_upload_download = "true" +mds_installation_type = "Primary Multi-Domain Server" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" +primary_ntp = "" +secondary_ntp = "" +mds_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" diff --git a/terraform/aws/mds/variables.tf b/terraform/aws/mds/variables.tf new file mode 100755 index 00000000..f4218e4c --- /dev/null +++ b/terraform/aws/mds/variables.tf @@ -0,0 +1,175 @@ +// Module: Check Point CloudGuard Network Multi-Domain Server into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "subnet_id" { + type = string + description = "To access the instance from the internet, make sure the subnet has a route to the internet" +} + +// --- EC2 Instance Configuration --- +variable "mds_name" { + type = string + description = "(Optional) The name tag of the Multi-Domain Server instance" + default = "Check-Point-MDS-tf" +} +variable "mds_instance_type" { + type = string + description = "The instance type of the Multi-Domain Server" + default = "m5.2xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "mds" + instance_type = var.mds_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Multi-Domain Server EC2 Instance" + default = {} +} + +// --- IAM Permissions (ignored when the installation type is not Primary Multi-Domain Server) --- +variable "iam_permissions" { + type = string + description = "IAM role to attach to the instance profile" + default = "Create with read permissions" +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing'" + default = "" +} +variable "sts_roles" { + type = list(string) + description = "(Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing'" + default = [] +} + +// --- Check Point Settings --- +variable "mds_version" { + type = string + description = "Multi-Domain Server version and license" + default = "R81.20-BYOL" +} +module "validate_mds_version" { + source = "../modules/common/version_license" + + chkp_type = "mds" + version_license = var.mds_version +} +variable "mds_admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "mds_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "mds_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Multi-Domain Server Settings --- +variable "mds_hostname" { + type = string + description = "(Optional) Multi-Domain Server prompt hostname" + default = "" +} +variable "mds_SICKey" { + type = string + description = "Mandatory if deploying a Secondary Multi-Domain Server or Multi-Domain Log Server, the Secure Internal Communication key creates trusted connections between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "mds_installation_type" { + type = string + description = "Determines the Multi-Domain Server installation type" + default = "Primary Multi-Domain Server" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Multi-Domain Server" + default = "0.0.0.0/0" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Multi-Domain Server" + default = "0.0.0.0/0" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} +variable "mds_bootstrap_script" { + type = string + description = "(Optional) Semicolon (;) separated commands to run on the initial boot" + default = "" +} diff --git a/terraform/aws/mds/versions.tf b/terraform/aws/mds/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/mds/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/modules/amis/main.tf b/terraform/aws/modules/amis/main.tf new file mode 100644 index 00000000..4e76baa3 --- /dev/null +++ b/terraform/aws/modules/amis/main.tf @@ -0,0 +1,22 @@ +locals { + amis_yaml_regionMap = yamldecode(split("Resources", data.http.amis_yaml_http.response_body)[0]).Mappings.RegionMap + amis_yaml_converterMap = yamldecode(split("Resources", data.http.amis_yaml_http.response_body)[0]).Mappings.ConverterMap + + + // Variables example: + // version_license = "R80.40-PAYG-NGTX" + // RESULT: + // version_license_key = "R80.40-PAYG-NGTX-GW" + // version_license_value = "R8040PAYGNGTXGW" + + 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: + // region = "us-east-1" + // version_license_key - see above + // RESULT: local.ami_id = "ami-1234567" + ami_id = local.amis_yaml_regionMap[local.region][local.version_license_value] +} \ No newline at end of file diff --git a/terraform/aws/modules/amis/output.tf b/terraform/aws/modules/amis/output.tf new file mode 100644 index 00000000..0be16a15 --- /dev/null +++ b/terraform/aws/modules/amis/output.tf @@ -0,0 +1,6 @@ +output "ami_id" { + value = local.ami_id +} +output "version_license_with_suffix" { + value = local.version_license_key +} \ No newline at end of file diff --git a/terraform/aws/modules/amis/variables.tf b/terraform/aws/modules/amis/variables.tf new file mode 100644 index 00000000..10d6dee0 --- /dev/null +++ b/terraform/aws/modules/amis/variables.tf @@ -0,0 +1,26 @@ +variable "amis_url" { + type = string + description = "URL to amis.yaml" + default = "https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml" +} + +data "http" "amis_yaml_http" { + url = var.amis_url +} + +data "aws_region" "current" {} +locals { + region = data.aws_region.current.name +} + +// --- Version & License --- +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} +variable "version_license" { + type = string + description = "Version and license" +} + diff --git a/terraform/aws/modules/cloudwatch-policy/main.tf b/terraform/aws/modules/cloudwatch-policy/main.tf new file mode 100755 index 00000000..3d191a01 --- /dev/null +++ b/terraform/aws/modules/cloudwatch-policy/main.tf @@ -0,0 +1,18 @@ +data "aws_iam_policy_document" "policy_document" { + version = "2012-10-17" + statement { + actions = ["cloudwatch:PutMetricData"] + effect = "Allow" + resources = ["*"] + } +} + +resource "aws_iam_policy" "policy" { + name_prefix = format("%s-iam_policy", var.tag_name) + policy = data.aws_iam_policy_document.policy_document.json +} + +resource "aws_iam_role_policy_attachment" "attachment" { + role = var.role + policy_arn = aws_iam_policy.policy.arn +} \ No newline at end of file diff --git a/terraform/aws/modules/cloudwatch-policy/variables.tf b/terraform/aws/modules/cloudwatch-policy/variables.tf new file mode 100755 index 00000000..2d3f9452 --- /dev/null +++ b/terraform/aws/modules/cloudwatch-policy/variables.tf @@ -0,0 +1,9 @@ +variable "tag_name" { + type = string + description = "(Optional) IAM policy name prefix" + default = "cloudwatch" +} +variable "role" { + type = string + description = "A IAM role to attach the cloudwatch policy to it" +} \ No newline at end of file diff --git a/terraform/aws/modules/cluster-iam-role/main.tf b/terraform/aws/modules/cluster-iam-role/main.tf new file mode 100755 index 00000000..b56eacd6 --- /dev/null +++ b/terraform/aws/modules/cluster-iam-role/main.tf @@ -0,0 +1,38 @@ +resource "aws_iam_role" "cluster_iam_role" { + assume_role_policy = data.aws_iam_policy_document.cluster_role_assume_policy_document.json + path = "/" +} + +data "aws_iam_policy_document" "cluster_role_assume_policy_document" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + } +} + +data "aws_iam_policy_document" "cluster_role_policy_doc" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = [ + "ec2:AssignPrivateIpAddresses", + "ec2:AssociateAddress", + "ec2:CreateRoute", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeRouteTables", + "ec2:ReplaceRoute"] + resources = ["*"] + } +} +resource "aws_iam_policy" "cluster_role_policy" { + policy = data.aws_iam_policy_document.cluster_role_policy_doc.json +} +resource "aws_iam_role_policy_attachment" "attach_policy" { + policy_arn = aws_iam_policy.cluster_role_policy.arn + role = aws_iam_role.cluster_iam_role.id +} \ No newline at end of file diff --git a/terraform/aws/modules/cluster-iam-role/output.tf b/terraform/aws/modules/cluster-iam-role/output.tf new file mode 100755 index 00000000..7bbf0351 --- /dev/null +++ b/terraform/aws/modules/cluster-iam-role/output.tf @@ -0,0 +1,9 @@ +output "cluster_iam_role" { + value = aws_iam_role.cluster_iam_role +} +output "cluster_iam_role_arn" { + value = aws_iam_role.cluster_iam_role.arn +} +output "cluster_iam_role_name" { + value = aws_iam_role.cluster_iam_role.name +} \ No newline at end of file diff --git a/terraform/aws/modules/common/elastic_ip/locals.tf b/terraform/aws/modules/common/elastic_ip/locals.tf new file mode 100755 index 00000000..c4af5bca --- /dev/null +++ b/terraform/aws/modules/common/elastic_ip/locals.tf @@ -0,0 +1,3 @@ +locals { + allocate_and_associate_eip_condition = var.allocate_and_associate_eip == true ? 1 : 0 +} \ No newline at end of file diff --git a/terraform/aws/modules/common/elastic_ip/main.tf b/terraform/aws/modules/common/elastic_ip/main.tf new file mode 100755 index 00000000..879748a9 --- /dev/null +++ b/terraform/aws/modules/common/elastic_ip/main.tf @@ -0,0 +1,10 @@ +resource "aws_eip" "gateway_eip" { + count = local.allocate_and_associate_eip_condition + network_interface = var.external_eni_id +} +resource "aws_eip_association" "address_assoc" { + count = local.allocate_and_associate_eip_condition + allocation_id = aws_eip.gateway_eip[count.index].id + network_interface_id = var.external_eni_id + private_ip_address = var.private_ip_address +} \ No newline at end of file diff --git a/terraform/aws/modules/common/elastic_ip/output.tf b/terraform/aws/modules/common/elastic_ip/output.tf new file mode 100755 index 00000000..31857b83 --- /dev/null +++ b/terraform/aws/modules/common/elastic_ip/output.tf @@ -0,0 +1,9 @@ +output "gateway_eip_id" { + value = aws_eip.gateway_eip.*.id +} +output "gateway_eip_public_ip" { + value = aws_eip.gateway_eip.*.public_ip +} +output "gateway_eip_attached_instance" { + value = aws_eip.gateway_eip.*.instance +} diff --git a/terraform/aws/modules/common/elastic_ip/variables.tf b/terraform/aws/modules/common/elastic_ip/variables.tf new file mode 100755 index 00000000..c6881436 --- /dev/null +++ b/terraform/aws/modules/common/elastic_ip/variables.tf @@ -0,0 +1,13 @@ +variable "allocate_and_associate_eip" { + type = bool + description = "If set to TRUE, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "external_eni_id" { + type = string + description = "The external-eni of the security gateway" +} +variable "private_ip_address" { + type = string + description = "The primary or secondary private IP address to associate with the Elastic IP address. " +} diff --git a/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml b/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml new file mode 100755 index 00000000..05538232 --- /dev/null +++ b/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenKey}\"" installationType=\"gateway\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"gateway\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/modules/common/gateway_instance/locals.tf b/terraform/aws/modules/common/gateway_instance/locals.tf new file mode 100755 index 00000000..a0d9034d --- /dev/null +++ b/terraform/aws/modules/common/gateway_instance/locals.tf @@ -0,0 +1,39 @@ +locals { + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.control_gateway_over_public_or_private_address) + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [lambda_scheduled_interval] must be a valid hostname label or an empty string" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + + volume_encryption_condition = var.volume_encryption != "" ? true : false + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + gateway_SICkey_base64 = base64encode(var.gateway_SICKey) + gateway_password_hash_base64 = base64encode(var.gateway_password_hash) + gateway_maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) +} \ No newline at end of file diff --git a/terraform/aws/modules/common/gateway_instance/main.tf b/terraform/aws/modules/common/gateway_instance/main.tf new file mode 100755 index 00000000..38382cc2 --- /dev/null +++ b/terraform/aws/modules/common/gateway_instance/main.tf @@ -0,0 +1,63 @@ +resource "aws_launch_template" "gateway_launch_template" { + key_name = var.key_name + image_id = var.ami_id + instance_type = var.gateway_instance_type + description = "Initial launch template version" + + iam_instance_profile { + name = var.iam_instance_profile_id + } + + network_interfaces { + network_interface_id = var.external_eni_id + device_index = 0 + } + + network_interfaces { + network_interface_id = var.internal_eni_id + device_index = 1 + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } +} + +resource "aws_instance" "gateway_instance" { + launch_template { + id = aws_launch_template.gateway_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = var.gateway_name + x-chkp-tags = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.control_gateway_over_public_or_private_address) + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition ? true : false + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + user_data = templatefile("${path.module}/gateway_userdata.yaml", { + // script's arguments + PasswordHash = local.gateway_password_hash_base64, + MaintenanceModePassword = local.gateway_maintenance_mode_password_hash_base64, + Shell = var.admin_shell, + SICKey = local.gateway_SICkey_base64, + TokenKey = var.gateway_TokenKey, + GatewayBootstrapScript = local.gateway_bootstrap_script64, + Hostname = var.gateway_hostname, + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + EnableInstanceConnect = var.enable_instance_connect, + OsVersion = local.version_split + }) +} diff --git a/terraform/aws/modules/common/gateway_instance/output.tf b/terraform/aws/modules/common/gateway_instance/output.tf new file mode 100755 index 00000000..0c5f6d02 --- /dev/null +++ b/terraform/aws/modules/common/gateway_instance/output.tf @@ -0,0 +1,9 @@ +output "gateway_instance_id" { + value = aws_instance.gateway_instance.id +} +output "gateway_instance_arn" { + value = aws_instance.gateway_instance.arn +} +output "gateway_instance_name" { + value = aws_instance.gateway_instance.tags["Name"] +} diff --git a/terraform/aws/modules/common/gateway_instance/variables.tf b/terraform/aws/modules/common/gateway_instance/variables.tf new file mode 100755 index 00000000..0e1a010c --- /dev/null +++ b/terraform/aws/modules/common/gateway_instance/variables.tf @@ -0,0 +1,147 @@ +variable "external_eni_id" { + type = string + description = "The external-eni of the security gateway" +} +variable "internal_eni_id" { + type = string + description = "The internal-eni of the security gateway" +} +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway-tf" +} +variable "management_server" { + type = string + description = "(Optional) The name that represents the Security Management Server in the automatic provisioning configuration" + default = "" +} +variable "configuration_template" { + type = string + description = "(Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration" + default = "" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters." + } +} +variable "control_gateway_over_public_or_private_address" { + type = string + description = "Determines if the Security Gateway is provisioned using its private or public address" + default = "private" +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')." + default = "alias/aws/ebs" +} +variable "gateway_version" { + type = string + description = "Gateway version & license" + default = "R81.20-BYOL" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instance." + default = {} +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "ami_id" { + type = string + description = "The AMI to use for the instance" +} +variable "iam_instance_profile_id" { + type = string + description = "The IAM instance profile id" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_TokenKey" { + type = string + description = "Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud." +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional)" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "primary_ntp" { + type = string + description = "(Optional)" + default = "" +} +variable "secondary_ntp" { + type = string + description = "(Optional)" + default = "" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} \ No newline at end of file diff --git a/terraform/aws/modules/common/instance_type/main.tf b/terraform/aws/modules/common/instance_type/main.tf new file mode 100755 index 00000000..22fffe49 --- /dev/null +++ b/terraform/aws/modules/common/instance_type/main.tf @@ -0,0 +1,353 @@ +locals { + gw_types = [ + "c4.large", + "c4.xlarge", + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.12xlarge", + "c5.18xlarge", + "c5.24xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "c5d.large", + "c5d.xlarge", + "c5d.2xlarge", + "c5d.4xlarge", + "c5d.9xlarge", + "c5d.12xlarge", + "c5d.18xlarge", + "c5d.24xlarge", + "m5.large", + "m5.xlarge", + "m5.2xlarge", + "m5.4xlarge", + "m5.8xlarge", + "m5.12xlarge", + "m5.16xlarge", + "m5.24xlarge", + "m6i.large", + "m6i.xlarge", + "m6i.2xlarge", + "m6i.4xlarge", + "m6i.8xlarge", + "m6i.12xlarge", + "m6i.16xlarge", + "m6i.24xlarge", + "m6i.32xlarge", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6in.large", + "c6in.xlarge", + "c6in.2xlarge", + "c6in.4xlarge", + "c6in.8xlarge", + "c6in.12xlarge", + "c6in.16xlarge", + "c6in.24xlarge", + "c6in.32xlarge", + "r5.large", + "r5.xlarge", + "r5.2xlarge", + "r5.4xlarge", + "r5.8xlarge", + "r5.12xlarge", + "r5.16xlarge", + "r5.24xlarge", + "r5a.large", + "r5a.xlarge", + "r5a.2xlarge", + "r5a.4xlarge", + "r5a.8xlarge", + "r5a.12xlarge", + "r5a.16xlarge", + "r5a.24xlarge", + "r5b.large", + "r5b.xlarge", + "r5b.2xlarge", + "r5b.4xlarge", + "r5b.8xlarge", + "r5b.12xlarge", + "r5b.16xlarge", + "r5b.24xlarge", + "r5n.large", + "r5n.xlarge", + "r5n.2xlarge", + "r5n.4xlarge", + "r5n.8xlarge", + "r5n.12xlarge", + "r5n.16xlarge", + "r5n.24xlarge", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge" + ] + mgmt_types = [ + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.12xlarge", + "c5.18xlarge", + "c5.24xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "c5d.large", + "c5d.xlarge", + "c5d.2xlarge", + "c5d.4xlarge", + "c5d.9xlarge", + "c5d.12xlarge", + "c5d.18xlarge", + "c5d.24xlarge", + "m5.large", + "m5.xlarge", + "m5.2xlarge", + "m5.4xlarge", + "m5.8xlarge", + "m5.12xlarge", + "m5.16xlarge", + "m5.24xlarge", + "m6i.large", + "m6i.xlarge", + "m6i.2xlarge", + "m6i.4xlarge", + "m6i.8xlarge", + "m6i.12xlarge", + "m6i.16xlarge", + "m6i.24xlarge", + "m6i.32xlarge", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6in.large", + "c6in.xlarge", + "c6in.2xlarge", + "c6in.4xlarge", + "c6in.8xlarge", + "c6in.12xlarge", + "c6in.16xlarge", + "c6in.24xlarge", + "c6in.32xlarge", + "r5.large", + "r5.xlarge", + "r5.2xlarge", + "r5.4xlarge", + "r5.8xlarge", + "r5.12xlarge", + "r5.16xlarge", + "r5.24xlarge", + "r5a.large", + "r5a.xlarge", + "r5a.2xlarge", + "r5a.4xlarge", + "r5a.8xlarge", + "r5a.12xlarge", + "r5a.16xlarge", + "r5a.24xlarge", + "r5b.large", + "r5b.xlarge", + "r5b.2xlarge", + "r5b.4xlarge", + "r5b.8xlarge", + "r5b.12xlarge", + "r5b.16xlarge", + "r5b.24xlarge", + "r5n.large", + "r5n.xlarge", + "r5n.2xlarge", + "r5n.4xlarge", + "r5n.8xlarge", + "r5n.12xlarge", + "r5n.16xlarge", + "r5n.24xlarge", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge" + ] + mds_types = [ + "c5.large", + "c5.xlarge", + "c5.2xlarge", + "c5.4xlarge", + "c5.9xlarge", + "c5.12xlarge", + "c5.18xlarge", + "c5.24xlarge", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "c5d.large", + "c5d.xlarge", + "c5d.2xlarge", + "c5d.4xlarge", + "c5d.9xlarge", + "c5d.12xlarge", + "c5d.18xlarge", + "c5d.24xlarge", + "m5.large", + "m5.xlarge", + "m5.2xlarge", + "m5.4xlarge", + "m5.8xlarge", + "m5.12xlarge", + "m5.16xlarge", + "m5.24xlarge", + "m6i.large", + "m6i.xlarge", + "m6i.2xlarge", + "m6i.4xlarge", + "m6i.8xlarge", + "m6i.12xlarge", + "m6i.16xlarge", + "m6i.24xlarge", + "m6i.32xlarge", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6in.large", + "c6in.xlarge", + "c6in.2xlarge", + "c6in.4xlarge", + "c6in.8xlarge", + "c6in.12xlarge", + "c6in.16xlarge", + "c6in.24xlarge", + "c6in.32xlarge", + "r5.large", + "r5.xlarge", + "r5.2xlarge", + "r5.4xlarge", + "r5.8xlarge", + "r5.12xlarge", + "r5.16xlarge", + "r5.24xlarge", + "r5a.large", + "r5a.xlarge", + "r5a.2xlarge", + "r5a.4xlarge", + "r5a.8xlarge", + "r5a.12xlarge", + "r5a.16xlarge", + "r5a.24xlarge", + "r5b.large", + "r5b.xlarge", + "r5b.2xlarge", + "r5b.4xlarge", + "r5b.8xlarge", + "r5b.12xlarge", + "r5b.16xlarge", + "r5b.24xlarge", + "r5n.large", + "r5n.xlarge", + "r5n.2xlarge", + "r5n.4xlarge", + "r5n.8xlarge", + "r5n.12xlarge", + "r5n.16xlarge", + "r5n.24xlarge", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge" + ] + server_types = [ + "t3.nano", + "t3.micro", + "t3.small", + "t3.medium", + "t3.large", + "t3.xlarge", + "t3.2xlarge" + ] +} + +locals { + gw_values = var.chkp_type == "gateway" ? local.gw_types : [] + mgmt_values = var.chkp_type == "management" ? local.mgmt_types : [] + mds_values = var.chkp_type == "mds" ? local.mds_types : [] + server_values = var.chkp_type == "server" ? local.server_types : [] + sa_values = var.chkp_type == "standalone" ? concat(local.gw_types, local.mgmt_types) : [] + allowed_values = coalescelist(local.gw_values, local.mgmt_values, local.mds_values, local.sa_values , local.server_types) + is_allowed_type = index(local.allowed_values, var.instance_type) +} \ No newline at end of file diff --git a/terraform/aws/modules/common/instance_type/variables.tf b/terraform/aws/modules/common/instance_type/variables.tf new file mode 100755 index 00000000..1711c3f7 --- /dev/null +++ b/terraform/aws/modules/common/instance_type/variables.tf @@ -0,0 +1,22 @@ +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} +locals { + type_allowed_values = [ + "gateway", + "management", + "mds", + "standalone", + "server" + ] + // Will fail if var.chkp_type is invalid + validate_instance_type = index(local.type_allowed_values, var.chkp_type) +} + +variable "instance_type" { + type = string + description = "AWS Instance type" +} + diff --git a/terraform/aws/modules/common/internal_default_route/locals.tf b/terraform/aws/modules/common/internal_default_route/locals.tf new file mode 100755 index 00000000..493c4d9a --- /dev/null +++ b/terraform/aws/modules/common/internal_default_route/locals.tf @@ -0,0 +1,3 @@ +locals { + internal_route_table_condition = var.private_route_table != "" ? 1 : 0 +} \ No newline at end of file diff --git a/terraform/aws/modules/common/internal_default_route/main.tf b/terraform/aws/modules/common/internal_default_route/main.tf new file mode 100755 index 00000000..ddcb5bd8 --- /dev/null +++ b/terraform/aws/modules/common/internal_default_route/main.tf @@ -0,0 +1,6 @@ +resource "aws_route" "internal_default_route" { + count = local.internal_route_table_condition + route_table_id = var.private_route_table + destination_cidr_block = "0.0.0.0/0" + network_interface_id = var.internal_eni_id +} \ No newline at end of file diff --git a/terraform/aws/modules/common/internal_default_route/output.tf b/terraform/aws/modules/common/internal_default_route/output.tf new file mode 100755 index 00000000..fa691b92 --- /dev/null +++ b/terraform/aws/modules/common/internal_default_route/output.tf @@ -0,0 +1,3 @@ +output "internal_default_route_id" { + value = aws_route.internal_default_route.*.id +} \ No newline at end of file diff --git a/terraform/aws/modules/common/internal_default_route/variables.tf b/terraform/aws/modules/common/internal_default_route/variables.tf new file mode 100755 index 00000000..b8e2f458 --- /dev/null +++ b/terraform/aws/modules/common/internal_default_route/variables.tf @@ -0,0 +1,9 @@ +variable "private_route_table" { + type = string + description = "Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567)" + default="" +} +variable "internal_eni_id" { + type = string + description = "The internal-eni of the security gateway" +} \ No newline at end of file diff --git a/terraform/aws/modules/common/load_balancer/main.tf b/terraform/aws/modules/common/load_balancer/main.tf new file mode 100755 index 00000000..18b3b753 --- /dev/null +++ b/terraform/aws/modules/common/load_balancer/main.tf @@ -0,0 +1,36 @@ +resource "random_id" "unique_lb_id" { + keepers = { + prefix = var.prefix_name + } + byte_length = 8 +} +resource "aws_lb" "load_balancer" { + name = substr(format("%s-%s", "${var.prefix_name}-LB", random_id.unique_lb_id.hex), 0, 32) + load_balancer_type = var.load_balancers_type == "gateway" ? "gateway" : var.load_balancers_type == "Network Load Balancer" ? "network": "application" + internal = var.load_balancers_type == "gateway" ? "false" : var.internal + subnets = var.instances_subnets + security_groups = var.security_groups + tags = var.tags + enable_cross_zone_load_balancing = var.cross_zone_load_balancing +} +resource "aws_lb_target_group" "lb_target_group" { + name = substr(format("%s-%s", "${var.prefix_name}-TG", random_id.unique_lb_id.hex), 0, 32) + vpc_id = var.vpc_id + protocol = var.load_balancer_protocol + port = var.target_group_port + health_check { + port = var.load_balancers_type != "gateway" ? var.health_check_port : 8117 + protocol = var.load_balancers_type != "gateway" ? var.health_check_protocol : "TCP" + } +} +resource "aws_lb_listener" "lb_listener" { + depends_on = [aws_lb.load_balancer, aws_lb_target_group.lb_target_group] + load_balancer_arn = aws_lb.load_balancer.arn + certificate_arn = var.certificate_arn + protocol = var.load_balancers_type != "gateway" ? var.load_balancer_protocol : null + port = var.load_balancers_type != "gateway" ? var.listener_port : null + default_action { + type = "forward" + target_group_arn = aws_lb_target_group.lb_target_group.arn + } +} diff --git a/terraform/aws/modules/common/load_balancer/output.tf b/terraform/aws/modules/common/load_balancer/output.tf new file mode 100755 index 00000000..63123606 --- /dev/null +++ b/terraform/aws/modules/common/load_balancer/output.tf @@ -0,0 +1,18 @@ +output "load_balancer_id" { + value = aws_lb.load_balancer.id +} +output "load_balancer_arn" { + value = aws_lb.load_balancer.arn +} +output "load_balancer_url" { + value = aws_lb.load_balancer.dns_name +} +output "target_group_id" { + value = aws_lb_target_group.lb_target_group.id +} +output "target_group_arn" { + value = aws_lb_target_group.lb_target_group.arn +} +output "load_balancer_tags" { + value = aws_lb.load_balancer.tags +} \ No newline at end of file diff --git a/terraform/aws/modules/common/load_balancer/variables.tf b/terraform/aws/modules/common/load_balancer/variables.tf new file mode 100755 index 00000000..7cc6464e --- /dev/null +++ b/terraform/aws/modules/common/load_balancer/variables.tf @@ -0,0 +1,62 @@ +variable "instances_subnets" { + type = list(string) + description = "Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet" +} +variable "prefix_name" { + type = string + description = "Load Balancer and Target Group prefix name" + default = "quickstart" +} +variable "internal" { + type = bool + description = "Select 'true' to create an Internal Load Balancer." + default = false +} +variable "security_groups" { + type = list(string) + description = "A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application" +} +variable "tags" { + type = map(string) + description = "A map of tags to assign to the load balancer." +} +variable "vpc_id" { + type = string +} +variable "load_balancers_type" { + type = string + description = "Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing" + default = "Network Load Balancer" +} +variable "load_balancer_protocol" { + type = string + description = "The protocol to use on the Load Balancer." +} +variable "target_group_port" { + type = number + description = "The port on which targets receive traffic." +} +variable "listener_port" { + type = string + description = "The port on which the load balancer is listening." +} +variable "certificate_arn" { + type = string + description = "The ARN of the default server certificate. Exactly one certificate is required if the protocol is HTTPS or TLS. " + default = "" +} +variable "cross_zone_load_balancing"{ + type = bool + default = false + description = "Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges." +} +variable "health_check_port" { + description = "The health check port" + type = number + default = null +} +variable "health_check_protocol" { + description = "The health check protocol" + type = string + default = null +} diff --git a/terraform/aws/modules/common/permissive_sg/main.tf b/terraform/aws/modules/common/permissive_sg/main.tf new file mode 100755 index 00000000..265f3c56 --- /dev/null +++ b/terraform/aws/modules/common/permissive_sg/main.tf @@ -0,0 +1,20 @@ +resource "aws_security_group" "permissive_sg" { + description = "Permissive security group" + vpc_id = var.vpc_id + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + name_prefix = format("%s-PermissiveSecurityGroup", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) // Group name + tags = { + Name = format("%s-PermissiveSecurityGroup", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) // Resource name + } +} \ No newline at end of file diff --git a/terraform/aws/modules/common/permissive_sg/output.tf b/terraform/aws/modules/common/permissive_sg/output.tf new file mode 100755 index 00000000..83541c15 --- /dev/null +++ b/terraform/aws/modules/common/permissive_sg/output.tf @@ -0,0 +1,9 @@ +output "permissive_sg_id" { + value = aws_security_group.permissive_sg.id +} +output "permissive_sg_name" { + value = aws_security_group.permissive_sg.name +} +output "permissive_sg_arn" { + value = aws_security_group.permissive_sg.arn +} \ No newline at end of file diff --git a/terraform/aws/modules/common/permissive_sg/variables.tf b/terraform/aws/modules/common/permissive_sg/variables.tf new file mode 100755 index 00000000..d2afaad2 --- /dev/null +++ b/terraform/aws/modules/common/permissive_sg/variables.tf @@ -0,0 +1,13 @@ +variable "vpc_id" { + type = string +} +variable "resources_tag_name" { + type = string + description = "(Optional)" + default = "" +} +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway-tf" +} \ No newline at end of file diff --git a/terraform/aws/modules/common/version_license/main.tf b/terraform/aws/modules/common/version_license/main.tf new file mode 100755 index 00000000..43512f98 --- /dev/null +++ b/terraform/aws/modules/common/version_license/main.tf @@ -0,0 +1,60 @@ +locals { + gw_versions = [ + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX", + "R81-BYOL", + "R81-PAYG-NGTP", + "R81-PAYG-NGTX", + "R81.10-BYOL", + "R81.10-PAYG-NGTP", + "R81.10-PAYG-NGTX", + "R81.20-BYOL", + "R81.20-PAYG-NGTP", + "R81.20-PAYG-NGTX" + ] + mgmt_versions = [ + "R80.40-BYOL", + "R80.40-PAYG", + "R81-BYOL", + "R81-PAYG", + "R81.10-BYOL", + "R81.10-PAYG", + "R81.20-BYOL", + "R81.20-PAYG" + ] + mds_versions = [ + "R80.40-BYOL", + "R81-BYOL", + "R81.10-BYOL", + "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 = [ + "R80.40-BYOL", + "R80.40-PAYG-NGTP", + "R80.40-PAYG-NGTX", + "R81.20-BYOL", + "R81.20-PAYG-NGTP", + "R81.20-PAYG-NGTX" + ] +} + +locals { + gw_values = var.chkp_type == "gateway" ? local.gw_versions : [] + mgmt_values = var.chkp_type == "management" ? local.mgmt_versions : [] + mds_values = var.chkp_type == "mds" ? local.mds_versions : [] + standalone_values = var.chkp_type == "standalone" ? local.standalone_versions : [] + gwlb_gw_values = var.chkp_type == "gwlb_gw" ? local.gwlb_gw_versions : [] + allowed_values = coalescelist(local.gw_values, local.mgmt_values, local.standalone_values, local.mds_values, local.gwlb_gw_values) + is_allowed_type = index(local.allowed_values, var.version_license) +} diff --git a/terraform/aws/modules/common/version_license/variables.tf b/terraform/aws/modules/common/version_license/variables.tf new file mode 100755 index 00000000..9467e232 --- /dev/null +++ b/terraform/aws/modules/common/version_license/variables.tf @@ -0,0 +1,21 @@ +variable "chkp_type" { + type = string + description = "The Check Point machine type" + default = "gateway" +} +locals { + type_allowed_values = [ + "gateway", + "management", + "mds", + "standalone", + "gwlb_gw"] + // Will fail if var.chkp_type is invalid + validate_chkp_type = index(local.type_allowed_values, var.chkp_type) +} + +variable "version_license" { + type = string + description = "AWS Version license" +} + diff --git a/terraform/aws/modules/custom-autoscale/locals.tf b/terraform/aws/modules/custom-autoscale/locals.tf new file mode 100755 index 00000000..1a9b6900 --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/locals.tf @@ -0,0 +1,9 @@ +locals { + asg_name = format("%s%s-servers", var.prefix != "" ? format("%s-", var.prefix) : "", var.asg_name) + + regex_valid_server_ami = "^(ami-(([0-9a-f]{8})|([0-9a-f]{17})))?$" + // Will fail if var.server_ami is invalid + regex_server_ami = regex(local.regex_valid_server_ami, var.server_ami) == var.server_ami ? 0 : "Amazon Machine Image ID must be in the form ami-xxxxxxxx or ami-xxxxxxxxxxxxxxxxx" + + provided_target_groups_condition = var.servers_target_groups != "" ? true : false +} \ No newline at end of file diff --git a/terraform/aws/modules/custom-autoscale/main.tf b/terraform/aws/modules/custom-autoscale/main.tf new file mode 100755 index 00000000..e7d3decd --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/main.tf @@ -0,0 +1,94 @@ +resource "aws_security_group" "servers_security_group" { + count = var.deploy_internal_security_group ? 1 : 0 + name_prefix = format("%s_ServersSecurityGroup", local.asg_name) + description = "Servers security group" + vpc_id = var.vpc_id + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = format("%s_ServersSecurityGroup", local.asg_name) + } +} + + +resource "aws_launch_template" "servers_launch_template" { + name_prefix = local.asg_name + network_interfaces { + associate_public_ip_address = var.allocate_public_address + security_groups = var.deploy_internal_security_group ? [aws_security_group.servers_security_group[0].id] : [var.source_security_group] + } + key_name = var.key_name + image_id = var.server_ami + description = "Initial template version" + monitoring { + enabled = true + } + instance_type = var.servers_instance_type +} +resource "aws_autoscaling_group" "servers_group" { + name_prefix = local.asg_name + vpc_zone_identifier = var.servers_subnets + launch_template { + name = aws_launch_template.servers_launch_template.name + version = aws_launch_template.servers_launch_template.latest_version + } + min_size = var.servers_min_group_size + max_size = var.servers_max_group_size + target_group_arns = local.provided_target_groups_condition ? [var.servers_target_groups] : [] + + tag { + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.server_name) + propagate_at_launch = true + } +} +resource "aws_autoscaling_policy" "scale_up_policy" { + adjustment_type = "ChangeInCapacity" + autoscaling_group_name = aws_autoscaling_group.servers_group.name + name = "scale_up_policy" + cooldown = 300 + scaling_adjustment = 1 +} +resource "aws_autoscaling_policy" "scale_down_policy" { + adjustment_type = "ChangeInCapacity" + autoscaling_group_name = aws_autoscaling_group.servers_group.name + name = "scale_down_policy" + cooldown = 300 + scaling_adjustment = -1 +} +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_high" { + alarm_description = "Scale-up if CPU > 80% for 10 minutes" + metric_name = "CPUUtilization" + namespace = "AWS/EC2" + statistic = "Average" + period = "300" + evaluation_periods = "2" + threshold = "80" + alarm_actions = [aws_autoscaling_policy.scale_up_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.servers_group.name + } + comparison_operator = "GreaterThanThreshold" + alarm_name = "cpu_alarm_high" +} +resource "aws_cloudwatch_metric_alarm" "cpu_alarm_low" { + alarm_description = "Scale-down if CPU < 60% for 10 minutes" + metric_name = "CPUUtilization" + namespace = "AWS/EC2" + statistic = "Average" + period = "300" + evaluation_periods = "2" + threshold = "60" + alarm_actions = [aws_autoscaling_policy.scale_down_policy.arn] + dimensions = { + AutoScalingGroupName = aws_autoscaling_group.servers_group.name + } + comparison_operator = "LessThanThreshold" + alarm_name = "cpu_alarm_low" +} \ No newline at end of file diff --git a/terraform/aws/modules/custom-autoscale/variables.tf b/terraform/aws/modules/custom-autoscale/variables.tf new file mode 100755 index 00000000..a99cb9a5 --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/variables.tf @@ -0,0 +1,89 @@ +// Module: Auto Scaling group of workload servers + +// --- Environment --- +variable "prefix" { + type = string + description = "(Optional) Instances name prefix" + default = "" +} +variable "asg_name" { + type = string + description = "Autoscaling Group name" + default = "Check-Point-ASG-tf" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string + description = "Select an existing VPC" +} +variable "servers_subnets" { + type = list(string) + description = "Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-0d72417c,subnet-1f61306f,subnet-1061d06f)" +} + +// --- EC2 Instances Configuration --- +variable "server_ami" { + type = string + description = "The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63)" +} +variable "server_name" { + type = string + description = "AMI of the servers" + default = "Server-tf" +} +variable "servers_instance_type" { + type = string + description = "The EC2 instance type for the web servers" + default = "t3.micro" +} +module "validate_servers_instance_type" { + source = "../common/instance_type" + + chkp_type = "server" + instance_type = var.servers_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "allocate_public_address" { + type = bool + description = "Allocate an elastic IP for each server" + default = false +} + +// --- Auto Scaling Configuration --- +variable "servers_min_group_size" { + type = number + description = "The minimal number of servers in the Auto Scaling group" + default = 2 +} +resource "null_resource" "servers_min_group_size_too_small" { + // servers_min_group_size validation - resource will not be created if the size is smaller than 1 + count = var.servers_min_group_size >= 1 ? 0 : "servers_min_group_size must be at least 1" +} +variable "servers_max_group_size" { + type = number + description = "The maximal number of servers in the Auto Scaling group" + default = 10 +} +resource "null_resource" "servers_max_group_size_too_small" { + // servers_max_group_size validation - resource will not be created if the size is smaller than 1 + count = var.servers_max_group_size >= 1 ? 0 : "servers_max_group_size must be at least 1" +} +variable "servers_target_groups" { + type = string + description = "(Optional) An optional list of Target Groups to associate with the Auto Scaling group (comma separated list of ARNs, without spaces)" + default = "" +} +variable "deploy_internal_security_group" { + type = bool + description = "Select 'false' to use an existing Security group" + default = true +} +variable "source_security_group" { + type = string + description = "The ID of Security Group from which access will be allowed to the instances in this Auto Scaling group" + default = "" +} \ No newline at end of file diff --git a/terraform/aws/modules/custom-autoscale/vpc/main.tf b/terraform/aws/modules/custom-autoscale/vpc/main.tf new file mode 100644 index 00000000..8f1bfd5c --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/vpc/main.tf @@ -0,0 +1,52 @@ +// --- VPC --- +resource "aws_vpc" "vpc" { + cidr_block = var.vpc_cidr +} + +// --- Internet Gateway --- +resource "aws_internet_gateway" "igw" { + vpc_id = aws_vpc.vpc.id +} + +// --- Public Subnets --- +resource "aws_subnet" "public_subnets" { + for_each = var.public_subnets_map + + vpc_id = aws_vpc.vpc.id + availability_zone = each.key + cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, var.subnets_bit_length, each.value) + map_public_ip_on_launch = true + tags = { + Name = format("Public subnet %s", each.value) + } +} + +// --- Private Subnets --- +resource "aws_subnet" "private_subnets" { + for_each = var.private_subnets_map + + vpc_id = aws_vpc.vpc.id + availability_zone = each.key + cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, var.subnets_bit_length, each.value) + tags = { + Name = format("Private subnet %s", each.value) + } +} + +// --- Routes --- +resource "aws_route_table" "public_subnet_rtb" { + vpc_id = aws_vpc.vpc.id + tags = { + Name = "Public Subnets Route Table" + } +} +resource "aws_route" "vpc_internet_access" { + route_table_id = aws_route_table.public_subnet_rtb.id + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.igw.id +} +resource "aws_route_table_association" "public_rtb_to_public_subnets" { + for_each = { for public_subnet in aws_subnet.public_subnets : public_subnet.cidr_block => public_subnet.id } + route_table_id = aws_route_table.public_subnet_rtb.id + subnet_id = each.value +} diff --git a/terraform/aws/modules/custom-autoscale/vpc/output.tf b/terraform/aws/modules/custom-autoscale/vpc/output.tf new file mode 100644 index 00000000..a9179921 --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/vpc/output.tf @@ -0,0 +1,12 @@ +output "vpc_id" { + value = aws_vpc.vpc.id +} +output "public_subnets_ids_list" { + value = [for public_subnet in aws_subnet.public_subnets : public_subnet.id ] +} +output "private_subnets_ids_list" { + value = [for private_subnet in aws_subnet.private_subnets : private_subnet.id] +} +output "public_rtb" { + value = aws_route_table.public_subnet_rtb.id +} diff --git a/terraform/aws/modules/custom-autoscale/vpc/variables.tf b/terraform/aws/modules/custom-autoscale/vpc/variables.tf new file mode 100644 index 00000000..e7ffb2ea --- /dev/null +++ b/terraform/aws/modules/custom-autoscale/vpc/variables.tf @@ -0,0 +1,17 @@ +variable "vpc_cidr" { + type = string +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20." +} + diff --git a/terraform/aws/modules/vpc/main.tf b/terraform/aws/modules/vpc/main.tf new file mode 100755 index 00000000..b4b223b8 --- /dev/null +++ b/terraform/aws/modules/vpc/main.tf @@ -0,0 +1,66 @@ +// --- VPC --- +resource "aws_vpc" "vpc" { + cidr_block = var.vpc_cidr +} + +// --- Internet Gateway --- +resource "aws_internet_gateway" "igw" { + vpc_id = aws_vpc.vpc.id +} + +// --- Public Subnets --- +resource "aws_subnet" "public_subnets" { + for_each = var.public_subnets_map + + vpc_id = aws_vpc.vpc.id + availability_zone = each.key + cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, var.subnets_bit_length, each.value) + map_public_ip_on_launch = true + tags = { + Name = format("Public subnet %s", each.value) + } +} + +// --- Private Subnets --- +resource "aws_subnet" "private_subnets" { + for_each = var.private_subnets_map + + vpc_id = aws_vpc.vpc.id + availability_zone = each.key + cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, var.subnets_bit_length, each.value) + tags = { + Name = format("Private subnet %s", each.value) + } +} + +// --- tgw Subnets --- +resource "aws_subnet" "tgw_subnets" { + for_each = var.tgw_subnets_map + + vpc_id = aws_vpc.vpc.id + availability_zone = each.key + cidr_block = cidrsubnet(aws_vpc.vpc.cidr_block, var.subnets_bit_length, each.value) + tags = { + Name = format("tgw subnet %s", each.value) + } +} + + +// --- Routes --- +resource "aws_route_table" "public_subnet_rtb" { + vpc_id = aws_vpc.vpc.id + tags = { + Name = "Public Subnets Route Table" + } +} +resource "aws_route" "vpc_internet_access" { + route_table_id = aws_route_table.public_subnet_rtb.id + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.igw.id +} +resource "aws_route_table_association" "public_rtb_to_public_subnets" { + for_each = { for public_subnet in aws_subnet.public_subnets : public_subnet.cidr_block => public_subnet.id } + route_table_id = aws_route_table.public_subnet_rtb.id + subnet_id = each.value +} + diff --git a/terraform/aws/modules/vpc/output.tf b/terraform/aws/modules/vpc/output.tf new file mode 100755 index 00000000..fc4173c9 --- /dev/null +++ b/terraform/aws/modules/vpc/output.tf @@ -0,0 +1,18 @@ +output "vpc_id" { + value = aws_vpc.vpc.id +} +output "public_subnets_ids_list" { + value = [for public_subnet in aws_subnet.public_subnets : public_subnet.id ] +} +output "private_subnets_ids_list" { + value = [for private_subnet in aws_subnet.private_subnets : private_subnet.id] +} +output "tgw_subnets_ids_list" { + value = [for tgw_subnet in aws_subnet.tgw_subnets : tgw_subnet.id] +} +output "public_rtb" { + value = aws_route_table.public_subnet_rtb.id +} +output "aws_igw" { + value = aws_internet_gateway.igw.id +} diff --git a/terraform/aws/modules/vpc/variables.tf b/terraform/aws/modules/vpc/variables.tf new file mode 100755 index 00000000..2623f9d0 --- /dev/null +++ b/terraform/aws/modules/vpc/variables.tf @@ -0,0 +1,22 @@ +variable "vpc_cidr" { + type = string +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "tgw_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + default = {} +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20." +} + diff --git a/terraform/aws/qs-autoscale-master/README.md b/terraform/aws/qs-autoscale-master/README.md new file mode 100755 index 00000000..809de14a --- /dev/null +++ b/terraform/aws/qs-autoscale-master/README.md @@ -0,0 +1,258 @@ +# Check Point CloudGuard Network Quick Start Auto Scaling Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway Auto Scaling Group, an external ALB/NLB, and optionally a Security Management Server and a web server Auto Scaling Group in a new VPC. + +These types of Terraform resources are supported: +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Subnet](https://www.terraform.io/docs/providers/aws/r/subnet.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Load Balancer](https://www.terraform.io/docs/providers/aws/r/lb.html) +* [Load Balancer Target Group](https://www.terraform.io/docs/providers/aws/r/lb_target_group.html) +* [Launch template](https://www.terraform.io/docs/providers/aws/r/launch_template.html) +* [Auto Scaling Group](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html) +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Check Point CloudGuard Auto Scaling on AWS](https://aws.amazon.com/quickstart/architecture/check-point-cloudguard/) for additional information + +This solution uses the following modules: +- /terraform/aws/qs-autoscale +- /terraform/aws/autoscale +- /terraform/aws/management +- /terraform/aws/cme-iam-role +- /terraform/aws/modules/vpc + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/qs-autoscale, /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/qs-autoscale, /terraform/aws/autoscale and /terraform/aws/management: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/qs-autoscale-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/qs-autoscale-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Environment --- + prefix = "TF" + asg_name = "asg-qs" + + // --- Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + } + private_subnets_map = { + "us-east-1a" = 3 + "us-east-1b" = 4 + } + subnets_bit_length = 8 + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + provision_tag = "quickstart" + load_balancers_type = "Network Load Balancer" + LB_protocol = "TCP" + certificate = "arn:aws:iam::12345678:server-certificate/certificate" + service_port = "80" + admin_shell = "/etc/cli.sh" + + // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- + gateway_instance_type = "c5.xlarge" + gateways_min_group_size = 2 + gateways_max_group_size = 8 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_cloudwatch = false + + // --- Check Point CloudGuard Network Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateways_blades = true + admin_cidr = "0.0.0.0/0" + gateways_addresses = "0.0.0.0/0" + + // --- Web Servers Auto Scaling Group Configuration --- + servers_deploy = true + servers_instance_type = "t3.micro" + server_ami = "ami-12345abc" + ``` + +- Conditional creation + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` + - To deploy web servers: + ``` + servers_deploy = true + ``` + - To create an ASG configuration without a proxy ELB: + ``` + proxy_elb_type= "none" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs + +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| provision_tag | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | quickstart | no | +| load_balancers_type | Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing | string | - Network Load Balancer
- Application Load Balancer
| Network Load Balancer | no | +| load_balancer_protocol | The protocol to use on the Load Balancer | string | Network Load Balancer:
- TCP
- TLS
- UDP
- TCP_UDP

Application Load Balancer:
- HTTP
- HTTPS | TCP | yes | +| certificate | Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP | string | n/a | n/a | no | +| service_port | The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS | string | n/a | n/a | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | list(string) | n/a | n/a | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| servers_deploy | Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored | bool | true/false | false | no | +| servers_subnets | Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-0d72417c,subnet-1f61306f,subnet-1061d06f). | list(string) | n/a | n/a | yes | +| servers_instance_type | The EC2 instance type for the web servers | string | - t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge | t3.micro | no | +| server_ami | The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63) | string | n/a | n/a | yes | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + + +## Outputs +| Name | Description | +|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| public_subnets_ids_list | A list of the public subnets ids | +| private_subnets_ids_list | A list of the private subnets ids | +| public_rout_table | The public route table id | +| internal_port | The internal Load Balancer should listen to this port | +| management_name | The deployed Security Management AWS instance name | +| load_balancer_url | The URL of the external Load Balancer | +| external_load_balancer_arn | The external Load Balancer ARN | +| internal_load_balancer_arn | The internal Load Balancer ARN | +| external_lb_target_group_arn | The external Load Balancer Target Group ARN | +| internal_lb_target_group_arn | The internal Load Balancer Target Group ARN | +| autoscale_autoscaling_group_name | The name of the deployed AutoScaling Group | +| autoscale_autoscaling_group_arn | The ARN for the deployed AutoScaling Group | +| autoscale_security_group_id | The deployed AutoScaling Group's security group id | +| autoscale_iam_role_name | The deployed AutoScaling Group's IAM role name (if created) | +| configuration_template | The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name | +| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Quick Start Auto Scaling Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20231127 | Add support for parameter admin shell | +| 20240425 | Remove support for R81 and lower versions | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/qs-autoscale-master/locals.tf b/terraform/aws/qs-autoscale-master/locals.tf new file mode 100755 index 00000000..e23f58a2 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/locals.tf @@ -0,0 +1,63 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + regex_valid_provision_tag = "^[a-zA-Z0-9-]{1,12}$" + // Will fail if var.provision_tag is invalid + regex_provision_tag = regex(local.regex_valid_provision_tag, var.provision_tag) == var.provision_tag ? 0 : "Variable [provision_tag] must be up to 12 alphanumeric characters and unique for each Quick Start deployment" + + load_balancers_type_allowed_values = [ + "Network Load Balancer", + "Application Load Balancer"] + // Will fail if var.load_balancers_type is invalid + validate_load_balancers_type = index(local.load_balancers_type_allowed_values, var.load_balancers_type) + + lb_protocol_allowed_values = var.load_balancers_type == "Network Load Balancer" ? [ + "TCP", + "TLS", + "UDP", + "TCP_UDP"] : [ + "HTTP", + "HTTPS"] + // Will fail if var.load_balancer_protocol is invalid + validate_lb_protocol = index(local.lb_protocol_allowed_values, var.load_balancer_protocol) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_certificate = "^(arn:aws:[a-z]+::[0-9]{12}:server-certificate/[a-zA-Z0-9-]*)?$" + // Will fail if var.certificate is invalid + regex_certificate = regex(local.regex_valid_certificate, var.certificate) == var.certificate ? 0 : "Variable [certificate] must be a valid Amazon Resource Name (ARN), for example: arn:aws:iam::123456789012:server-certificate/web-server-certificate" + + regex_valid_service_port = "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?$" + // Will fail if var.service_port is invalid + regex_service_port = regex(local.regex_valid_service_port, var.service_port) == var.service_port ? 0 : "Custom service port must be a number between 0 and 65535" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash." + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters." + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash." + + regex_valid_admin_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR." + + regex_valid_gateways_addresses = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses." + + + regex_valid_server_ami = "^(ami-(([0-9a-f]{8})|([0-9a-f]{17})))?$" + // Will fail if var.server_ami is invalid + regex_server_ami = regex(local.regex_valid_server_ami, var.server_ami) == var.server_ami ? 0 : "Amazon Machine Image ID must be in the form ami-xxxxxxxx or ami-xxxxxxxxxxxxxxxxx" +} \ No newline at end of file diff --git a/terraform/aws/qs-autoscale-master/main.tf b/terraform/aws/qs-autoscale-master/main.tf new file mode 100755 index 00000000..9c7eada0 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/main.tf @@ -0,0 +1,60 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + subnets_bit_length = var.subnets_bit_length +} + +module "launch_qs_autoscale" { + source = "../qs-autoscale" + providers = { + aws = aws + } + + region = var.region + prefix = var.prefix + asg_name = var.asg_name + vpc_id = module.launch_vpc.vpc_id + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + allow_upload_download = var.allow_upload_download + provision_tag = var.provision_tag + load_balancers_type = var.load_balancers_type + load_balancer_protocol = var.load_balancer_protocol + certificate = var.certificate + service_port = var.service_port + admin_shell = var.admin_shell + gateways_subnets = module.launch_vpc.public_subnets_ids_list + gateway_instance_type = var.gateway_instance_type + gateways_min_group_size = var.gateways_min_group_size + gateways_max_group_size = var.gateways_max_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + enable_cloudwatch = var.enable_cloudwatch + management_deploy = var.management_deploy + management_instance_type = var.management_instance_type + management_version = var.management_version + management_password_hash = var.gateway_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + gateways_policy = var.gateways_policy + gateways_blades = var.gateways_blades + admin_cidr = var.admin_cidr + gateways_addresses = var.gateways_addresses + servers_deploy= var.servers_deploy + servers_subnets = module.launch_vpc.private_subnets_ids_list + servers_instance_type = var.servers_instance_type + server_ami = var.server_ami +} \ No newline at end of file diff --git a/terraform/aws/qs-autoscale-master/output.tf b/terraform/aws/qs-autoscale-master/output.tf new file mode 100755 index 00000000..1130dfe0 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/output.tf @@ -0,0 +1,58 @@ +output "Deployment" { + value = module.launch_qs_autoscale.Deployment +} + +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "public_subnets_ids_list" { + value = module.launch_vpc.public_subnets_ids_list +} +output "private_subnets_ids_list" { + value = module.launch_vpc.private_subnets_ids_list +} +output "public_rout_table" { + value = module.launch_vpc.public_rtb +} + +output "management_name" { + value = module.launch_qs_autoscale.management_name +} +output "internal_port" { + value = module.launch_qs_autoscale.internal_port +} +output "load_balancer_url" { + value = module.launch_qs_autoscale.load_balancer_url +} +output "external_load_balancer_arn" { + value = module.launch_qs_autoscale.external_load_balancer_arn +} +output "internal_load_balancer_arn" { + value = module.launch_qs_autoscale.internal_load_balancer_arn +} +output "external_lb_target_group_arn" { + value = module.launch_qs_autoscale.external_lb_target_group_arn +} +output "internal_lb_target_group_arn" { + value = module.launch_qs_autoscale.internal_lb_target_group_arn +} + +output "autoscale_autoscaling_group_name" { + value = module.launch_qs_autoscale.autoscale_autoscaling_group_name +} +output "autoscale_autoscaling_group_arn" { + value = module.launch_qs_autoscale.autoscale_autoscaling_group_arn +} +output "autoscale_security_group_id" { + value = module.launch_qs_autoscale.autoscale_security_group_id +} +output "autoscale_iam_role_name" { + value = module.launch_qs_autoscale.autoscale_iam_role_name +} + +output "configuration_template" { + value = module.launch_qs_autoscale.configuration_template +} +output "controller_name" { + value = module.launch_qs_autoscale.controller_name +} diff --git a/terraform/aws/qs-autoscale-master/terraform.tfvars b/terraform/aws/qs-autoscale-master/terraform.tfvars new file mode 100755 index 00000000..37a07774 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/terraform.tfvars @@ -0,0 +1,57 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Environment --- +prefix = "TF" +asg_name = "asg-qs" + +// --- Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 +} +private_subnets_map = { + "us-east-1a" = 3 + "us-east-1b" = 4 +} +subnets_bit_length = 8 + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +provision_tag = "quickstart" +load_balancers_type = "Application Load Balancer" +load_balancer_protocol = "HTTP" +certificate = "" +service_port = "80" +admin_shell = "/etc/cli.sh" + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +gateway_instance_type = "c5.xlarge" +gateways_min_group_size = 2 +gateways_max_group_size = 8 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_cloudwatch = true + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateways_blades = true +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Web Servers Auto Scaling Group Configuration --- +servers_deploy = true +servers_instance_type = "t3.micro" +server_ami = "ami-12345abc" \ No newline at end of file diff --git a/terraform/aws/qs-autoscale-master/variables.tf b/terraform/aws/qs-autoscale-master/variables.tf new file mode 100755 index 00000000..317b1c94 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/variables.tf @@ -0,0 +1,240 @@ +// Module: Check Point CloudGuard Network Quick Start Auto Scaling +//Deploy a Check Point CloudGuard Network Security Gateways Auto Scaling Group, an external ALB/NLB, and optionally a Security Management Server and a web server Auto Scaling Group in a new VPC. + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Environment --- +variable "prefix" { + type = string + description = "(Optional) Instances name prefix" + default = "" +} +variable "asg_name" { + type = string + description = "Autoscaling Group name" + default = "Check-Point-ASG-tf" +} +// --- Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "provision_tag" { + type = string + description = "The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment" + default = "quickstart" +} +variable "load_balancers_type" { + type = string + description = "Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing" + default = "Network Load Balancer" +} +variable "load_balancer_protocol" { + type = string + description = "The protocol to use on the Load Balancer" +} +variable "certificate" { + type = string + description = "Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP" +} +variable "service_port" { + type = string + description = "The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS" +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_gateway_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "gateways_min_group_size" { + type = number + description = "The minimal number of Security Gateways" + default = 2 +} +variable "gateways_max_group_size" { + type = number + description = "The maximal number of Security Gateways" + default = 10 +} +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateways_blades" { + type = bool + description = "Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later)" + default = true +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + +// --- Web Servers Auto Scaling Group Configuration --- +variable "servers_deploy" { + type = bool + description = "Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored" + default = false +} +variable "servers_instance_type" { + type = string + description = "The EC2 instance type for the web servers" + default = "t3.micro" +} +module "validate_servers_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "server" + instance_type = var.servers_instance_type +} +variable "server_ami" { + type = string + description = "The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63)" +} diff --git a/terraform/aws/qs-autoscale-master/versions.tf b/terraform/aws/qs-autoscale-master/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/qs-autoscale-master/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/qs-autoscale/README.md b/terraform/aws/qs-autoscale/README.md new file mode 100755 index 00000000..adadaeff --- /dev/null +++ b/terraform/aws/qs-autoscale/README.md @@ -0,0 +1,239 @@ +# Check Point CloudGuard Network Quick Start Auto Scaling Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway Auto Scaling Group, an external ALB/NLB, and optionally a Security Management Server and a web server Auto Scaling Group. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Load Balancer](https://www.terraform.io/docs/providers/aws/r/lb.html) +* [Load Balancer Target Group](https://www.terraform.io/docs/providers/aws/r/lb_target_group.html) +* [Launch template](https://www.terraform.io/docs/providers/aws/r/launch_template.html) +* [Auto Scaling Group](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Check Point CloudGuard Auto Scaling on AWS](https://aws.amazon.com/quickstart/architecture/check-point-cloudguard/) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale +- /terraform/aws/modules/custom-autoscale +- /terraform/aws/management +- /terraform/aws/cme-iam-role + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/qs-autoscale/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Environment --- + prefix = "TF" + asg_name = "asg-qs" + + // --- General Settings --- + vpc_id = "vpc-12345678" + key_name = "publickey" + enable_volume_encryption = true + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + provision_tag = "quickstart" + load_balancers_type = "Application Load Balancer" + load_balancer_protocol = "HTTP" + certificate = "" + service_port = "80" + admin_shell = "/etc/cli.sh" + + // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- + gateways_subnets = ["subnet-123b5678", "subnet-123a4567"] + gateway_instance_type = "c5.xlarge" + gateways_min_group_size = 2 + gateways_max_group_size = 8 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_cloudwatch = true + + // --- Check Point CloudGuard Network Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateways_blades = true + admin_cidr = "0.0.0.0/0" + gateways_addresses = "0.0.0.0/0" + + // --- Web Servers Auto Scaling Group Configuration --- + servers_deploy = false + servers_subnets = ["subnet-1234abcd", "subnet-56789def"] + servers_instance_type = "t3.micro" + server_ami = "ami-12345678" + ``` + +- Conditional creation + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` + - To deploy web servers: + ``` + servers_deploy = true + ``` + - To create an ASG configuration without a proxy ELB: + ``` + proxy_elb_type= "none" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs + +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| provision_tag | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | quickstart | no | +| load_balancers_type | Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing | string | - Network Load Balancer
- Application Load Balancer
| Network Load Balancer | no | +| load_balancer_protocol | The protocol to use on the Load Balancer | string | Network Load Balancer:
- TCP
- TLS
- UDP
- TCP_UDP

Application Load Balancer:
- HTTP
- HTTPS | TCP | yes | +| certificate | Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP | string | n/a | n/a | no | +| service_port | The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS | string | n/a | n/a | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | list(string) | n/a | n/a | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| servers_deploy | Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored | bool | true/false | false | no | +| servers_subnets | Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-0d72417c,subnet-1f61306f,subnet-1061d06f). | list(string) | n/a | n/a | yes | +| servers_instance_type | The EC2 instance type for the web servers | string | - t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge | t3.micro | no | +| server_ami | The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63) | string | n/a | n/a | yes | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| management_name | The deployed Security Management AWS instance name | +| internal_port | The internal Load Balancer should listen to this port | +| load_balancer_url | The URL of the external Load Balancer | +| external_load_balancer_arn | The external Load Balancer ARN | +| internal_load_balancer_arn | The internal Load Balancer ARN | +| external_LB_target_group_arn | The external Load Balancer Target Group ARN | +| internal_LB_target_group_arn | The internal Load Balancer Target Group ARN | +| autoscale_autoscaling_group_name | The name of the deployed AutoScaling Group | +| autoscale_autoscaling_group_arn | The ARN for the deployed AutoScaling Group | +| autoscale_security_group_id | The deployed AutoScaling Group's security group id | +| autoscale_iam_role_name | The deployed AutoScaling Group's IAM role name (if created) | +| configuration_template | The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name | +| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Quick Start Auto Scaling Terraform module for AWS | +| 20210329 | Stability fixes | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20231022 | Fixed template to populate x-chkp-tags correctly | +| 20231127 | Add support for parameter admin shell | +| 20240130 | Network Load Balancer Health Check configuration change for higher than R81 version. New Health Check Port is 8117 and Protocol TCP | +| 20240425 | Remove support for R81 and lower versions | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/qs-autoscale/locals.tf b/terraform/aws/qs-autoscale/locals.tf new file mode 100755 index 00000000..2ecac5dd --- /dev/null +++ b/terraform/aws/qs-autoscale/locals.tf @@ -0,0 +1,71 @@ +locals { + load_balancer_name = format("%sLB", var.prefix != "" ? format("%s-", var.prefix) : "") + target_group_name = format("%sTG", var.prefix != "" ? format("%s-", var.prefix) : "") + regex_valid_provision_tag = "^[a-zA-Z0-9-]{1,12}$" + // Will fail if var.provision_tag is invalid + regex_provision_tag = regex(local.regex_valid_provision_tag, var.provision_tag) == var.provision_tag ? 0 : "Variable [provision_tag] must be up to 12 alphanumeric characters and unique for each Quick Start deployment" + + load_balancers_type_allowed_values = [ + "Network Load Balancer", + "Application Load Balancer" + ] + // Will fail if var.load_balancers_type is invalid + validate_load_balancers_type = index(local.load_balancers_type_allowed_values, var.load_balancers_type) + + lb_protocol_allowed_values = var.load_balancers_type == "Network Load Balancer" ? [ + "TCP", + "TLS", + "UDP", + "TCP_UDP" + ] : [ + "HTTP", + "HTTPS" + ] + // Will fail if var.load_balancer_protocol is invalid + validate_lb_protocol = index(local.lb_protocol_allowed_values, var.load_balancer_protocol) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_certificate = "^(arn:aws:[a-z]+::[0-9]{12}:server-certificate/[a-zA-Z0-9-]*)?$" + // Will fail if var.certificate is invalid + regex_certificate = regex(local.regex_valid_certificate, var.certificate) == var.certificate ? 0 : "Variable [certificate] must be a valid Amazon Resource Name (ARN), for example: arn:aws:iam::123456789012:server-certificate/web-server-certificate" + + regex_valid_service_port = "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?$" + // Will fail if var.service_port is invalid + regex_service_port = regex(local.regex_valid_service_port, var.service_port) == var.service_port ? 0 : "Custom service port must be a number between 0 and 65535" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash." + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters." + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash." + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_admin_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR." + + regex_valid_gateways_addresses = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses." + + regex_valid_server_ami = "^(ami-(([0-9a-f]{8})|([0-9a-f]{17})))?$" + // Will fail if var.server_ami is invalid + regex_server_ami = regex(local.regex_valid_server_ami, var.server_ami) == var.server_ami ? 0 : "Amazon Machine Image ID must be in the form ami-xxxxxxxx or ami-xxxxxxxxxxxxxxxxx" + + alb_condition = var.load_balancers_type == "Application Load Balancer" + nlb_condition = var.load_balancers_type == "Network Load Balancer" + provided_port_condition = var.service_port != "" + encrypted_protocol_condition = (local.alb_condition && var.load_balancer_protocol == "HTTPS") || (local.nlb_condition && var.load_balancer_protocol == "TLS") ? true : false + deploy_management_condition = var.management_deploy == true + deploy_servers_condition = var.servers_deploy == true +} \ No newline at end of file diff --git a/terraform/aws/qs-autoscale/main.tf b/terraform/aws/qs-autoscale/main.tf new file mode 100755 index 00000000..7fa5f27f --- /dev/null +++ b/terraform/aws/qs-autoscale/main.tf @@ -0,0 +1,165 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +resource "aws_security_group" "external_alb_security_group" { + count = local.alb_condition ? 1 : 0 + description = "External ALB security group" + vpc_id = var.vpc_id + + egress { + from_port = local.encrypted_protocol_condition ? 9443 : 9080 + protocol = "tcp" + to_port = local.encrypted_protocol_condition ? 9443 : 9080 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = local.provided_port_condition ? var.service_port : local.encrypted_protocol_condition ? 443 : 80 + protocol = "tcp" + to_port = local.provided_port_condition ? var.service_port : local.encrypted_protocol_condition ? 443 : 80 + cidr_blocks = ["0.0.0.0/0"] + } +} + +module "external_load_balancer" { + source = "../modules/common/load_balancer" + + load_balancers_type = var.load_balancers_type + instances_subnets = var.gateways_subnets + prefix_name = "${var.prefix}-External" + internal = false + security_groups = local.alb_condition ? [aws_security_group.external_alb_security_group[0].id] : [] + tags = {} + vpc_id = var.vpc_id + load_balancer_protocol = var.load_balancer_protocol + target_group_port = local.encrypted_protocol_condition ? 9443 : 9080 + listener_port = local.provided_port_condition ? var.service_port : local.encrypted_protocol_condition ? "443" : "80" + certificate_arn = local.encrypted_protocol_condition ? var.certificate : "" + health_check_port = var.load_balancers_type == "Network Load Balancer" ? 8117 : null + health_check_protocol = var.load_balancers_type == "Network Load Balancer" ? "TCP" : null +} + +module "autoscale" { + source = "../autoscale" + providers = { + aws = aws + } + + prefix = var.prefix + asg_name = var.asg_name + vpc_id = var.vpc_id + subnet_ids = var.gateways_subnets + gateway_name = "${var.provision_tag}-security-gateway" + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + enable_instance_connect = var.enable_instance_connect + metadata_imdsv2_required = var.metadata_imdsv2_required + minimum_group_size = var.gateways_min_group_size + maximum_group_size = var.gateways_max_group_size + target_groups = tolist([module.external_load_balancer.target_group_arn]) + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = "echo -e '\nStarting Bootstrap script\n'; echo 'Adding quickstart identifier to cloud-version'; cv_path='/etc/cloud-version'\n if test -f \"$cv_path\"; then sed -i '/template_name/c\\template_name: autoscale_qs' /etc/cloud-version; fi; cv_json_path='/etc/cloud-version.json'\n cv_json_path_tmp='/etc/cloud-version-tmp.json'\n if test -f \"$cv_json_path\"; then cat \"$cv_json_path\" | jq '.template_name = \"'\"autoscale_qs\"'\"' > \"$cv_json_path_tmp\"; mv \"$cv_json_path_tmp\" \"$cv_json_path\"; fi; echo -e '\nFinished Bootstrap script\n'" + management_server = "${var.provision_tag}-management" + configuration_template = "${var.provision_tag}-template" +} + +data "aws_region" "current"{} + +module "management" { + providers = { + aws = aws + } + count = local.deploy_management_condition ? 1 : 0 + source = "../management" + + vpc_id = var.vpc_id + subnet_id = var.gateways_subnets[0] + management_name = "${var.provision_tag}-management" + management_instance_type = var.management_instance_type + key_name = var.key_name + volume_encryption = var.enable_volume_encryption ? "alias/aws/ebs" : "" + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + iam_permissions = "Create with read-write permissions" + management_version = var.management_version + admin_shell = var.admin_shell + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + allow_upload_download = var.allow_upload_download + admin_cidr = var.admin_cidr + gateway_addresses = var.gateways_addresses + management_bootstrap_script = "echo -e '\nStarting Bootstrap script\n'; echo 'Adding quickstart identifier to cloud-version'; cv_path='/etc/cloud-version'\n if test -f \"$cv_path\"; then sed -i '/template_name/c\\template_name: management_qs' /etc/cloud-version; fi; cv_json_path='/etc/cloud-version.json'\n cv_json_path_tmp='/etc/cloud-version-tmp.json'\n if test -f \"$cv_json_path\"; then cat \"$cv_json_path\" | jq '.template_name = \"'\"management_qs\"'\"' > \"$cv_json_path_tmp\"; mv \"$cv_json_path_tmp\" \"$cv_json_path\"; fi; echo 'Creating CME configuration'; autoprov_cfg -f init AWS -mn ${var.provision_tag}-management -tn ${var.provision_tag}-template -cn ${var.provision_tag}-controller -po ${var.gateways_policy} -otp ${var.gateway_SICKey} -r ${data.aws_region.current.name} -ver ${split("-", var.gateway_version)[0]} -iam; ${var.gateways_blades} && autoprov_cfg -f set template -tn ${var.provision_tag}-template -ips -appi -av -ab; echo -e '\nFinished Bootstrap script\n'" +} + +resource "aws_security_group" "internal_security_group" { + count = local.deploy_servers_condition ? 1 : 0 + vpc_id = var.vpc_id + + egress { + from_port = local.provided_port_condition ? var.service_port : local.encrypted_protocol_condition ? 443 : 80 + protocol = "tcp" + to_port = local.provided_port_condition ? var.service_port : local.encrypted_protocol_condition ? 443 : 80 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = local.encrypted_protocol_condition ? 443 : 80 + protocol = "tcp" + to_port = local.encrypted_protocol_condition ? 443 : 80 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + from_port = -1 + protocol = "icmp" + to_port = -1 + cidr_blocks = ["0.0.0.0/0"] + } +} + +module "internal_load_balancer" { + count = local.deploy_servers_condition ? 1 : 0 + source = "../modules/common/load_balancer" + + load_balancers_type = var.load_balancers_type + instances_subnets = var.servers_subnets + prefix_name = "${var.prefix}-Internal" + internal = true + security_groups = local.alb_condition ? [aws_security_group.internal_security_group[0].id] : [] + tags = { + x-chkp-management = "${var.provision_tag}-management" + x-chkp-template = "${var.provision_tag}-template" + } + vpc_id = var.vpc_id + load_balancer_protocol = var.load_balancer_protocol + target_group_port = local.encrypted_protocol_condition ? 443 : 80 + listener_port = local.encrypted_protocol_condition ? "443" : "80" + certificate_arn = local.encrypted_protocol_condition ? var.certificate : "" +} + +module "custom_autoscale" { + count = local.deploy_servers_condition ? 1 : 0 + source = "../modules/custom-autoscale" + + prefix = var.prefix + asg_name = var.asg_name + vpc_id = var.vpc_id + servers_subnets = var.servers_subnets + server_ami = var.server_ami + server_name = "${var.provision_tag}-server" + servers_instance_type = var.servers_instance_type + key_name = var.key_name + servers_min_group_size = var.gateways_min_group_size + servers_max_group_size = var.gateways_max_group_size + servers_target_groups = module.internal_load_balancer[0].target_group_id + deploy_internal_security_group = local.nlb_condition ? true : false + source_security_group = local.nlb_condition ? "" : aws_security_group.internal_security_group[0].id +} \ No newline at end of file diff --git a/terraform/aws/qs-autoscale/output.tf b/terraform/aws/qs-autoscale/output.tf new file mode 100755 index 00000000..edb1a1f6 --- /dev/null +++ b/terraform/aws/qs-autoscale/output.tf @@ -0,0 +1,45 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} + +output "management_name" { + value = "${var.provision_tag}-management" +} +output "internal_port" { + value = local.encrypted_protocol_condition ? 443 : 80 +} +output "load_balancer_url" { + value = module.external_load_balancer.load_balancer_url +} +output "external_load_balancer_arn" { + value = module.external_load_balancer.load_balancer_arn +} +output "internal_load_balancer_arn" { + value = module.internal_load_balancer[*].load_balancer_arn +} +output "external_lb_target_group_arn" { + value = module.external_load_balancer.target_group_arn +} +output "internal_lb_target_group_arn" { + value = module.internal_load_balancer[*].target_group_arn +} + +output "autoscale_autoscaling_group_name" { + value = module.autoscale.autoscale_autoscaling_group_name +} +output "autoscale_autoscaling_group_arn" { + value = module.autoscale.autoscale_autoscaling_group_arn +} +output "autoscale_security_group_id" { + value = module.autoscale.autoscale_security_group_id +} +output "autoscale_iam_role_name" { + value = module.autoscale.autoscale_iam_role_name +} + +output "configuration_template" { + value = "${var.provision_tag}-template" +} +output "controller_name" { + value = "${var.provision_tag}-controller" +} diff --git a/terraform/aws/qs-autoscale/terraform.tfvars b/terraform/aws/qs-autoscale/terraform.tfvars new file mode 100755 index 00000000..d9eb16f4 --- /dev/null +++ b/terraform/aws/qs-autoscale/terraform.tfvars @@ -0,0 +1,48 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Environment --- +prefix = "TF" +asg_name = "asg-qs" + +// --- General Settings --- +vpc_id = "vpc-12345678" +key_name = "publickey" +enable_volume_encryption = true +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +provision_tag = "quickstart" +load_balancers_type = "Application Load Balancer" +load_balancer_protocol = "HTTP" +certificate = "" +service_port = "80" +admin_shell = "/etc/cli.sh" + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +gateways_subnets = ["subnet-123b5678", "subnet-123a4567"] +gateway_instance_type = "c5.xlarge" +gateways_min_group_size = 2 +gateways_max_group_size = 8 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_cloudwatch = true + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateways_blades = true +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Web Servers Auto Scaling Group Configuration --- +servers_deploy = false +servers_subnets = ["subnet-1234abcd", "subnet-56789def"] +servers_instance_type = "t3.micro" +server_ami = "ami-12345678" \ No newline at end of file diff --git a/terraform/aws/qs-autoscale/variables.tf b/terraform/aws/qs-autoscale/variables.tf new file mode 100755 index 00000000..070ec4f4 --- /dev/null +++ b/terraform/aws/qs-autoscale/variables.tf @@ -0,0 +1,231 @@ +// Module: Check Point CloudGuard Network Quick Start Auto Scaling +//Deploy a Check Point CloudGuard Network Security Gateways Auto Scaling Group, an external ALB/NLB, and optionally a Security Management Server and a web server Auto Scaling Group. + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Environment --- +variable "prefix" { + type = string + description = "(Optional) Instances name prefix" + default = "" +} +variable "asg_name" { + type = string + description = "Autoscaling Group name" + default = "Check-Point-ASG-tf" +} +// --- General Settings --- +variable "vpc_id" { + type = string +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "provision_tag" { + type = string + description = "The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment" + default = "quickstart" +} +variable "load_balancers_type" { + type = string + description = "Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing" + default = "Network Load Balancer" +} +variable "load_balancer_protocol" { + type = string + description = "The protocol to use on the Load Balancer" +} +variable "certificate" { + type = string + description = "Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP" +} +variable "service_port" { + type = string + description = "The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS" +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +variable "gateways_subnets" { + type = list(string) + description = "Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_gateway_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "gateways_min_group_size" { + type = number + description = "The minimal number of Security Gateways" + default = 2 +} +variable "gateways_max_group_size" { + type = number + description = "The maximal number of Security Gateways" + default = 10 +} +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateways_blades" { + type = bool + description = "Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later)" + default = true +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + +// --- Web Servers Auto Scaling Group Configuration --- +variable "servers_deploy" { + type = bool + description = "Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored" + default = false +} +variable "servers_subnets" { + type = list(string) + description = "Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-1234,subnet-5678,subnet-9012)" +} +variable "servers_instance_type" { + type = string + description = "The EC2 instance type for the web servers" + default = "t3.micro" +} +module "validate_servers_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "server" + instance_type = var.servers_instance_type +} +variable "server_ami" { + type = string + description = "The Amazon Machine Image ID of a preconfigured web server (e.g. ami-1234)" +} diff --git a/terraform/aws/qs-autoscale/versions.tf b/terraform/aws/qs-autoscale/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/qs-autoscale/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/standalone-master/README.md b/terraform/aws/standalone-master/README.md new file mode 100755 index 00000000..7802954c --- /dev/null +++ b/terraform/aws/standalone-master/README.md @@ -0,0 +1,201 @@ +# Check Point CloudGuard Network Security Management Server & Security Gateway (Standalone) Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway & Management (Standalone) instance into a new VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Security group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation + +This solution uses the following modules: +- /terraform/aws/standalone +- /terraform/aws/modules/amis +- /terraform/aws/modules/vpc + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/standalone-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/standalone: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-module /terraform/aws/standalone: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/standalone-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + - Due to terraform limitation, the apply command is: + ``` + terraform apply -target=aws_route_table.private_subnet_rtb -auto-approve && terraform apply + ``` + >Once terraform is updated, we will update accordingly. + +- Variables are configured in /terraform/aws/standalone-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + } + private_subnets_map = { + "us-east-1a" = 2 + } + subnets_bit_length = 8 + + // --- EC2 Instance Configuration --- + standalone_name = "Check-Point-Standalone-tf" + standalone_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Check Point Settings --- + standalone_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + standalone_password_hash = "" + standalone_maintenance_mode_password_hash = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + standalone_hostname = "standalone-tf" + allow_upload_download = true + enable_cloudwatch = false + standalone_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + admin_cidr = "0.0.0.0/0" + gateway_addresses = "0.0.0.0/0" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to the Standalone instance: + ``` + allocate_and_associate_eip = true + ``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| standalone_name | (Optional) The name tag of the Security Gateway & Management (Standalone) instance | string | n/a | Check-Point-Standalone-tf | no | +| standalone_instance_type | The instance type of the Security Gateway & Management (Standalone) instance | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - 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 | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| standalone_hostname | (Optional) Security Gateway & Management (Standalone) prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| standalone_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| standalone_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|------------------------------|------------------------------------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| internal_rtb_id | The internal route table id | +| vpc_public_subnets_ids_list | A list of the public subnets ids | +| vpc_private_subnets_ids_list | A list of the private subnets ids | +| standalone_instance_id | The deployed Security Gateway & Management (Standalone) AWS instance id | +| standalone_instance_name | The deployed Security Gateway & Management (Standalone) AWS instance name | +| standalone_public_ip | The deployed Security Gateway & Management (Standalone) AWS public address | +| standalone_ssh | SSH command to the Security Gateway & Management (Standalone) | +| standalone_url | URL to the portal of the deployed Security Gateway & Management (Standalone) | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20231012 | Update AWS Terraform Provider version to 5.20.1 | +| 20231113 | Add support for BYOL license type for Standalone | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/standalone-master/locals.tf b/terraform/aws/standalone-master/locals.tf new file mode 100755 index 00000000..e2e6ab47 --- /dev/null +++ b/terraform/aws/standalone-master/locals.tf @@ -0,0 +1,35 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_subnet or var.gateway_addresses are invalid + mgmt_subnet_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_subnet must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + regex_valid_standalone_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.standalone_password_hash is invalid + regex_standalone_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_password_hash) == var.standalone_password_hash ? 0 : "Variable [standalone_password_hash] must be a valid password hash" + regex_maintenance_mode_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_maintenance_mode_password_hash) == var.standalone_maintenance_mode_password_hash ? 0 : "Variable [standalone_maintenance_mode_password_hash] must be a valid password hash" +} \ No newline at end of file diff --git a/terraform/aws/standalone-master/main.tf b/terraform/aws/standalone-master/main.tf new file mode 100755 index 00000000..999c506e --- /dev/null +++ b/terraform/aws/standalone-master/main.tf @@ -0,0 +1,63 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + subnets_bit_length = var.subnets_bit_length +} + +resource "aws_route_table" "private_subnet_rtb" { + depends_on = [module.launch_vpc] + vpc_id = module.launch_vpc.vpc_id + tags = { + Name = "Private Subnets Route Table" + } +} +resource "aws_route_table_association" "private_rtb_to_private_subnets" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[0] +} + +module "launch_standalone_into_vpc" { + source = "../standalone" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + public_subnet_id = module.launch_vpc.public_subnets_ids_list[0] + private_subnet_id = module.launch_vpc.private_subnets_ids_list[0] + private_route_table = aws_route_table.private_subnet_rtb.id + resources_tag_name = var.resources_tag_name + standalone_name = var.standalone_name + standalone_instance_type = var.standalone_instance_type + key_name = var.key_name + allocate_and_associate_eip = var.allocate_and_associate_eip + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + standalone_version = var.standalone_version + admin_shell = var.admin_shell + standalone_password_hash = var.standalone_password_hash + standalone_maintenance_mode_password_hash = var.standalone_maintenance_mode_password_hash + standalone_hostname = var.standalone_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + standalone_bootstrap_script = var.standalone_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + admin_cidr = var.admin_cidr + gateway_addresses = var.gateway_addresses +} diff --git a/terraform/aws/standalone-master/output.tf b/terraform/aws/standalone-master/output.tf new file mode 100755 index 00000000..11d557b9 --- /dev/null +++ b/terraform/aws/standalone-master/output.tf @@ -0,0 +1,27 @@ +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "internal_rtb_id" { + value = aws_route_table.private_subnet_rtb.id +} +output "vpc_public_subnets_ids_list" { + value = module.launch_vpc.public_subnets_ids_list +} +output "vpc_private_subnets_ids_list" { + value = module.launch_vpc.private_subnets_ids_list +} +output "standalone_instance_id" { + value = module.launch_standalone_into_vpc.standalone_instance_id +} +output "standalone_instance_name" { + value = module.launch_standalone_into_vpc.standalone_instance_name +} +output "standalone_public_ip" { + value = module.launch_standalone_into_vpc.standalone_public_ip +} +output "standalone_ssh" { + value = module.launch_standalone_into_vpc.standalone_ssh +} +output "standalone_url" { + value = module.launch_standalone_into_vpc.standalone_url +} \ No newline at end of file diff --git a/terraform/aws/standalone-master/terraform.tfvars b/terraform/aws/standalone-master/terraform.tfvars new file mode 100755 index 00000000..4f6b6131 --- /dev/null +++ b/terraform/aws/standalone-master/terraform.tfvars @@ -0,0 +1,43 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 +} +private_subnets_map = { + "us-east-1a" = 2 +} +subnets_bit_length = 8 + +// --- EC2 Instance Configuration --- +standalone_name = "Check-Point-Standalone-tf" +standalone_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +standalone_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +standalone_password_hash = "" +standalone_maintenance_mode_password_hash = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +standalone_hostname = "standalone-tf" +allow_upload_download = true +enable_cloudwatch = false +standalone_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" \ No newline at end of file diff --git a/terraform/aws/standalone-master/variables.tf b/terraform/aws/standalone-master/variables.tf new file mode 100755 index 00000000..212dc108 --- /dev/null +++ b/terraform/aws/standalone-master/variables.tf @@ -0,0 +1,174 @@ +// Module: Check Point CloudGuard Network Security Gateway & Management (Standalone) instance into a new VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " + +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- EC2 Instance Configuration --- +variable "standalone_name" { + type = string + description = "(Optional) The name tag of the Security Gateway & Management (Standalone) instance" + default = "Check-Point-Standalone-tf" +} +variable "standalone_instance_type" { + type = string + description = "The instance type of the Security Gateway & Management (Standalone) instance" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "standalone" + instance_type = var.standalone_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance" + default = {} +} + +// --- Check Point Settings --- +variable "standalone_version" { + type = string + description = "Gateway & Management (Standalone) version and license" + default = "R81.20-BYOL" +} +module "validate_standalone_version" { + source = "../modules/common/version_license" + + chkp_type = "standalone" + version_license = var.standalone_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "standalone_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "standalone_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) The name tag of the resources" + default = "" +} +variable "standalone_hostname" { + type = string + description = "(Optional) Security Gateway & Management (Standalone) prompt hostname" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "standalone_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server" + default = "0.0.0.0/0" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Management Server" + default = "0.0.0.0/0" +} diff --git a/terraform/aws/standalone-master/versions.tf b/terraform/aws/standalone-master/versions.tf new file mode 100755 index 00000000..a95f0172 --- /dev/null +++ b/terraform/aws/standalone-master/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} \ No newline at end of file diff --git a/terraform/aws/standalone/README.md b/terraform/aws/standalone/README.md new file mode 100755 index 00000000..388bba1e --- /dev/null +++ b/terraform/aws/standalone/README.md @@ -0,0 +1,177 @@ +# Check Point CloudGuard Network Security Management Server & Security Gateway (Standalone) Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway & Management (Standalone) instance into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) - conditional creation +* [Route](https://www.terraform.io/docs/providers/aws/r/route.html) - conditional creation + + +This solution uses the following modules: +- /terraform/aws/modules/amis + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/standalone/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/standalone/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/standalone/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + public_subnet_id = "subnet-123456" + private_subnet_id = "subnet-345678" + private_route_table = "rtb-12345678" + + // --- EC2 Instance Configuration --- + standalone_name = "Check-Point-Standalone-tf" + standalone_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + + // --- Check Point Settings --- + standalone_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + standalone_password_hash = "" + standalone_maintenance_mode_password_hash = "" + // --- Advanced Settings --- + resources_tag_name = "tag-name" + standalone_hostname = "standalone-tf" + allow_upload_download = true + enable_cloudwatch = false + standalone_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + admin_cidr = "0.0.0.0/0" + gateway_addresses = "0.0.0.0/0" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to the Standalone instance: + ``` + allocate_and_associate_eip = true + ``` + - To create route from '0.0.0.0/0' to the Standalone instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | +| private_route_table | Sets '0.0.0.0/0' route to the Security Gateway & Management (Standalone) instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | +| standalone_name | (Optional) The name tag of the Security Gateway & Management (Standalone) instance | string | n/a | Check-Point-Standalone-tf | no | +| standalone_instance_type | The instance type of the Security Gateway & Management (Standalone) instance | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - 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 | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| standalone_hostname | (Optional) Security Gateway & Management (Standalone) prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| standalone_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| standalone_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------------|------------------------------------------------------------------------------| +| standalone_instance_id | The deployed Security Gateway & Management (Standalone) AWS instance id | +| standalone_instance_name | The deployed Security Gateway & Management (Standalone) AWS instance name | +| standalone_public_ip | The deployed Security Gateway & Management (Standalone) AWS public address | +| standalone_ssh | SSH command to the Security Gateway & Management (Standalone) | +| standalone_url | URL to the portal of the deployed Security Gateway & Management (Standalone) | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|--------------------|------------------------------------------------------------------------------------------------------------------| +| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Terraform module for AWS | +| 20210329 | Stability fixes | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20231113 | Add support for BYOL license type for Standalone | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/aws/standalone/locals.tf b/terraform/aws/standalone/locals.tf new file mode 100755 index 00000000..6e438e83 --- /dev/null +++ b/terraform/aws/standalone/locals.tf @@ -0,0 +1,41 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + enable_cloudwatch_policy = var.enable_cloudwatch ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_cidr_range = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))?$" + // Will fail if var.admin_subnet or var.gateway_addresses are invalid + mgmt_subnet_regex_result = regex(local.regex_valid_cidr_range, var.admin_cidr) == var.admin_cidr ? 0 : "var.admin_subnet must be a valid CIDR range" + gw_addr_regex_result = regex(local.regex_valid_cidr_range, var.gateway_addresses) == var.gateway_addresses ? 0 : "var.gateway_addresses must be a valid CIDR range" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + regex_valid_standalone_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.standalone_password_hash is invalid + regex_standalone_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_password_hash) == var.standalone_password_hash ? 0 : "Variable [standalone_password_hash] must be a valid password hash" + regex_maintenance_mode_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_maintenance_mode_password_hash) == var.standalone_maintenance_mode_password_hash ? 0 : "Variable [standalone_maintenance_mode_password_hash] must be a valid password hash" + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.standalone_version), 0) + + standalone_bootstrap_script64 = base64encode(var.standalone_bootstrap_script) + standalone_password_hash_base64 = base64encode(var.standalone_password_hash) + maintenance_mode_password_hash_base64 = base64encode(var.standalone_maintenance_mode_password_hash) +} \ No newline at end of file diff --git a/terraform/aws/standalone/main.tf b/terraform/aws/standalone/main.tf new file mode 100755 index 00000000..f9df43ff --- /dev/null +++ b/terraform/aws/standalone/main.tf @@ -0,0 +1,145 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.standalone_version + chkp_type = "standalone" +} + +module "common_permissive_sg" { + source = "../modules/common/permissive_sg" + + vpc_id = var.vpc_id + resources_tag_name = var.resources_tag_name + gateway_name = var.standalone_name +} + +resource "aws_iam_instance_profile" "standalone_instance_profile" { + count = local.enable_cloudwatch_policy + path = "/" + role = aws_iam_role.standalone_iam_role[count.index].name +} + +resource "aws_iam_role" "standalone_iam_role" { + count = local.enable_cloudwatch_policy + assume_role_policy = data.aws_iam_policy_document.standalone_role_assume_policy_document.json + path = "/" +} + +data "aws_iam_policy_document" "standalone_role_assume_policy_document" { + version = "2012-10-17" + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + } +} + +module "attach_cloudwatch_policy" { + source = "../modules/cloudwatch-policy" + count = local.enable_cloudwatch_policy + role = aws_iam_role.standalone_iam_role[count.index].name + tag_name = var.resources_tag_name != "" ? var.resources_tag_name : var.standalone_name +} +resource "aws_network_interface" "public_eni" { + subnet_id = var.public_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "eth0" + source_dest_check = false + tags = { + Name = format("%s-external-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.standalone_name) } +} +resource "aws_network_interface" "private_eni" { + subnet_id = var.private_subnet_id + security_groups = [module.common_permissive_sg.permissive_sg_id] + description = "eth1" + source_dest_check = false + tags = { + Name = format("%s-internal-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.standalone_name) } +} + +module "common_eip" { + source = "../modules/common/elastic_ip" + + allocate_and_associate_eip = var.allocate_and_associate_eip + external_eni_id = aws_network_interface.public_eni.id + private_ip_address = aws_network_interface.public_eni.private_ip +} + +module "common_internal_default_route" { + source = "../modules/common/internal_default_route" + + private_route_table = var.private_route_table + internal_eni_id = aws_network_interface.private_eni.id +} + +resource "aws_launch_template" "standalone_launch_template" { + instance_type = var.standalone_instance_type + key_name = var.key_name + image_id = module.amis.ami_id + description = "Initial launch template version" + + iam_instance_profile { + name = (local.enable_cloudwatch_policy == 1 ? aws_iam_instance_profile.standalone_instance_profile[0].id : "") + } + + network_interfaces { + network_interface_id = aws_network_interface.public_eni.id + device_index = 0 + } + + metadata_options { + http_tokens = var.metadata_imdsv2_required ? "required" : "optional" + } + + network_interfaces { + network_interface_id = aws_network_interface.private_eni.id + device_index = 1 + } +} + +resource "aws_instance" "standalone-instance" { + launch_template { + id = aws_launch_template.standalone_launch_template.id + version = "$Latest" + } + + disable_api_termination = var.disable_instance_termination + + tags = merge({ + Name = var.standalone_name + }, var.instance_tags) + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = var.volume_size + encrypted = local.volume_encryption_condition + kms_key_id = local.volume_encryption_condition ? var.volume_encryption : "" + } + + user_data = templatefile("${path.module}/standalone_userdata.yaml", { + // script's arguments + Hostname = var.standalone_hostname, + PasswordHash = local.standalone_password_hash_base64, + MaintenanceModePassword = local.maintenance_mode_password_hash_base64, + AllowUploadDownload = var.allow_upload_download, + EnableCloudWatch = var.enable_cloudwatch, + NTPPrimary = var.primary_ntp, + NTPSecondary = var.secondary_ntp, + Shell = var.admin_shell, + AdminSubnet = var.admin_cidr, + EnableInstanceConnect = var.enable_instance_connect, + StandaloneBootstrapScript = local.standalone_bootstrap_script64 + AllocateElasticIP = var.allocate_and_associate_eip + OsVersion = local.version_split + }) +} \ No newline at end of file diff --git a/terraform/aws/standalone/output.tf b/terraform/aws/standalone/output.tf new file mode 100755 index 00000000..5a46d0fa --- /dev/null +++ b/terraform/aws/standalone/output.tf @@ -0,0 +1,15 @@ +output "standalone_instance_id" { + value = aws_instance.standalone-instance.id +} +output "standalone_instance_name" { + value = aws_instance.standalone-instance.tags["Name"] +} +output "standalone_public_ip" { + value = aws_instance.standalone-instance.public_ip +} +output "standalone_ssh" { + value = format("ssh -i %s admin@%s", var.key_name, aws_instance.standalone-instance.public_ip) +} +output "standalone_url" { + value = format("https://%s", aws_instance.standalone-instance.public_ip) +} \ No newline at end of file diff --git a/terraform/aws/standalone/standalone_userdata.yaml b/terraform/aws/standalone/standalone_userdata.yaml new file mode 100755 index 00000000..1bdf7eca --- /dev/null +++ b/terraform/aws/standalone/standalone_userdata.yaml @@ -0,0 +1,4 @@ +#cloud-config +runcmd: + - | + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" installationType=\"standalone\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"standalone\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" bootstrapScript64=\"${StandaloneBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/standalone/terraform.tfvars b/terraform/aws/standalone/terraform.tfvars new file mode 100755 index 00000000..edad70cd --- /dev/null +++ b/terraform/aws/standalone/terraform.tfvars @@ -0,0 +1,39 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +public_subnet_id = "subnet-123456" +private_subnet_id = "subnet-345678" +private_route_table = "rtb-12345678" + +// --- EC2 Instance Configuration --- +standalone_name = "Check-Point-Standalone-tf" +standalone_instance_type = "c5.xlarge" +key_name = "publickey" +allocate_and_associate_eip = true +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +instance_tags = { + key1 = "value1" + key2 = "value2" +} + +// --- Check Point Settings --- +standalone_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +standalone_password_hash = "" +standalone_maintenance_mode_password_hash = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +standalone_hostname = "standalone-tf" +allow_upload_download = true +enable_cloudwatch = false +standalone_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" +admin_cidr = "0.0.0.0/0" +gateway_addresses = "0.0.0.0/0" \ No newline at end of file diff --git a/terraform/aws/standalone/variables.tf b/terraform/aws/standalone/variables.tf new file mode 100755 index 00000000..afdec993 --- /dev/null +++ b/terraform/aws/standalone/variables.tf @@ -0,0 +1,172 @@ +// Module: Check Point CloudGuard Network Security Gateway & Management (Standalone) instance into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_subnet_id" { + type = string + description = "The public subnet of the Security Gateway & Management (Standalone)" +} +variable "private_subnet_id" { + type = string + description = "The private subnet of the Security Gateway & Management (Standalone)" +} +variable "private_route_table" { + type = string + description = "Sets '0.0.0.0/0' route to the Security Gateway & Management (Standalone) instance in the specified route table (e.g. rtb-12a34567)" + default= "" +} + +// --- EC2 Instance Configuration --- +variable "standalone_name" { + type = string + description = "(Optional) The name tag of the Security Gateway & Management (Standalone) instance" + default = "Check-Point-Standalone-tf" +} +variable "standalone_instance_type" { + type = string + description = "The instance type of the Security Gateway & Management (Standalone) instance" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "standalone" + instance_type = var.standalone_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with the launched instance" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance" + default = {} +} + +// --- Check Point Settings --- +variable "standalone_version" { + type = string + description = "Security Gateway & Management (Standalone) version and license" + default = "R81.20-BYOL" +} +module "validate_standalone_version" { + source = "../modules/common/version_license" + + chkp_type = "standalone" + version_license = var.standalone_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "standalone_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "standalone_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) The name tag of the resources" + default = "" +} +variable "standalone_hostname" { + type = string + description = "(Optional) Security Gateway & Management (Standalone) prompt hostname" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "standalone_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} +variable "admin_cidr" { + type = string + description = "(CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server" + default = "0.0.0.0/0" +} +variable "gateway_addresses" { + type = string + description = "(CIDR) Allow gateways only from this network to communicate with the Management Server" + default = "0.0.0.0/0" +} diff --git a/terraform/aws/standalone/versions.tf b/terraform/aws/standalone/versions.tf new file mode 100755 index 00000000..c138bbb3 --- /dev/null +++ b/terraform/aws/standalone/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + } +} diff --git a/terraform/aws/tap/Check Point NOW onboarding page.docx b/terraform/aws/tap/Check Point NOW onboarding page.docx new file mode 100644 index 0000000000000000000000000000000000000000..54b4968d384d7f6e8725be4aa9cf35b497f5bf2f GIT binary patch literal 287849 zcmeFY1CK62w6^_>ZQHhO+qSjGwr%XO?U_BcvB$P;+uuIt0supNAF?# zi?9$Bm@*##{O|ey*Zv3pfg$xRn+--pe}YSYMlZaUdH8Wm$M;#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tx$u65JRVIMhZ7Vuwfx7|Bc8%kCf5k|ek>nuM*^Vt`_Djg&L%c@aR2=>%~EoX5e5C|X8 z$62V%BZ!&ig=m?LgtHFa0d(lwI`uWkq~>INMI%}%^vc5{E|l-e?)V{#p;=FUAC3^b zlf>$7O;Nk=%kT=?YfEdBNy?dWzE?>+CC2*<|0@n5?W+P=G8hSSX=WxiZqrC;?$)RsJ< zmQU@*123OSz4cWM{u1s03b2hXaVe)ud?Qa%mzQHEeem zbJ3pNH^TZ}mrz@Dv&n;U0qPAu25+YC5GErXM@%m}>L#lI2yV2^ir(DoUoRb{b zEf%I6nj_TqOPU2g%6H48F{8q7*|&qrjq@%~>NkdQ)0* z;CU882m+B^0@4EEV`sMT8x70}UF-lM{_ASE$|Qjh^sEf1;20;uS;*NrnLi-W8Pi3M ztMK^-yHRRDkV5R!Iq1b?4md{6;Fb>`!XQrE|Ej+uNfI~1br9$Xu;9z+aFSO(>1vZXnR2Tv%}I? zOYa@4COXBF0{GKdz4Jt<@COgExA{9{GO9rmomH(iBxBmt8{j(z}aNh9v1+>6ZfQ8^Pk;)$;m^H)>!g2O}L6N||{8^#~ zF?<7FU;_j!p61IG`S<=%*g-68OgU`qOsyaS><;!;S9O`cN{!wED58-4Duo2}Zwf(n zh@ItcigPKB7iqOcSwW!Fd|3)UufHjT&ZRh~*i9Z%Nd_u)nlDpi=lxB=^)Cw44$Jad zW)SE!U#5WN|4qUFFNz0f0tDWgAkb;POkw)rZwkJDQKVA*Y@|#Cflf0pKwL<;ObEY? z@r(@DTx`y>A)-Pk7M(05lo7g8%>k literal 0 HcmV?d00001 diff --git a/terraform/aws/tap/CheckPoint_NOW_onboarding_page.pdf b/terraform/aws/tap/CheckPoint_NOW_onboarding_page.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c25e9592852d07d2f26f9b9272632d2e81df42e9 GIT binary patch literal 390187 zcmb@tb95$6xG$QColH2fjW@P!b7I@JZQHi(Ol;e>HJRXMzHjey_CELQweBCc*Sp^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ZNdq6M)a`TTR0PN_w*3$B23IrA^mDzK9~^jl%DpXD@vHL>;%_{k`3naMI6I>i8Ra zB!z+c4}A$si7fSSaN=H*NVVLue)z`T6`O97fUNYEvoMQgU{NWd^J@y{79I4<2;bx7 zf51L$@yhjoV0-OOi%{;HHd|7;&tTLYwhwf2EoP>##ZWg*=4ny_@ds~E%o88I$4#1t zX!#V_5^BuzIkw8yUay%auWX?;4Q#Nb-)<3cy%zcYX8rr=1Zf*=*Z_8tuR2Y$|6ZM~ z3f`Xy237BrRar70tsylw0h2e;7dK=cXKn+ILRWhuV?sRiV1U8UKmO|jM=~Jba44MN z@1Oqb14buL{{1jm|F;bcfn(SpAaqXS6+bu40X1dM=V`XRySIpvBU3WlBmuG)|oHV6oc5eor>&}pmxjD+Yr#JHaH3eyVB?A)KvuH zYIz7G2yrzQ34wyHv>zCWPIkS*i?$(QSJ{vdUgT9aBoqR=S}zg`MPif(MO^J8FcOM_ zT;)K*K$x*85WpM(LXS&~IS1Vz7&Zh5zy=1eK>%#%6!)w18oEs}ZEye^Iw>3@7GR!4 z&qJ7g037K155o@$z=3W*Og{h)^q9u<1K>dSIi?=~$KQnctGwuW9K(hJ;6MRzpvNy} zEC2@zfCB}L@GU;qxZeqhD|aG=*dn0^2pXbr{ig8*=#wF1)*fCH_Un0^2p=ye399{>k>e#Z0z z;D7*dKmj<=>jRAP(CZ;g8vqAd2QmEsIG_L==u=fNV*xmz037J^BQRoN037J&OiVuj z4)i(}(+_|Hy=K7l1K@xGaGc$ZdJX~5bMzBGKzRThV9aq2 z0nl>@fS&(-_QT*sKZ9Y~05~83{Q;oo5C{MVfSyCpdnlOo0`v!fo};%3{uzrN_*OuM#QV>F9f%O`|I5|!$lDt^qYpXzdr|+|6IXJy T`ui2#ZdWgy7u}Bkx$yr5?6R*5 literal 0 HcmV?d00001 diff --git a/terraform/aws/tap/README.md b/terraform/aws/tap/README.md new file mode 100644 index 00000000..a3b2d231 --- /dev/null +++ b/terraform/aws/tap/README.md @@ -0,0 +1,259 @@ +# Check Point Traffic Access Point (TAP) Terraform module for AWS + +Terraform module which deploys a TAP solution in an existing VPC on AWS. + +To learn about Check Point's TAP solution, click [here](CheckPoint_NOW_onboarding_page.pdf). + + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) - TAP Gateway +* [AWS CloudFormation Stack](https://www.terraform.io/docs/providers/aws/r/cloudformation_stack.html) - creates Traffic Mirror Filter and Target +* [AWS Lambdas](https://www.terraform.io/docs/providers/aws/r/lambda_function.html) - TAP Lambda, TAP Termination Lambda + +Learn more about [TAP Lambda](#TAP-Lambda) and [TAP Termination Lambda](#TAP-Termination-Lambda) + +This solution uses the following modules: +- /terraform/aws/modules/amis + + +## Prerequisites +* **Internet Gateway -** The VPC deployed into **must** have an [Internet Gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) +configured as default route in the VPC's main route-table in order to allow communication between the TAP Gateway and Check Point NOW Cloud. +**Note:** Internet connectivity is mandatory pre-deployment. +* **License -** This module supports Check Point R80.40 NGTX-PAYG license only +* **NOW domain and Cyber Sentry -** +To create a NOW domain fill in the [NOW cloud registration form](https://now.checkpoint.com/register/index.html). +Once you are logged in to your NOW domain, create a Cyber Sentry and use its MAC address as the 'registration_key' variable in the terraform deployment. +For detailed information and instructions refer to the [NOW onboarding page](CheckPoint_NOW_onboarding_page.pdf). + +> **Note:** Make sure the Cyber Sentry you intend to connect to is 'decativated' pre-deployment in the NOW portal. + +### Notes and limitations +* As explained in [AWS Traffic Mirroring considerations](https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html) page, +AWS supports traffic mirroring for [Nitro-based instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) only. +* Post-deployment refer to [Check Point NOW portal](https://now.checkpoint.com) > Cyber Sentries. +Once your Cyber sentry changes its state to 'activated' and 'connected' - the instance connected successfully to Check Point NOW Cloud. +This may take up to 20 minutes. +* Due to an AWS limitation the **maximum number of mirror sources per target** depends on the TAP Gateway instance type. +For a non-dedicated instance type as target, the limit is 10 sources. +For a dedicated instance type, the limit is 100 sources. +CGI supports the following dedicated instance types: c5.18xlarge and c5n.18xlarge +For more information please refer to [AWS Traffic Mirroring quotas and considerations](https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html#traffic-mirroring-limits) page. + +## Note +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/tap/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +[Clone or download](https://github.com/CheckPointSW/CloudGuardIaaS) Check Point CloudGuard Network Github Repository. + +Configure your variables in /terraform/aws/tap/**terraform.tfvars** file as follows: +``` +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +external_subnet_id = "subnet-abc123" +internal_subnet_id = "subnet-def456" +resources_tag_name = "env1" + +// --- TAP Configuration --- +registration_key = "10:10:10:10:10:10" +vxlan_id = 10 +blacklist_tags = { + env = "staging" + state = "stable" +} +schedule_scan_interval = 60 + +// --- EC2 Instance Configuration --- +instance_name = "tap-gateway" +instance_type = "c5.xlarge" +key_name = "publickey" +``` +**main.tf** - Refers to the above configured variables and does not require any changes: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "tap" { + source = "../../modules/tap" + + // --- VPC Network Configuration --- + vpc_id = var.vpc_id + external_subnet_id = var.external_subnet_id + internal_subnet_id = var.internal_subnet_id + resources_tag_name = var.resources_tag_name + + // --- TAP Configuration --- + registration_key = var.registration_key + vxlan_id = var.vxlan_id + blacklist_tags = var.blacklist_tags + schedule_scan_interval = var.schedule_scan_interval + + // --- EC2 Instance Configuration --- + instance_name = var.instance_name + instance_type = var.instance_type + key_name = var.key_name +} +``` +From your tap directory's command line - +* Run 'terraform plan' to generate and show an execution plan +* Run 'terraform apply' to initiate deployment and build the TAP infrastructure +* Run 'terraform destroy' to destroy the terraform-managed infrastructure + +> Find Terraform commands doc [here](https://www.terraform.io/docs/commands/index.html). + +This module creates a Check Point TAP Gateway instance in the VPC specified by the user, +along with traffic mirror filter and target, and two lambda functions: TAP Lambda and TAP Termination Lambda. + +Once the Check Point TAP Gateway instance is deployed, the TAP Lambda is invoked and scans the entire +VPC for mirrorable NITRO instances. + +## Deployment + +First, purchase a [CloudGuard Network security gateway](https://aws.amazon.com/marketplace/pp/B07LB54LFB?qid=1586153579302&sr=0-2&ref_=srh_res_product_title) +with Threat Prevention & SandBlast from the AWS marketplace. +A named customer domain must be provisioned on the Check Point now.checkpoint.com SaaS – +during the Early Availability period, this must be performed by Check Point. +To create a NOW domain fill in the [NOW cloud registration form](https://now.checkpoint.com/register/index.html) and your request will be handled as soon as possible. +You will receive an email with a registration link – click that, and a certificate will be automatically generated and provided to you for download and import into your browser. +(Note: some browsers, e.g. Google Chrome, require a restart for the certificate to be activated – kill all instances of the browser, and restart it.) +Now point your browser at [now.checkpoint.com](https://now.checkpoint.com). You will be directed into your new domain. +Go to the Management > Sentries tab and click 'New' +* The New Sentry pane will open – select 'Virtual’, enter an optional description, verify the time zone, and click ADD +* A new sentry entry will appear. It will be uniquely identified by automatically generated 'Name’ and 'MAC Address’ +* Download the CloudGuard Network TAP Terraform module from [CloudGuard Network Github - TAP module](https://github.com/CheckPointSW/CloudGuardIaaS/tree/master/terraform/aws/modules/tap). +Edit terraform.tfvars file according to the instructions in the [Usage](#Usage) section above, using the sentry’s 'MAC Address’ for the registration_key variable. +* Launch the module using Terraform. As described above, this module creates a Check Point TAP Gateway instance in the VPC specified by the user, along with traffic mirror filter and target, and two lambda functions: 'TAP Lambda' and 'TAP Termination Lambda'. Once the Check Point CloudGuard Network TAP Gateway instance is deployed, the TAP Lambda is invoked and scans the entire VPC for mirrorable NITRO instances that meet the configured selection criteria. +* After up to 20 minutes, the sentry state will change to “Connected” in the NOW portal. +Check the Logs tab to see that network traffic is flowing into the sentry. + +### TAP Lambda + +#### IAM role +The module creates an IAM role for the TAP Lambda, named 'chkp_iam_tap_lambda' suffixed with a uuid. +This role is granted minimum permissions for the Lambda to execute. + +#### Responsibilities + +1. Invoked by Terraform once the Check Point TAP Gateway instance is deployed. + 1. Scans the VPC for mirrorable instances + 2. Creates traffic mirror sessions between the TAP Gateway traffic mirror target + and the primary ENI of non-blacklisted instances + 3. Skips traffic mirror session creation for blacklisted instances + +2. Invoked by an EC2 event: Every instance in the VPC that changes its state to 'Running'. + 1. Updates TAP for triggered instance - If not blacklisted and not TAPed, + creates traffic mirror session to the TAP Gateway traffic mirror target. + If blacklisted and TAPed, deletes traffic mirror session with the TAP Gateway target + 2. Scans VPC and updates TAP for all mirrorable instances (see 2.i) + +3. Invoked by a scheduled event: every X minutes, configured by the 'schedule_scan_interval' variable (default = 60). + 1. Scans the VPC for mirrorable instances + 2. Updates TAP for all mirrorable instances in the VPC (see 2.i) + + +#### Instances blacklisting: + +This module supports tag based blacklist mechanism to avoid TAP for desired instances. + +The Terraform TAP module holds a 'blacklist_tags' variable of type map(string). +The 'blacklist_tags' variable consists of key value pairs representing tag-key and tag-value pairs. + +The TAP Lambda will create traffic mirror sessions only for instances which **do not** hold any of +these tag pairs. Instances with any of these tag pairs will not be TAPed by the TAP Lambda function. +If a blacklisted instance is already TAPed, the TAP Lambda will act accordingly and +delete the traffic mirror session. + +During the solution deployment, the 'blacklist_tags' variable's values are joined to a string in the +following structure: "key1=value1:key2-value2:key3=value3" and so on. +This string is passed as 'TAP_BLACKLIST' environment variable to the TAP Lambda. +You can update the blacklist tags list by editing the TAP Lambda 'TAP_BLACKLIST' environment variable. +The structure "key1=value1:key2-value2:key3=value3" of the variable must be maintained. + + +### TAP Termination Lambda + + This Lambda should be manually invoked **prior** to destroying the Terraform environment. + The environment destruction **will fail** if skipping the Termination Lambda invocation. + +#### IAM role +The module creates an IAM role for the TAP Termination Lambda, named 'chkp_iam_tap_termination_lambda' suffixed with a uuid. +This role is granted minimum permissions for the Lambda to execute. + +#### Responsibilities: + +Lambda deletes all traffic mirror sessions associated with the TAP Gateway's target. +This step is crucial before environment destruction in order for destruction to finish successfully +(an alternative way is to navigate to AWS traffic mirror sessions page and manually +delete the relevant sessions). + + + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------|-----------------------------------------------------------------------------------------------------|-------------|----------------|-------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| external_subnet_id | The external subnet of the security gateway (internet access) | string | n/a | n/a | yes | +| internal_subnet_id | The internal subnet of the security gateway. This subnet will be connected to the mirrored sources. | string | n/a | n/a | yes | +| resources_tag_name | (Optional) Resources prefix tag | string | n/a | "" | no | +| registration_key | The gateway registration key to Check Point NOW cloud | string | n/a | n/a | yes | +| vxlan_id | (Optional) VXLAN ID (number) for mirroring sessions | number | n/a | 1 | no | +| blacklist_tags | Key value pairs of tag key and tag value. Instances with any of these tag pairs will not be TAPed | map(string) | n/a | {} | no | +| schedule_scan_interval | (minutes) Lambda will scan the VPC every X minutes for TAP updates | number | n/a | 60 | no | +| instance_name | AWS instance name to launch | string | n/a | CP-TAP-Gateway-tf | no | +| instance_type | AWS instance type - View [Notes and limitations](#Notes-and-limitations) section | string | n/a | c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | + + +## Outputs +| Name | Description | +|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| tap-gateway_instance_id | The instance id of the deployed Check Point TAP Gateway | +| gateway_instance_name | The instance name of the deployed Check Point TAP Gateway | +| gateway_instance_public_ip | The public ip address of the deployed Check Point TAP Gateway | +| traffic_mirror_filter_id | The traffic mirror filter id created during deployment by the 'tap_target_and_filter' stack | +| traffic_mirror_target_id | The traffic mirror target id pointing to the TAP Gateway's internal ENI - created during deployment by the 'tap_target_and_filter' stack | +| tap_lambda_name | TAP main lambda name (responsible for creating and deleting traffic mirror sessions with the TAP Gateway's target) | +| tap_lambda_description | TAP main lambda description | +| termination_lambda_name | TAP termination lambda name (deletes all traffic mirror sessions with the TAP Gateway's target) | +| termination_lambda_description | TAP termination lambda description | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|----------------------------------------------------------------------------------| +| 20200413 | First release of Check Point Traffic Access Point (TAP) Terraform module for AWS | +| 20210309 | AWS Terraform modules refactor | +| 20210329 | Stability fixes | + + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tap/main.tf b/terraform/aws/tap/main.tf new file mode 100644 index 00000000..b3fac490 --- /dev/null +++ b/terraform/aws/tap/main.tf @@ -0,0 +1,301 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "amis" { + source = "../modules/amis" + + version_license = var.version_license + chkp_type = "gateway" +} + +resource "aws_security_group" "tap_sg" { + description = format("%s Security group", var.resources_tag_name != "" ? var.resources_tag_name : var.instance_name) + vpc_id = var.vpc_id + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + protocol = "tcp" + from_port = 443 + to_port = 443 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + protocol = "tcp" + from_port = 22 + to_port = 22 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { + description = "allow VXLAN for traffic mirroring" + protocol = "udp" + from_port = 4789 + to_port = 4789 + cidr_blocks = ["0.0.0.0/0"] + } + name = format("%s_SecurityGroup", var.resources_tag_name != "" ? var.resources_tag_name : var.instance_name) // Group name + tags = { + Name = format("%s_SecurityGroup", var.resources_tag_name != "" ? var.resources_tag_name : var.instance_name) // Resource name + } +} +resource "aws_network_interface" "external-eni" { + subnet_id = var.external_subnet_id + security_groups = [aws_security_group.tap_sg.id] + description = "eth0" + source_dest_check = false + tags = { + Name = format("%s-external_network_interface", var.resources_tag_name != "" ? var.resources_tag_name : var.instance_name) + } +} +resource "aws_network_interface" "internal-eni" { + subnet_id = var.internal_subnet_id + security_groups = [aws_security_group.tap_sg.id] + description = "eth1" + source_dest_check = false + tags = { + Name = format("%s-internal_network_interface", var.resources_tag_name != "" ? var.resources_tag_name : var.instance_name) + } +} +resource "aws_eip" "eip" { + network_interface = aws_network_interface.external-eni.id +} +resource "aws_instance" "tap_gateway" { + depends_on = [ + aws_network_interface.external-eni, + aws_network_interface.internal-eni, + aws_eip.eip + ] + + ami = module.amis.ami_id + tags = { + Name = var.instance_name + } + instance_type = var.instance_type + key_name = var.key_name + + ebs_block_device { + device_name = "/dev/xvda" + volume_type = "gp2" + volume_size = 100 + } + network_interface { + // external + network_interface_id = aws_network_interface.external-eni.id + device_index = 0 + } + network_interface { + // internal + network_interface_id = aws_network_interface.internal-eni.id + device_index = 1 + } + + user_data = templatefile("${path.module}/tap_user_data.sh", { + // script's arguments + RegistrationKey = var.registration_key + VxlanIds = var.vxlan_id + }) +} + +// Create CloudFormation Stack +resource "random_id" "stack_uuid" { + byte_length = 5 +} +resource "aws_cloudformation_stack" "tap_target_and_filter" { + depends_on = [aws_instance.tap_gateway] + name = format("traffic-mirror-filter-and-target-%s", random_id.stack_uuid.hex) + + parameters = { + MirroringNetworkInterfaceId = aws_network_interface.internal-eni.id + EnvironmentPrefix = var.resources_tag_name + } + template_url = "https://cgi-cfts.s3.amazonaws.com/utils/tap_target_and_filter.yaml" +} +locals { + trafficMirrorTargetId = aws_cloudformation_stack.tap_target_and_filter.outputs["TrafficMirrorTargetId"] + trafficMirrorFilterId = aws_cloudformation_stack.tap_target_and_filter.outputs["TrafficMirrorFilterId"] +} + +// Lambdas +// --- TAP Lambda --- +data "aws_iam_policy_document" "assume_policy_doc" { + statement { + effect = "Allow" + principals { + identifiers = ["lambda.amazonaws.com"] + type = "Service" + } + actions = ["sts:AssumeRole"] + } +} +data "aws_iam_policy_document" "tap_lambda_policy_doc" { + statement { + effect = "Allow" + actions = [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents", + "ec2:DescribeInstances", + "ec2:CreateTags", + "ec2:DeleteTrafficMirrorSession", + "ec2:CreateTrafficMirrorSession", + "ec2:DescribeTrafficMirrorSessions" + ] + resources = ["*"] + } +} +resource "aws_iam_role" "tap_lambda_iam_role" { + name_prefix = "chkp_iam_tap_lambda" + assume_role_policy = data.aws_iam_policy_document.assume_policy_doc.json +} +resource "aws_iam_role_policy" "tap_lambda_policy" { + policy = data.aws_iam_policy_document.tap_lambda_policy_doc.json + role = aws_iam_role.tap_lambda_iam_role.id +} +// Lambda Function +resource "random_id" "tap_lambda_uuid" { + byte_length = 5 +} +data "archive_file" "tap_lambda_zip" { + type = "zip" + source_file = "${path.module}/tap_lambda.py" + output_path = "${path.module}/tap_lambda.zip" +} +locals { + blacklisted_tag_pairs_joined = join(":", [for tag_key in keys(var.blacklist_tags): join("=", [tag_key, var.blacklist_tags[tag_key]])]) +} +resource "aws_lambda_function" "tap_lambda" { + depends_on = [aws_instance.tap_gateway] + function_name = format("chkp_tap_lambda-%s", random_id.tap_lambda_uuid.hex) + description = "The TAP lambda creates traffic mirror sessions with the TAP gateway instance, and removes them for blacklisted instances in the VPC." + + filename = "${path.module}/tap_lambda.zip" + + role = aws_iam_role.tap_lambda_iam_role.arn + handler = "tap_lambda.lambda_handler" + runtime = "python3.8" + timeout = 30 + + environment { + variables = { + VPC_ID = var.vpc_id + GW_ID = aws_instance.tap_gateway.id + TM_TARGET_ID = local.trafficMirrorTargetId + TM_FILTER_ID = local.trafficMirrorFilterId + VNI = var.vxlan_id + TAP_BLACKLIST = local.blacklisted_tag_pairs_joined + } + } +} +// CloudWatch event - EC2 state change to Running +resource "aws_cloudwatch_event_rule" "on_ec2_running_state" { + name_prefix = "tap_ec2_running_rule" + description = "Invoked when an instance changes its state to Running" + event_pattern = </var/log/aws-user-data.log 2>&1 + +echo template_name: TAP_tf >> /etc/cloud-version +echo template_version: 20210309 >> /etc/cloud-version +echo template_type: terraform >> $cv_path + +hname="CP-TAP" + +echo "Generating SIC password" +sic=$(tr -dc "0-9a-zA-Z" < /dev/urandom | head -c 8) + +blink_config -s "hostname='$hname'&gateway_cluster_member=false&ftw_sic_key='$sic'&upload_info=true&download_info=true" +rc=$? + +echo "Pulling NOW install script..." +INSTALLER=/var/log/now_installer + +runtime="10 minute" +endtime=$(date -ud "$runtime" +%s) + +while [[ $(date -u +%s) -le $endtime ]]; do + curl_cli -s -S --cacert "$CPDIR/conf/ca-bundle.crt" https://portal.now.checkpoint.com/static/configure.aws.sh -o $INSTALLER && break + sleep 2 +done + +chmod +x $INSTALLER +dos2unix $INSTALLER +$INSTALLER ${RegistrationKey} ${VxlanIds} >& $FWDIR/log/now_installer.elg + +LOADER=$FWDIR/bin/loadInstaller +echo '' > $LOADER +chmod +x "$LOADER" + +cpwd_admin start -name NOW_HF_LOADER -path "$LOADER" -command loadInstaller -slp_timeout 5 -retry_limit 10 +echo "done" diff --git a/terraform/aws/tap/terraform.tfvars b/terraform/aws/tap/terraform.tfvars new file mode 100644 index 00000000..f6fbebcb --- /dev/null +++ b/terraform/aws/tap/terraform.tfvars @@ -0,0 +1,21 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +external_subnet_id = "subnet-abc123" +internal_subnet_id = "subnet-def456" +resources_tag_name = "env1" + +// --- TAP Configuration --- +registration_key = "10:10:10:10:10:10" +vxlan_id = 10 +blacklist_tags = { + env = "staging" + state = "stable" +} +schedule_scan_interval = 60 + +// --- EC2 Instance Configuration --- +instance_name = "tap-gateway" +instance_type = "c5.xlarge" +key_name = "publickey" diff --git a/terraform/aws/tap/variables.tf b/terraform/aws/tap/variables.tf new file mode 100644 index 00000000..e7e45a6d --- /dev/null +++ b/terraform/aws/tap/variables.tf @@ -0,0 +1,89 @@ +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "external_subnet_id" { + type = string + description = "The external subnet of the security gateway (internet access)" +} +variable "internal_subnet_id" { + type = string + description = "The internal subnet of the security gateway. This subnet will be connected to the mirrored sources." +} +variable "resources_tag_name" { + type = string + description = "(Optional) Resources prefix tag" + default = "" +} + +// --- TAP Configuration --- +variable "registration_key" { + type = string + description = "The gateway registration key to Check Point NOW cloud" +} +variable "vxlan_id" { + type = number + description = "(Optional) VXLAN ID (number) for mirroring sessions - Predefined VTEP number" + default = 1 +} +variable "blacklist_tags" { + type = map(string) + description = "Key value pairs of tag key and tag value. Instances with any of these tag pairs will not be TAPed" + default = {} +} +variable "schedule_scan_interval" { + type = number + description = "(minutes) Lambda will scan the VPC every X minutes for TAP updates" + default = 60 +} + +// --- EC2 Instance Configuration --- +variable "instance_name" { + type = string + description = "AWS instance name to launch" + default = "CP-TAP-Gateway-tf" +} +variable "instance_type" { + type = string + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} + +// --- Check Point Settings --- +variable "version_license" { + type = string + description = "version and license" + default = "R80.40-PAYG-NGTX" +} +module "validate_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.version_license +} diff --git a/terraform/aws/tgw-asg-master/README.md b/terraform/aws/tgw-asg-master/README.md new file mode 100755 index 00000000..7850cebd --- /dev/null +++ b/terraform/aws/tgw-asg-master/README.md @@ -0,0 +1,223 @@ +# Check Point CloudGuard Network Transit Gateway Auto Scaling Group Master Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway Auto Scaling Group for Transit Gateway with an optional Management Server in a new VPC. + +These types of Terraform resources are supported: +* [VPC](https://www.terraform.io/docs/providers/aws/r/vpc.html) +* [Subnet](https://www.terraform.io/docs/providers/aws/r/subnet.html) +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [CloudWatch Metric Alarm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) +* [Launch template](https://www.terraform.io/docs/providers/aws/r/launch_template.html) +* [Auto Scaling Group](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [CloudGuard Network for AWS Transit Gateway R80.10 and Higher Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_AWS_Transit_Gateway/Content/Topics-AWS-TGW-R80-10-AG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/tgw-asg +- /terraform/aws/autoscale +- /terraform/aws/management +- /terraform/aws/cme-iam-role +- /terraform/aws/modules/vpc + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/tgw-asg-master/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/tgw-asg, /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/tgw-asg, /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/tgw-asg-master/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/tgw-asg-master/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + } + subnets_bit_length = 8 + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + + // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-gateway" + gateway_instance_type = "c5.xlarge" + gateways_min_group_size = 2 + gateways_max_group_size = 8 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_cloudwatch = true + asn = "6500" + + // --- Check Point CloudGuard Network Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + management_permissions = "Create with read-write permissions" + management_predefined_role = "" + gateways_blades = true + admin_cidr = "0.0.0.0/0" + gateways_addresses = "0.0.0.0/0" + gateway_management = "Locally managed" + + // --- Automatic Provisioning with Security Management Server Settings --- + control_gateway_over_public_or_private_address = "private" + management_server = "management-server" + configuration_template = "template-name" + ``` + +- Conditional creation + - To create a Security Management server with IAM Role: + ``` + management_permissions = "Create with read permissions" | "Create with read-write permissions" | "Create with assume role permissions (specify an STS role ARN)" + ``` + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Gateway | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | +| management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | +| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | Allow gateways only from this network to communicate with the Security Management Server | string | valid CIDR | n/a | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address | string | - Locally managed
- Over the internet | Locally managed | no | +| control_gateway_over_public_or_private_address | Determines if the gateways are provisioned using their private or public address | string | - private
- public | private | no | +| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | management-server | no | +| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | TGW-ASG-configuration | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| vpc_id | The id of the deployed vpc | +| public_subnets_ids_list | A list of the public subnets ids | +| management_instance_name | The deployed Security Management AWS instance name | +| management_public_ip | The deployed Security Management Server AWS public ip | +| management_url | URL to the portal of the deployed Security Management Server | +| autoscaling_group_name | The name of the deployed AutoScaling Group | +| configuration_template | The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name | +| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------------------------------------------------------------------| +| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-asg-master/locals.tf b/terraform/aws/tgw-asg-master/locals.tf new file mode 100755 index 00000000..54cef511 --- /dev/null +++ b/terraform/aws/tgw-asg-master/locals.tf @@ -0,0 +1,64 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + permissions_allowed_values = [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.management_permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.management_permissions) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.control_gateway_over_public_or_private_address) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + + regex_valid_asn = "^[0-9]+$" + // Will fail if var.asn is invalid + regex_asn = regex(local.regex_valid_asn, var.asn) == var.asn ? 0 : "Variable [asn] must be a valid asn" + + regex_valid_admin_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^[0-9a-zA-Z-._]+$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^[0-9a-zA-Z-._]+$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true +} \ No newline at end of file diff --git a/terraform/aws/tgw-asg-master/main.tf b/terraform/aws/tgw-asg-master/main.tf new file mode 100755 index 00000000..a9fdd06e --- /dev/null +++ b/terraform/aws/tgw-asg-master/main.tf @@ -0,0 +1,55 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +// --- VPC --- +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = {} + subnets_bit_length = var.subnets_bit_length +} + +module "launch_tgw_asg_into_vpc" { + source = "../tgw-asg" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + gateways_subnets = module.launch_vpc.public_subnets_ids_list + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + allow_upload_download = var.allow_upload_download + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + gateways_min_group_size = var.gateways_min_group_size + gateways_max_group_size = var.gateways_max_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + enable_cloudwatch = var.enable_cloudwatch + asn = var.asn + management_deploy = var.management_deploy + management_instance_type = var.management_instance_type + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + management_permissions = var.management_permissions + management_predefined_role = var.management_predefined_role + gateways_blades = var.gateways_blades + admin_cidr = var.admin_cidr + gateways_addresses = var.gateways_addresses + gateway_management = var.gateway_management + control_gateway_over_public_or_private_address = var.control_gateway_over_public_or_private_address + management_server = var.management_server + configuration_template = var.configuration_template +} diff --git a/terraform/aws/tgw-asg-master/output.tf b/terraform/aws/tgw-asg-master/output.tf new file mode 100755 index 00000000..ed183c0a --- /dev/null +++ b/terraform/aws/tgw-asg-master/output.tf @@ -0,0 +1,24 @@ +output "vpc_id" { + value = module.launch_vpc.vpc_id +} +output "public_subnets_ids_list" { + value = module.launch_vpc.public_subnets_ids_list +} +output "management_instance_name" { + value = module.launch_tgw_asg_into_vpc.management_instance_name +} +output "configuration_template" { + value = module.launch_tgw_asg_into_vpc.configuration_template +} +output "controller_name" { + value = module.launch_tgw_asg_into_vpc.controller_name +} +output "management_public_ip" { + value = module.launch_tgw_asg_into_vpc.management_public_ip +} +output "management_url" { + value = module.launch_tgw_asg_into_vpc.management_url +} +output "autoscaling_group_name" { + value = module.launch_tgw_asg_into_vpc.autoscaling_group_name +} diff --git a/terraform/aws/tgw-asg-master/terraform.tfvars b/terraform/aws/tgw-asg-master/terraform.tfvars new file mode 100755 index 00000000..7807cc3d --- /dev/null +++ b/terraform/aws/tgw-asg-master/terraform.tfvars @@ -0,0 +1,47 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 +} +subnets_bit_length = 8 + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-gateway" +gateway_instance_type = "c5.xlarge" +gateways_min_group_size = 2 +gateways_max_group_size = 8 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_cloudwatch = true +asn = "6500" + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +management_permissions = "Create with read-write permissions" +management_predefined_role = "" +gateways_blades = true +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" +gateway_management = "Locally managed" + +// --- Automatic Provisioning with Security Management Server Settings --- +control_gateway_over_public_or_private_address = "private" +management_server = "management-server" +configuration_template = "template-name" \ No newline at end of file diff --git a/terraform/aws/tgw-asg-master/variables.tf b/terraform/aws/tgw-asg-master/variables.tf new file mode 100755 index 00000000..a709a74f --- /dev/null +++ b/terraform/aws/tgw-asg-master/variables.tf @@ -0,0 +1,217 @@ +// Module: Check Point CloudGuard Network Transit Gateway Auto Scaling Group +// Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" + default = true +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_gateway_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "gateways_min_group_size" { + type = number + description = "The minimal number of Security Gateways" + default = 2 +} +variable "gateways_max_group_size" { + type = number + description = "The maximal number of Security Gateways" + default = 10 +} +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "asn" { + type = string + description = "The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways" + default = "6500" +} + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the management instance, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "management_permissions" { + type = string + description = "IAM role to attach to the instance profile" + default = "Create with read-write permissions" +} +variable "management_predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'" + default = "" +} +variable "gateways_blades" { + type = bool + description = "Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later)" + default = true +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address" + default = "Locally managed" +} + +// --- Automatic Provisioning with Security Management Server Settings --- +variable "control_gateway_over_public_or_private_address" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} +variable "management_server" { + type = string + description = "(Optional) The name that represents the Security Management Server in the automatic provisioning configuration" + default = "management-server" +} +variable "configuration_template" { + type = string + description = "(Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration" + default = "TGW-ASG-configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} diff --git a/terraform/aws/tgw-asg-master/versions.tf b/terraform/aws/tgw-asg-master/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-asg-master/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/tgw-asg/README.md b/terraform/aws/tgw-asg/README.md new file mode 100755 index 00000000..540a8d28 --- /dev/null +++ b/terraform/aws/tgw-asg/README.md @@ -0,0 +1,213 @@ +# Check Point CloudGuard Network Transit Gateway Auto Scaling Group Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Gateway Auto Scaling Group for Transit Gateway with an optional Management Server into an existing VPC. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [CloudWatch Metric Alarm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) +* [EIP](https://www.terraform.io/docs/providers/aws/r/eip.html) +* [Launch template](https://www.terraform.io/docs/providers/aws/r/launch_template.html) +* [Auto Scaling Group](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [CloudGuard Network for AWS Transit Gateway R80.10 and Higher Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_AWS_Transit_Gateway/Content/Topics-AWS-TGW-R80-10-AG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale +- /terraform/aws/management +- /terraform/aws/cme-iam-role + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/tgw-asg/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/tgw-asg/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +- Variables are configured in /terraform/aws/tgw-asg/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- Network Configuration --- + vpc_id = "vpc-12345678" + gateways_subnets = ["subnet-123b5678", "subnet-123a4567"] + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + + // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-gateway" + gateway_instance_type = "c5.xlarge" + gateways_min_group_size = 2 + gateways_max_group_size = 8 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + enable_cloudwatch = true + asn = "6500" + + // --- Check Point CloudGuard Network Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + management_permissions = "Create with read-write permissions" + management_predefined_role = "" + gateways_blades = true + admin_cidr = "0.0.0.0/0" + gateways_addresses = "0.0.0.0/0" + gateway_management = "Locally managed" + + // --- Automatic Provisioning with Security Management Server Settings --- + control_gateway_over_public_or_private_address = "private" + management_server = "management-server" + configuration_template = "template-name" + ``` + +- Conditional creation + - To create a Security Management server with IAM Role: + ``` + management_permissions = "Create with read permissions" | "Create with read-write permissions" | "Create with assume role permissions (specify an STS role ARN)" + ``` + - To enable cloudwatch for ASG: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------| +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | list(string) | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Gateway | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | +| management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | +| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | Allow gateways only from this network to communicate with the Security Management Server | string | valid CIDR | n/a | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address | string | - Locally managed
- Over the internet | Locally managed | no | +| control_gateway_over_public_or_private_address | Determines if the gateways are provisioned using their private or public address | string | - private
- public | private | no | +| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | management-server | no | +| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | TGW-ASG-configuration | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------------|--------------------------------------------------------------------------------------------------------| +| management_instance_name | The deployed Security Management AWS instance name | +| management_public_ip | The deployed Security Management Server AWS public ip | +| management_url | URL to the portal of the deployed Security Management Server | +| autoscaling_group_name | The name of the deployed AutoScaling Group | +| configuration_template | The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name | +| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|------------------------------------------------------------------------------------------| +| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230626 | Fixed missing x-chkp-* tags on Auto Scale Group | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-asg/locals.tf b/terraform/aws/tgw-asg/locals.tf new file mode 100755 index 00000000..7ecd5cf4 --- /dev/null +++ b/terraform/aws/tgw-asg/locals.tf @@ -0,0 +1,64 @@ +locals { + permissions_allowed_values = [ + "None (configure later)", + "Use existing (specify an existing IAM role name)", + "Create with assume role permissions (specify an STS role ARN)", + "Create with read permissions", + "Create with read-write permissions"] + // Will fail if var.management_permissions is invalid + validate_permissions = index(local.permissions_allowed_values, var.management_permissions) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.control_gateway_over_public_or_private_address) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + + regex_valid_asn = "^[0-9]+$" + // Will fail if var.asn is invalid + regex_asn = regex(local.regex_valid_asn, var.asn) == var.asn ? 0 : "Variable [asn] must be a valid asn" + + regex_valid_admin_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^[0-9a-zA-Z-._]+$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^[0-9a-zA-Z-._]+$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true +} \ No newline at end of file diff --git a/terraform/aws/tgw-asg/main.tf b/terraform/aws/tgw-asg/main.tf new file mode 100755 index 00000000..8b7b3cf1 --- /dev/null +++ b/terraform/aws/tgw-asg/main.tf @@ -0,0 +1,64 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "autoscale" { + source = "../autoscale" + providers = { + aws = aws + } + + vpc_id = var.vpc_id + subnet_ids = var.gateways_subnets + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + enable_instance_connect = var.enable_instance_connect + metadata_imdsv2_required = var.metadata_imdsv2_required + minimum_group_size = var.gateways_min_group_size + maximum_group_size = var.gateways_max_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = "echo -e '\nStarting Bootstrap script\n'; echo 'Adding tgw identifier to cloud-version'; cv_path='/etc/cloud-version'\n if test -f \"$cv_path\"; then sed -i '/template_name/c\\template_name: autoscale_tgw' /etc/cloud-version; fi; cv_json_path='/etc/cloud-version.json'\n cv_json_path_tmp='/etc/cloud-version-tmp.json'\n if test -f \"$cv_json_path\"; then cat \"$cv_json_path\" | jq '.template_name = \"'\"autoscale_tgw\"'\"' > \"$cv_json_path_tmp\"; mv \"$cv_json_path_tmp\" \"$cv_json_path\"; fi; echo 'Setting ASN to: ${var.asn}'; clish -c 'set as ${var.asn}' -s; echo -e '\nFinished Bootstrap script\n'" + gateways_provision_address_type = var.control_gateway_over_public_or_private_address + management_server = var.management_server + configuration_template = var.configuration_template +} + +data "aws_region" "current"{} + +module "management" { + providers = { + aws = aws + } + count = local.deploy_management_condition ? 1 : 0 + source = "../management" + + vpc_id = var.vpc_id + subnet_id = var.gateways_subnets[0] + management_name = var.management_server + management_instance_type = var.management_instance_type + key_name = var.key_name + allocate_and_associate_eip = true + volume_encryption = var.enable_volume_encryption ? "alias/aws/ebs" : "" + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + iam_permissions = var.management_permissions + predefined_role = var.management_predefined_role + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + allow_upload_download = var.allow_upload_download + admin_cidr = var.admin_cidr + gateway_addresses = var.gateways_addresses + gateway_management = var.gateway_management + management_bootstrap_script = "echo -e '\nStarting Bootstrap script\n'; echo 'Adding tgw identifier to cloud-version'; cv_path='/etc/cloud-version'\n if test -f \"$cv_path\"; then sed -i '/template_name/c\\template_name: management_tgw_asg' /etc/cloud-version; fi; cv_json_path='/etc/cloud-version.json'\n cv_json_path_tmp='/etc/cloud-version-tmp.json'\n if test -f \"$cv_json_path\"; then cat \"$cv_json_path\" | jq '.template_name = \"'\"management_tgw_asg\"'\"' > \"$cv_json_path_tmp\"; mv \"$cv_json_path_tmp\" \"$cv_json_path\"; fi; echo 'Configuring VPN community: tgw-community'; [[ -d /opt/CPcme/menu/additions ]] && /opt/CPcme/menu/additions/config-community.sh \"tgw-community\" || /etc/fw/scripts/autoprovision/config-community.sh \"tgw-community\"; echo 'Setting VPN rules'; mgmt_cli -r true add access-layer name 'Inline'; mgmt_cli -r true add access-rule layer Network position 1 name 'tgw-community VPN Traffic Rule' vpn.directional.1.from 'tgw-community' vpn.directional.1.to 'tgw-community' vpn.directional.2.from 'tgw-community' vpn.directional.2.to External_clear action 'Apply Layer' inline-layer 'Inline'; mgmt_cli -r true add nat-rule package standard position bottom install-on 'Policy Targets' original-source All_Internet translated-source All_Internet method hide; echo 'Creating CME configuration'; autoprov_cfg -f init AWS -mn ${var.management_server} -tn ${var.configuration_template} -cn tgw-controller -po Standard -otp ${var.gateway_SICKey} -r ${data.aws_region.current.name} -ver ${split("-", var.gateway_version)[0]} -iam -dt TGW; autoprov_cfg -f set controller AWS -cn tgw-controller -sv -com tgw-community; autoprov_cfg -f set template -tn ${var.configuration_template} -vpn -vd '''' -con tgw-community; ${var.gateways_blades} && autoprov_cfg -f set template -tn ${var.configuration_template} -ia -ips -appi -av -ab; echo -e '\nFinished Bootstrap script\n'" +} \ No newline at end of file diff --git a/terraform/aws/tgw-asg/output.tf b/terraform/aws/tgw-asg/output.tf new file mode 100755 index 00000000..8a282a53 --- /dev/null +++ b/terraform/aws/tgw-asg/output.tf @@ -0,0 +1,18 @@ +output "management_instance_name" { + value = module.management[0].management_instance_name +} +output "configuration_template" { + value = var.configuration_template +} +output "controller_name" { + value = "tgw-controller" +} +output "management_public_ip" { + value = module.management[0].management_public_ip +} +output "management_url" { + value = module.management[0].management_url +} +output "autoscaling_group_name" { + value = module.autoscale.autoscale_autoscaling_group_name +} diff --git a/terraform/aws/tgw-asg/terraform.tfvars b/terraform/aws/tgw-asg/terraform.tfvars new file mode 100755 index 00000000..9bdbb84e --- /dev/null +++ b/terraform/aws/tgw-asg/terraform.tfvars @@ -0,0 +1,43 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- Network Configuration --- +vpc_id = "vpc-12345678" +gateways_subnets = ["subnet-123b5678", "subnet-123a4567"] + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-gateway" +gateway_instance_type = "c5.xlarge" +gateways_min_group_size = 2 +gateways_max_group_size = 8 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +enable_cloudwatch = true +asn = "65000" + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "12345678" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +management_permissions = "Create with read-write permissions" +management_predefined_role = "" +gateways_blades = true +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" +gateway_management = "Locally managed" + +// --- Automatic Provisioning with Security Management Server Settings --- +control_gateway_over_public_or_private_address = "private" +management_server = "management-server" +configuration_template = "template-name" \ No newline at end of file diff --git a/terraform/aws/tgw-asg/variables.tf b/terraform/aws/tgw-asg/variables.tf new file mode 100755 index 00000000..9a9a47e1 --- /dev/null +++ b/terraform/aws/tgw-asg/variables.tf @@ -0,0 +1,211 @@ +// Module: Check Point CloudGuard Network Transit Gateway Auto Scaling Group +// Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- Network Configuration --- +variable "vpc_id" { + type = string +} +variable "gateways_subnets" { + type = list(string) + description = "Select at least 2 external subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet" +} + +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" + default = true +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +// --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Gateway" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_gateway_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "gateways_min_group_size" { + type = number + description = "The minimal number of Security Gateways" + default = 2 +} +variable "gateways_max_group_size" { + type = number + description = "The maximal number of Security Gateways" + default = 10 +} +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "asn" { + type = string + description = "The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways" + default = "6500" +} + +// --- Check Point CloudGuard Network Security Management Server Configuration --- +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "(optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here)." + type = string + default = "" +} +variable "management_permissions" { + type = string + description = "IAM role to attach to the instance profile" + default = "Create with read-write permissions" +} +variable "management_predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing'" + default = "" +} +variable "gateways_blades" { + type = bool + description = "Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later)" + default = true +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address" + default = "Locally managed" +} + +// --- Automatic Provisioning with Security Management Server Settings --- +variable "control_gateway_over_public_or_private_address" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} +variable "management_server" { + type = string + description = "(Optional) The name that represents the Security Management Server in the automatic provisioning configuration" + default = "management-server" +} +variable "configuration_template" { + type = string + description = "(Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration" + default = "TGW-ASG-configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} diff --git a/terraform/aws/tgw-asg/versions.tf b/terraform/aws/tgw-asg/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-asg/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/tgw-cross-az-cluster-master/README.md b/terraform/aws/tgw-cross-az-cluster-master/README.md new file mode 100755 index 00000000..937444d8 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/README.md @@ -0,0 +1,210 @@ +# Check Point CloudGuard Network Security Cross AZ Cluster for Transit Gateway Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cross AZ Cluster with a new VPC on AWS for Transit Gateway. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Default.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cluster/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cluster/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply -target=aws_route_table.private_subnet_rtb -auto-approve && terraform apply + ``` + + - Variables are configured in /terraform/aws/cluster/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + } + private_subnets_map = { + "us-east-1a" = 3 + "us-east-1b" = 4 + } + tgw_subnets_map = { + "us-east-1a" = 5 + "us-east-1b" = 6 + } + subnets_bit_length = 8 + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to each cluster member instance: + ``` + allocate_and_associate_eip = "true" + ``` + - To create IAM Role: + ``` + predefined_role = "" + ``` + - To create route from '0.0.0.0/0' to the Active Cluster member instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | +| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------|-----------------------------------| +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | +| 20221229 | Removed unsupported versions | +| 20221123 | R81.20 version support | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-cross-az-cluster-master/locals.tf b/terraform/aws/tgw-cross-az-cluster-master/locals.tf new file mode 100755 index 00000000..387fb7c1 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/locals.tf @@ -0,0 +1,61 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + create_iam_role = var.predefined_role == "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) +} diff --git a/terraform/aws/tgw-cross-az-cluster-master/main.tf b/terraform/aws/tgw-cross-az-cluster-master/main.tf new file mode 100755 index 00000000..d04b9548 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/main.tf @@ -0,0 +1,73 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = var.private_subnets_map + tgw_subnets_map = var.tgw_subnets_map + subnets_bit_length = var.subnets_bit_length +} +resource "aws_route_table" "private_subnet_rtb" { + depends_on = [module.launch_vpc] + vpc_id = module.launch_vpc.vpc_id + tags = { + Name = "Private Subnets Route Table" + } +} +resource "aws_route_table_association" "private_rtb_to_private_subnet1" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[0] +} +resource "aws_route_table_association" "private_rtb_to_private_subnet2" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + route_table_id = aws_route_table.private_subnet_rtb.id + subnet_id = module.launch_vpc.private_subnets_ids_list[1] +} +module "tgw_cluster_into_vpc" { + depends_on = [module.launch_vpc, aws_route_table.private_subnet_rtb] + source = "../tgw-cross-az-cluster" + providers = { + aws = aws + } + + vpc_id = module.launch_vpc.vpc_id + public_subnet_1 = module.launch_vpc.public_subnets_ids_list[0] + public_subnet_2 = module.launch_vpc.public_subnets_ids_list[1] + private_subnet_1 = module.launch_vpc.private_subnets_ids_list[0] + private_subnet_2 = module.launch_vpc.private_subnets_ids_list[1] + tgw_subnet_1_id = module.launch_vpc.tgw_subnets_ids_list[0] + tgw_subnet_2_id =module.launch_vpc.tgw_subnets_ids_list[1] + private_route_table = aws_route_table.private_subnet_rtb.id + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + predefined_role = var.predefined_role + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + memberAToken = var.memberAToken + memberBToken = var.memberBToken + resources_tag_name = var.resources_tag_name + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + volume_type = var.volume_type +} diff --git a/terraform/aws/tgw-cross-az-cluster-master/output.tf b/terraform/aws/tgw-cross-az-cluster-master/output.tf new file mode 100755 index 00000000..fd143a67 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/output.tf @@ -0,0 +1,30 @@ +output "cluster_public_ip" { + value = module.tgw_cluster_into_vpc.cluster_public_ip +} +output "member_a_public_ip" { + value = module.tgw_cluster_into_vpc.member_a_public_ip +} +output "member_b_public_ip" { + value = module.tgw_cluster_into_vpc.member_b_public_ip +} +output "member_a_ssh" { + value = module.tgw_cluster_into_vpc.member_a_ssh +} +output "member_b_ssh" { + value = module.tgw_cluster_into_vpc.member_b_ssh +} +output "member_a_url" { + value = module.tgw_cluster_into_vpc.member_a_url +} +output "member_b_url" { + value = module.tgw_cluster_into_vpc.member_b_url +} +output "member_a_eni" { + value = module.tgw_cluster_into_vpc.member_a_eni +} +output "member_b_eni" { + value = module.tgw_cluster_into_vpc.member_b_eni +} +output "vpc_id" { + value = module.launch_vpc.vpc_id +} diff --git a/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars b/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars new file mode 100755 index 00000000..2a1fee10 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars @@ -0,0 +1,48 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.29.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 +} +private_subnets_map = { + "us-east-1a" = 3 + "us-east-1b" = 4 +} +tgw_subnets_map = { + "us-east-1a" = 5 + "us-east-1b" = 6 +} +subnets_bit_length = 8 + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true + +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/tgw-cross-az-cluster-master/variables.tf b/terraform/aws/tgw-cross-az-cluster-master/variables.tf new file mode 100755 index 00000000..1485389b --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/variables.tf @@ -0,0 +1,200 @@ +// Module: Check Point CloudGuard Network Security Cluster into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// ---VPC Network Configuration --- +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +resource "null_resource" "tgw_availability_zones_validation1" { + count = length(var.public_subnets_map) == 2 ? 0 : "variable public_subnets_map size must be equal to variable 2" +} +variable "private_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 2} ) " +} +resource "null_resource" "tgw_availability_zones_validation2" { + count = length(var.private_subnets_map) == 2 ? 0 : "variable private_subnets_map size must be equal to variable 2" +} +variable "tgw_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3} ) " +} +resource "null_resource" "tgw_availability_zones_validation3" { + count = length(var.tgw_subnets_map) == 2 ? 0 : "variable tgw_subnets_map size must be equal to variable 2" +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} + + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/tgw-cross-az-cluster-master/versions.tf b/terraform/aws/tgw-cross-az-cluster-master/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster-master/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/tgw-cross-az-cluster/README.md b/terraform/aws/tgw-cross-az-cluster/README.md new file mode 100755 index 00000000..1dcb1b0c --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/README.md @@ -0,0 +1,205 @@ +# Check Point CloudGuard Network Security Cross AZ Cluster for Transit Gateway Terraform module for AWS + +Terraform module which deploys a Check Point CloudGuard Network Security Cross AZ Cluster into an existing VPC on AWS for Transit Gateway. + +These types of Terraform resources are supported: +* [AWS Instance](https://www.terraform.io/docs/providers/aws/r/instance.html) +* [Security Group](https://www.terraform.io/docs/providers/aws/r/security_group.html) +* [Network interface](https://www.terraform.io/docs/providers/aws/r/network_interface.html) +* [IAM Role](https://www.terraform.io/docs/providers/aws/r/iam_role.html) - conditional creation + +See the [Deploying a Check Point Cluster in AWS (Amazon Web Services)](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Default.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/modules/amis +- /terraform/aws/modules/cluster-iam-role + + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/cluster/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/cluster/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + + - Variables are configured in /terraform/aws/cluster/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-1234" + public_subnet_1 = "subnet-1234" + public_subnet_2 = "subnet-2345" + private_subnet_1 = "subnet-3456" + private_subnet_2 = "subnet-4567" + tgw_subnet_1_id = "subnet-5678" + tgw_subnet_2_id = "subnet-6789" + private_route_table = "" + + // --- EC2 Instance Configuration --- + gateway_name = "Check-Point-Cluster-tf" + gateway_instance_type = "c5.xlarge" + key_name = "publickey" + allocate_and_associate_eip = true + volume_size = 100 + volume_encryption = "alias/aws/ebs" + enable_instance_connect = false + disable_instance_termination = false + instance_tags = { + key1 = "value1" + key2 = "value2" + } + predefined_role = "" + + // --- Check Point Settings --- + gateway_version = "R81.20-BYOL" + admin_shell = "/etc/cli.sh" + gateway_SICKey = "12345678" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + + // --- Quick connect to Smart-1 Cloud (Recommended) --- + memberAToken = "" + memberBToken = "" + + // --- Advanced Settings --- + resources_tag_name = "tag-name" + gateway_hostname = "gw-hostname" + allow_upload_download = true + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + primary_ntp = "" + secondary_ntp = "" + ``` + +- Conditional creation + - To create an Elastic IP and associate it to each cluster member instance: + ``` + allocate_and_associate_eip = "true" + ``` + - To create IAM Role: + ``` + predefined_role = "" + ``` + - To create route from '0.0.0.0/0' to the Active Cluster member instance, please provide route table: + ``` + private_route_table = "rtb-12345678" + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + ### Optional re-deploy of cluster member: + In case of re-deploying one cluster member, make sure that it's in STANDBY state, and the second member is the ACTIVE one. + Follow the commands below in order to re-deploy (replace MEMBER with a or b): + - terraform taint aws_instance.member-MEMBER-instance + - terraform plan (review the changes) + - terraform apply + - In Smart Console: reset SIC with the re-deployed member and install policy + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | +| tgw_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | +| tgw_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|--------------------|-----------------------------------| +| cluster_public_ip | The public address of the cluster | +| member_a_public_ip | The public address of member A | +| member_b_public_ip | The public address of member B | +| member_a_ssh | SSH command to member A | +| member_b_ssh | SSH command to member B | +| member_a_url | URL to the member A portal | +| member_b_url | URL to the member B portal | + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | +| 20221123 | R81.20 version support | +| 20221229 | Removed unsupported versions | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20230503 | Smart-1 Cloud token validation | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-cross-az-cluster/locals.tf b/terraform/aws/tgw-cross-az-cluster/locals.tf new file mode 100755 index 00000000..9a9929b7 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/locals.tf @@ -0,0 +1,60 @@ +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + create_iam_role = var.predefined_role == "" ? 1 : 0 + provided_roue_table = var.private_route_table == "" ? 0 : 1 + internal_route_table_condition = var.private_route_table != "" ? 1 : 0 + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + is_both_tokens_used = length(var.memberAToken) > 0 == length(var.memberBToken) > 0 + validation_message_both = "Smart-1 Cloud Tokens for member A and member B can not be empty." + //Will fail if var.memberAToken is empty and var.memberBToken isn't and vice versa + regex_s1c_validate = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.memberAToken) > 0 + is_both_tokens_the_same = var.memberAToken == var.memberBToken + validation_message_unique = "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" + //Will fail if both s1c tokens are the same + regex_s1c_unique = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" + + regex_valid_gateway_hostname = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.gateway_hostname is invalid + regex_gateway_hostname = regex(local.regex_valid_gateway_hostname, var.gateway_hostname) == var.gateway_hostname ? 0 : "Variable [gateway_hostname] must be a valid hostname label or an empty string" + volume_encryption_condition = var.volume_encryption != "" ? true : false + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_primary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.primary_ntp is invalid + regex_primary_ntp = regex(local.regex_valid_primary_ntp, var.primary_ntp) == var.primary_ntp ? 0 : "Variable [primary_ntp] must be a valid ntp" + + regex_valid_secondary_ntp = "^[\\.a-zA-Z0-9\\-]*$" + // Will fail if var.secondary_ntp is invalid + regex_secondary_ntp = regex(local.regex_valid_secondary_ntp, var.secondary_ntp) == var.secondary_ntp ? 0 : "Variable [secondary_ntp] must be a valid ntp" + + gateway_bootstrap_script64 = base64encode(var.gateway_bootstrap_script) + //Splits the version and licence and returns the os version + version_split = element(split("-", var.gateway_version), 0) + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) +} diff --git a/terraform/aws/tgw-cross-az-cluster/main.tf b/terraform/aws/tgw-cross-az-cluster/main.tf new file mode 100755 index 00000000..4ae319ab --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/main.tf @@ -0,0 +1,62 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + + +module "cluster_into_vpc" { + source = "../cross-az-cluster" + providers = { + aws = aws + } + + vpc_id = var.vpc_id + public_subnet_ids = tolist([var.public_subnet_1, var.public_subnet_2]) + private_subnet_ids = tolist([var.private_subnet_1, var.private_subnet_2]) + private_route_table = var.private_route_table + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + key_name = var.key_name + volume_size = var.volume_size + volume_encryption = var.volume_encryption + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + instance_tags = var.instance_tags + predefined_role = var.predefined_role + gateway_version = var.gateway_version + admin_shell = var.admin_shell + gateway_SICKey = var.gateway_SICKey + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + memberAToken = var.memberAToken + memberBToken = var.memberBToken + resources_tag_name = var.resources_tag_name + gateway_hostname = var.gateway_hostname + allow_upload_download = var.allow_upload_download + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + primary_ntp = var.primary_ntp + secondary_ntp = var.secondary_ntp + volume_type = var.volume_type +} +resource "aws_route_table" "tgw_route_table" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + network_interface_id = module.cluster_into_vpc.member_a_eni + } + tags = { + Name = "TGW Attachment Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "tgw_attachment1_rtb_assoc" { + subnet_id = var.tgw_subnet_1_id + route_table_id = aws_route_table.tgw_route_table.id +} +resource "aws_route_table_association" "tgw_attachment2_rtb_assoc" { + subnet_id = var.tgw_subnet_2_id + route_table_id = aws_route_table.tgw_route_table.id +} \ No newline at end of file diff --git a/terraform/aws/tgw-cross-az-cluster/output.tf b/terraform/aws/tgw-cross-az-cluster/output.tf new file mode 100755 index 00000000..2aa6d333 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/output.tf @@ -0,0 +1,27 @@ +output "cluster_public_ip" { + value = module.cluster_into_vpc.cluster_public_ip +} +output "member_a_public_ip" { + value = module.cluster_into_vpc.member_a_public_ip +} +output "member_b_public_ip" { + value = module.cluster_into_vpc.member_b_public_ip +} +output "member_a_eni" { + value = module.cluster_into_vpc.member_a_eni +} +output "member_a_ssh" { + value = module.cluster_into_vpc.member_a_ssh +} +output "member_b_ssh" { + value = module.cluster_into_vpc.member_b_ssh +} +output "member_a_url" { + value = module.cluster_into_vpc.member_a_url +} +output "member_b_url" { + value = module.cluster_into_vpc.member_b_url +} +output "member_b_eni" { + value = module.cluster_into_vpc.member_b_eni +} \ No newline at end of file diff --git a/terraform/aws/tgw-cross-az-cluster/terraform.tfvars b/terraform/aws/tgw-cross-az-cluster/terraform.tfvars new file mode 100755 index 00000000..c1008d0d --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/terraform.tfvars @@ -0,0 +1,43 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-1234" +public_subnet_1 = "subnet-1234" +public_subnet_2 = "subnet-2345" +private_subnet_1 = "subnet-3456" +private_subnet_2 = "subnet-4567" +tgw_subnet_1_id = "subnet-5678" +tgw_subnet_2_id = "subnet-6789" +private_route_table = "" + +// --- EC2 Instance Configuration --- +gateway_name = "Check-Point-Cluster-tf" +gateway_instance_type = "c5.xlarge" +key_name = "publickey" +volume_size = 100 +volume_encryption = "alias/aws/ebs" +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true + +predefined_role = "" + +// --- Check Point Settings --- +gateway_version = "R81.20-BYOL" +admin_shell = "/etc/cli.sh" +gateway_SICKey = "12345678" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + +// --- Quick connect to Smart-1 Cloud (Recommended) --- +memberAToken = "" +memberBToken = "" + +// --- Advanced Settings --- +resources_tag_name = "tag-name" +gateway_hostname = "gw-hostname" +allow_upload_download = true +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" +primary_ntp = "" +secondary_ntp = "" \ No newline at end of file diff --git a/terraform/aws/tgw-cross-az-cluster/variables.tf b/terraform/aws/tgw-cross-az-cluster/variables.tf new file mode 100755 index 00000000..eb330795 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/variables.tf @@ -0,0 +1,201 @@ +// Module: Check Point CloudGuard Network Security Cluster into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// --- VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "public_subnet_1" { + type = string + description = "The public subnet ID of the cluster that located in the 1st Availability Zone" +} +variable "public_subnet_2" { + type = string + description = "The public subnet of the cluster that located in the 2st Availability Zone" +} +variable "private_subnet_1" { + type = string + description = "The private subnet of the cluster that located in the 1st Availability Zone" +} +variable "private_subnet_2" { + type = string + description = "The private subnet of the cluster that located in the 2st Availability Zone" +} +variable "tgw_subnet_1_id" { + type = string + description = "The TGW attachment subnet ID located in the 1st Availability Zone" +} +variable "tgw_subnet_2_id" { + type = string + description = "The TGW attachment subnet ID located in the 2st Availability Zone" +} +variable "private_route_table" { + type = string + description = "(Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route" + default= "" +} + +// --- EC2 Instance Configuration --- +variable "gateway_name" { + type = string + description = "(Optional) The name tag of the Security Gateway instances" + default = "Check-Point-Cluster-tf" +} +variable "gateway_instance_type" { + type = string + description = "The instance type of the Security Gateways" + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instance" +} +variable "allocate_and_associate_eip" { + type = bool + description = "If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Volume Size validation - resource will not be created if the volume size is smaller than 100 + count = var.volume_size >= 100 ? 0 : "volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "volume_encryption" { + type = string + description = "KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs')" + default = "alias/aws/ebs" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "instance_tags" { + type = map(string) + description = "(Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances" + default = {} +} +variable "predefined_role" { + type = string + description = "(Optional) A predefined IAM role to attach to the cluster profile" + default = "" +} + +// --- Check Point Settings --- +variable "gateway_version" { + type = string + description = "Gateway version and license" + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gateway" + version_license = var.gateway_version +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters" +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +// --- Quick connect to Smart-1 Cloud (Recommended) --- +variable "memberAToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} +variable "memberBToken" { + type = string + description = "Follow the instructions in sk180501 to quickly connect this Cross AZ Cluster to Smart-1 Cloud." +} + +// --- Advanced Settings --- +variable "resources_tag_name" { + type = string + description = "(Optional) Name tag prefix of the resources" + default = "" +} +variable "gateway_hostname" { + type = string + description = "(Optional) The host name will be appended with member-a/b accordingly" + default = "" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics" + default = false +} +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} +variable "primary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol primary server" + default = "169.254.169.123" +} +variable "secondary_ntp" { + type = string + description = "(Optional) The IPv4 addresses of Network Time Protocol secondary server" + default = "0.pool.ntp.org" +} diff --git a/terraform/aws/tgw-cross-az-cluster/versions.tf b/terraform/aws/tgw-cross-az-cluster/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-cross-az-cluster/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/tgw-gwlb-master/README.md b/terraform/aws/tgw-gwlb-master/README.md new file mode 100755 index 00000000..fa8a0ffd --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/README.md @@ -0,0 +1,264 @@ +# Check Point CloudGuard Network Gateway Load Balancer for Transit Gateway Terraform Master module for AWS + +Terraform module which deploys an AWS Auto Scaling group configured for Gateway Load Balancer into new Centralized Security VPC for Transit Gateway. + +These types of Terraform resources are supported: +* [AWS Instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) +* [Security Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) +* [Load Balancer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) +* [Load Balancer Target Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) +* [Launch template](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) +* [Auto Scaling Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) +* [IAM Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) - conditional creation + +See the [Check Point CloudGuard Gateway Load Balancer on AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_AWS_Centralized_Gateway_Load_Balancer/Content/Topics-AWS-GWLB-VPC-DG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale-gwlb +- /terraform/aws/modules/vpc +- /terraform/aws/management +- /terraform/aws/cme-iam-role-gwlb +- /terraform/aws/modules/amis +- /terraform/aws/gwlb + +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale-gwlb, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/gwlb/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` + - Create or modify the deployment: + ``` + terraform apply + ``` + + - Variables are configured in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_cidr = "10.0.0.0/16" + public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + "us-east-1c" = 3 + "us-east-1d" = 4 + } + tgw_subnets_map = { + "us-east-1a" = 5 + "us-east-1b" = 6 + "us-east-1c" = 7 + "us-east-1d" = 8 + } + subnets_bit_length = 8 + + availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d"] + number_of_AZs = 4 + + nat_gw_subnet_1_cidr ="10.0.13.0/24" + nat_gw_subnet_2_cidr = "10.0.23.0/24" + nat_gw_subnet_3_cidr = "10.0.33.0/24" + nat_gw_subnet_4_cidr = "10.0.43.0/24" + + gwlbe_subnet_1_cidr = "10.0.14.0/24" + gwlbe_subnet_2_cidr = "10.0.24.0/24" + gwlbe_subnet_3_cidr = "10.0.34.0/24" + gwlbe_subnet_4_cidr = "10.0.44.0/24" + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + volume_size = 100 + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + management_server = "CP-Management-gwlb-tf" + configuration_template = "gwlb-configuration" + admin_shell = "/etc/cli.sh" + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = "gwlb1" + target_group_name = "tg1" + enable_cross_zone_load_balancing = "true" + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-GW-tf" + gateway_instance_type = "c5.xlarge" + minimum_group_size = 2 + maximum_group_size = 10 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + gateways_provision_address_type = "private" + allocate_public_IP = false + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateway_management = "Locally managed" + admin_cidr = "0.0.0.0/0" + gateways_addresses = "0.0.0.0/0" + + // --- Other parameters --- + volume_type = "gp3" + ``` + +- Conditional creation + - To enable cloudwatch for tgw-gwlb-master: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | +| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | +| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | +| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | +| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | +| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | +| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | +| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | +| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | +| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|---------------------|---------------------------------------------------------------------------------------| +| managment_public_ip | The deployed Security Management AWS instance public IP | +| load_balancer_url | The URL of the external Load Balancer | +| template_name | Name of a gateway configuration template in the automatic provisioning configuration. | +| controller_name | The controller name in CME. | +| gwlb_name | The name of the deployed Gateway Load Balancer | +| gwlb_service_name | The service name for the deployed Gateway Load Balancer | +| gwlb_arn | The arn for the deployed Gateway Load Balancer | + + + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|----------------------------------------------------------------------------------------------------------------------------| +| 20220414 | First release of Check Point CloudGuar d Network Gateway Load Balancer for Transit Gateway Master Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-gwlb-master/locals.tf b/terraform/aws/tgw-gwlb-master/locals.tf new file mode 100755 index 00000000..d75eeaa5 --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/locals.tf @@ -0,0 +1,62 @@ +locals { + regex_valid_vpc_cidr = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(1[6-9]|2[0-8]))$" + // Will fail if var.vpc_cidr is invalid + regex_vpc_cidr = regex(local.regex_valid_vpc_cidr, var.vpc_cidr) == var.vpc_cidr ? 0 : "Variable [vpc_cidr] must be a valid vpc cidr" + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.gateways_provision_address_type) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + + regex_valid_admin_cidr = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.volume_type] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) + + + #note: we need to add validiation for every subnet in masters solution +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb-master/main.tf b/terraform/aws/tgw-gwlb-master/main.tf new file mode 100755 index 00000000..3b616ebc --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/main.tf @@ -0,0 +1,85 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + +module "launch_vpc" { + source = "../modules/vpc" + + vpc_cidr = var.vpc_cidr + public_subnets_map = var.public_subnets_map + private_subnets_map = {} + tgw_subnets_map = var.tgw_subnets_map + subnets_bit_length = var.subnets_bit_length +} +module "tgw-gwlb"{ + source = "../tgw-gwlb" + providers = { + aws = aws + } + vpc_id = module.launch_vpc.vpc_id + gateways_subnets = module.launch_vpc.public_subnets_ids_list + number_of_AZs = var.number_of_AZs + availability_zones = var.availability_zones + internet_gateway_id = module.launch_vpc.aws_igw + + transit_gateway_attachment_subnet_1_id = element(module.launch_vpc.tgw_subnets_ids_list, 0) + transit_gateway_attachment_subnet_2_id = element(module.launch_vpc.tgw_subnets_ids_list, 1) + transit_gateway_attachment_subnet_3_id = var.number_of_AZs >= 3 ? element(module.launch_vpc.tgw_subnets_ids_list, 2) : "" + transit_gateway_attachment_subnet_4_id = var.number_of_AZs >= 4 ? element(module.launch_vpc.tgw_subnets_ids_list, 3) : "" + + nat_gw_subnet_1_cidr = var.nat_gw_subnet_1_cidr + nat_gw_subnet_2_cidr = var.nat_gw_subnet_2_cidr + nat_gw_subnet_3_cidr = var.nat_gw_subnet_3_cidr + nat_gw_subnet_4_cidr = var.nat_gw_subnet_4_cidr + + gwlbe_subnet_1_cidr = var.gwlbe_subnet_1_cidr + gwlbe_subnet_2_cidr = var.gwlbe_subnet_2_cidr + gwlbe_subnet_3_cidr = var.gwlbe_subnet_3_cidr + gwlbe_subnet_4_cidr = var.gwlbe_subnet_4_cidr + + // --- General Settings --- + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + volume_size = var.volume_size + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + allow_upload_download = var.allow_upload_download + management_server = var.management_server + configuration_template = var.configuration_template + admin_shell = var.admin_shell + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = var.gateway_load_balancer_name + target_group_name = var.target_group_name + enable_cross_zone_load_balancing = var.enable_cross_zone_load_balancing + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + minimum_group_size = var.minimum_group_size + maximum_group_size = var.maximum_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + gateways_provision_address_type = var.gateways_provision_address_type + allocate_public_IP = var.allocate_public_IP + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = var.management_deploy + management_instance_type = var.management_instance_type + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + gateways_policy = var.gateways_policy + gateway_management = var.gateway_management + admin_cidr = var.admin_cidr + gateways_addresses = var.gateways_addresses + + volume_type = var.volume_type +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb-master/output.tf b/terraform/aws/tgw-gwlb-master/output.tf new file mode 100755 index 00000000..67085776 --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/output.tf @@ -0,0 +1,24 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} +output "management_public_ip" { + depends_on = [module.tgw-gwlb] + value = module.tgw-gwlb[*].management_public_ip +} +output "gwlb_arn" { + depends_on = [module.tgw-gwlb] + value = module.tgw-gwlb[*].gwlb_arn +} +output "gwlb_service_name" { + depends_on = [module.tgw-gwlb] + value = module.tgw-gwlb[*].gwlb_service_name +} +output "gwlb_name" { + value = var.gateway_load_balancer_name +} +output "controller_name" { + value = "gwlb-controller" +} +output "template_name" { + value = var.configuration_template +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb-master/terraform.tfvars b/terraform/aws/tgw-gwlb-master/terraform.tfvars new file mode 100755 index 00000000..bdb7a361 --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/terraform.tfvars @@ -0,0 +1,76 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_cidr = "10.0.0.0/16" +public_subnets_map = { + "us-east-1a" = 1 + "us-east-1b" = 2 + "us-east-1c" = 3 + "us-east-1d" = 4 +} +tgw_subnets_map = { + "us-east-1a" = 5 + "us-east-1b" = 6 + "us-east-1c" = 7 + "us-east-1d" = 8 +} +subnets_bit_length = 8 + +availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d"] +number_of_AZs = 4 + +nat_gw_subnet_1_cidr = "10.0.13.0/24" +nat_gw_subnet_2_cidr = "10.0.23.0/24" +nat_gw_subnet_3_cidr = "10.0.33.0/24" +nat_gw_subnet_4_cidr = "10.0.43.0/24" + +gwlbe_subnet_1_cidr = "10.0.14.0/24" +gwlbe_subnet_2_cidr = "10.0.24.0/24" +gwlbe_subnet_3_cidr = "10.0.34.0/24" +gwlbe_subnet_4_cidr = "10.0.44.0/24" + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +volume_size = 100 +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +management_server = "CP-Management-gwlb-tf" +configuration_template = "gwlb-configuration" +admin_shell = "/etc/cli.sh" + +// --- Gateway Load Balancer Configuration --- +gateway_load_balancer_name = "gwlb1" +target_group_name = "tg1" +enable_cross_zone_load_balancing = "true" + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-GW-tf" +gateway_instance_type = "c5.xlarge" +minimum_group_size = 2 +maximum_group_size = 10 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +gateways_provision_address_type = "private" +allocate_public_IP = false +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Other parameters --- +volume_type = "gp3" + diff --git a/terraform/aws/tgw-gwlb-master/variables.tf b/terraform/aws/tgw-gwlb-master/variables.tf new file mode 100755 index 00000000..af425811 --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/variables.tf @@ -0,0 +1,326 @@ +// Module: Check Point CloudGuard Network Gateway Load Balancer into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// ---VPC Network Configuration --- +variable "number_of_AZs" { + type = number + description = "Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter" + default = 2 +} +variable "availability_zones"{ + type = list(string) + description = "The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved)" +} +resource "null_resource" "tgw_availability_zones_validation1" { + count = var.number_of_AZs == length(var.availability_zones) ? 0 : "variable availability_zones list size must be equal to variable num_of_AZs" +} +variable "vpc_cidr" { + type = string + description = "The CIDR block of the VPC" + default = "10.0.0.0/16" +} +variable "public_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +resource "null_resource" "tgw_availability_zones_validation2" { + count = var.number_of_AZs == length(var.public_subnets_map) ? 0 : "variable public_subnets_map size must be equal to variable num_of_AZs" +} +variable "subnets_bit_length" { + type = number + description = "Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20" +} +variable "tgw_subnets_map" { + type = map(string) + description = "A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) " +} +resource "null_resource" "tgw_availability_zones_validation3" { + count = var.number_of_AZs == length(var.tgw_subnets_map) ? 0 : "variable tgw_subnets_map size must be equal to variable num_of_AZs" +} +variable "nat_gw_subnet_1_cidr" { + type = string + description = "CIDR block for NAT subnet 1 located in the 1st Availability Zone" + default = "10.0.13.0/24" +} +variable "nat_gw_subnet_2_cidr" { + type = string + description = "CIDR block for NAT subnet 2 located in the 2st Availability Zone" + default = "10.0.23.0/24" +} +variable "nat_gw_subnet_3_cidr" { + type = string + description = "CIDR block for NAT subnet 3 located in the 3st Availability Zone" + default = "10.0.33.0/24" +} +variable "nat_gw_subnet_4_cidr" { + type = string + description = "CIDR block for NAT subnet 4 located in the 4st Availability Zone" + default = "10.0.43.0/24" +} +variable "gwlbe_subnet_1_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 1 located in the 1st Availability Zone" + default = "10.0.14.0/24" +} +variable "gwlbe_subnet_2_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 2 located in the 2st Availability Zone" + default = "10.0.24.0/24" +} +variable "gwlbe_subnet_3_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 3 located in the 3st Availability Zone" + default = "10.0.34.0/24" +} +variable "gwlbe_subnet_4_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 4 located in the 4st Availability Zone" + default = "10.0.44.0/24" +} +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the automatic provisioning configuration." + default = "gwlb-management-server" +} +variable "configuration_template" { + type = string + description = "A name of a gateway configuration template in the automatic provisioning configuration." + default = "gwlb-ASG-configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Gateway Load Balancer Configuration --- + +variable "gateway_load_balancer_name" { + type = string + description = "Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "gwlb1" +} +resource "null_resource" "gateway_load_balancer_name_too_long" { + // Will fail if gateway_load_balancer_name more than 32 + count = length(var.gateway_load_balancer_name) <= 32 ? 0 : "variable gateway_load_balancer_name must be at most 32" +} +variable "target_group_name" { + type = string + description = "Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "tg1" +} +resource "null_resource" "target_group_name_too_long" { + // Will fail if target_group_name more than 32 + count = length(var.target_group_name) <= 32 ? 0 : "variable target_group_name must be at most 32" +} +variable "enable_cross_zone_load_balancing" { + type = bool + description = "Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges." + default = true +} + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateway instances. (optional)" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The EC2 instance type for the Security Gateways." + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "minimum_group_size" { + type = number + description = "The minimal number of Security Gateways." + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximal number of Security Gateways." + default = 10 +} +variable "gateway_version" { + type = string + description = "The version and license to install on the Security Gateways." + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gwlb_gw" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} + +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} + +variable "allocate_public_IP" { + type = bool + description = "Allocate an Elastic IP for security gateway." + default = false +} + +resource "null_resource" "invalid_allocation" { + // Will fail if var.gateways_provision_address_type is public and var.allocate_public_IP is false + count = var.gateways_provision_address_type != "public" ? 0 : var.allocate_public_IP == true ? 0 : "Gateway's selected to be provisioned by public IP, but [allocate_public_IP] parameter is false" +} + + +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics." + default = false +} + +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- + +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the management instance, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address." + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + diff --git a/terraform/aws/tgw-gwlb-master/versions.tf b/terraform/aws/tgw-gwlb-master/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-gwlb-master/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/aws/tgw-gwlb/README.md b/terraform/aws/tgw-gwlb/README.md new file mode 100755 index 00000000..a01c29bc --- /dev/null +++ b/terraform/aws/tgw-gwlb/README.md @@ -0,0 +1,263 @@ +# Check Point CloudGuard Network Gateway Load Balancer for Transit Gateway Terraform module for AWS + +Terraform module which deploys an AWS Auto Scaling group configured for Gateway Load Balancer into existing Centralized Security VPC for Transit Gateway. + +These types of Terraform resources are supported: +* [AWS Instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) +* [VPC](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) +* [Security Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) +* [Load Balancer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) +* [Load Balancer Target Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) +* [Launch template](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) +* [Auto Scaling Group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) +* [IAM Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) - conditional creation + +See the [Check Point CloudGuard Gateway Load Balancer on AWS](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_AWS_Centralized_Gateway_Load_Balancer/Content/Topics-AWS-GWLB-VPC-DG/Introduction.htm) for additional information + +This solution uses the following modules: +- /terraform/aws/autoscale-gwlb +- /terraform/aws/management +- /terraform/aws/cme-iam-role-gwlb +- /terraform/aws/modules/amis +- /terraform/aws/gwlb +## Configurations + +The **main.tf** file includes the following provider configuration block used to configure the credentials for the authentication with AWS, as well as a default region for your resources: +``` +provider "aws" { + region = var.region + access_key = var.aws_access_key_ID + secret_key = var.aws_secret_access_key +} +``` +The provider credentials can be provided either as static credentials or as [Environment Variables](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables). +- Static credentials can be provided by adding an access_key and secret_key in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: +``` +region = "us-east-1" +access_key = "my-access-key" +secret_key = "my-secret-key" +``` +- In case the Static credentials are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale-gwlb, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.access_key + // secret_key = var.secret_key + } + ``` +- In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in main.tf file, in the provider aws resource, need to be commented: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + b. The next lines in main.tf file, in the provider aws resource, need to be commented for sub-modules /terraform/aws/autoscale, /terraform/aws/management and /terraform/aws/cme-iam-role-gwlb: + ``` + provider "aws" { + // region = var.region + // access_key = var.aws_access_key_ID + // secret_key = var.aws_secret_access_key + } + ``` + +## Usage +- Fill all variables in the /terraform/aws/gwlb/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` + - Create or modify the deployment: + ``` + terraform apply + ``` + + - Variables are configured in /terraform/aws/qs-autoscale/**terraform.tfvars** file as follows: + + ``` + //PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + + // --- VPC Network Configuration --- + vpc_id = "vpc-12345678" + internet_gateway_id ="igw-12345" + availability_zones = ["us-east-1a", "us-east-1b"] + number_of_AZs = 2 + gateways_subnets= ["subnet-123456", "subnet-234567"] + + transit_gateway_attachment_subnet_1_id="subnet-3456" + transit_gateway_attachment_subnet_2_id="subnet-4567" + transit_gateway_attachment_subnet_3_id="subnet-5678" + transit_gateway_attachment_subnet_4_id="subnet-6789" + + nat_gw_subnet_1_cidr ="10.0.13.0/24" + nat_gw_subnet_2_cidr = "10.0.23.0/24" + nat_gw_subnet_3_cidr = "10.0.33.0/24" + nat_gw_subnet_4_cidr = "10.0.43.0/24" + + gwlbe_subnet_1_cidr = "10.0.14.0/24" + gwlbe_subnet_2_cidr = "10.0.24.0/24" + gwlbe_subnet_3_cidr = "10.0.34.0/24" + gwlbe_subnet_4_cidr = "10.0.44.0/24" + + + // --- General Settings --- + key_name = "publickey" + enable_volume_encryption = true + volume_size = 100 + enable_instance_connect = false + disable_instance_termination = false + allow_upload_download = true + management_server = "CP-Management-gwlb-tf" + configuration_template = "gwlb-configuration" + admin_shell = "/etc/cli.sh" + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = "gwlb1" + target_group_name = "tg1" + connection_acceptance_required = "false" + enable_cross_zone_load_balancing = "true" + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = "Check-Point-GW-tf" + gateway_instance_type = "c5.xlarge" + minimum_group_size = 2 + maximum_group_size = 10 + gateway_version = "R81.20-BYOL" + gateway_password_hash = "" + gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. + gateway_SICKey = "12345678" + gateways_provision_address_type = "private" + allocate_public_IP = false + enable_cloudwatch = false + gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = true + management_instance_type = "m5.xlarge" + management_version = "R81.20-BYOL" + management_password_hash = "" + management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. + gateways_policy = "Standard" + gateway_management = "Locally managed" + admin_cidr = "" + gateways_addresses = "" + + // --- Other parameters --- + VolumeType = "gp3" + + + ``` + +- Conditional creation + - To enable cloudwatch for tgw-gwlb: + ``` + enable_cloudwatch = true + ``` + Note: enabling cloudwatch will automatically create IAM role with cloudwatch:PutMetricData permission + - To deploy Security Management Server: + ``` + management_deploy = true + ``` +- To tear down your resources: + ``` + terraform destroy + ``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| internet_gateway_id | VPC's Internet Gateway Id | string | n/a | n/a | yes | +| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | +| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | +| Gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_3_id | The TGW attachment subnet ID located in the 3st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_4_id | The TGW attachment subnet ID located in the 4st Availability Zone | string | n/a | n/a | yes | +| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | +| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | +| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | +| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | +| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | +| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | +| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | +| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + + +## Outputs +| Name | Description | +|---------------------|---------------------------------------------------------------------------------------| +| managment_public_ip | The deployed Security Management AWS instance public IP | +| load_balancer_url | The URL of the external Load Balancer | +| template_name | Name of a gateway configuration template in the automatic provisioning configuration. | +| controller_name | The controller name in CME. | +| gwlb_name | The name of the deployed Gateway Load Balancer | +| gwlb_service_name | The service name for the deployed Gateway Load Balancer | +| gwlb_arn | The arn for the deployed Gateway Load Balancer | + + + +## Revision History +In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------| +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer for Transit Gateway Terraform module for AWS | +| 20220606 | New instance type support | +| 20221123 | R81.20 version support | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20230806 | Add support for c6in instance type | +| 20230829 | Change default Check Point version to R81.20 | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230914 | Add support for maintenance mode password | +| 20230923 | Add support for C5d instance type | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/aws/tgw-gwlb/locals.tf b/terraform/aws/tgw-gwlb/locals.tf new file mode 100755 index 00000000..0693df6d --- /dev/null +++ b/terraform/aws/tgw-gwlb/locals.tf @@ -0,0 +1,60 @@ +locals { + + regex_valid_gateway_sic_key = "^[a-zA-Z0-9]{8,}$" + // Will fail if var.gateway_SIC_Key is invalid + regex_gateway_sic_result = regex(local.regex_valid_gateway_sic_key, var.gateway_SICKey) == var.gateway_SICKey ? 0 : "Variable [gateway_SIC_Key] must be at least 8 alphanumeric characters" + + control_over_public_or_private_allowed_values = [ + "public", + "private"] + // will fail if [var.control_gateway_over_public_or_private_address] is invalid: + validate_control_over_public_or_private = index(local.control_over_public_or_private_allowed_values, var.gateways_provision_address_type) + + gateway_management_allowed_values = [ + "Locally managed", + "Over the internet"] + // will fail if [var.gateway_management] is invalid: + validate_gateway_management = index(local.gateway_management_allowed_values, var.gateway_management) + + regex_valid_key_name = "[\\S\\s]+[\\S]+" + // will fail if var.key_name is invalid + regex_key_name_result=regex(local.regex_valid_key_name, var.key_name) == var.key_name ? 0 : "Variable [key_name] must be a none empty string" + + regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.management_password_hash is invalid + regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" + + regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" + // Will fail if var.gateway_password_hash is invalid + regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" + + + regex_valid_admin_cidr = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.admin_cidr is invalid + regex_admin_cidr = regex(local.regex_valid_admin_cidr, var.admin_cidr) == var.admin_cidr ? 0 : "Variable [admin_cidr] must be a valid CIDR" + + regex_valid_gateways_addresses = "^([0-9]{1,3}\\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$" + // Will fail if var.gateways_addresses is invalid + regex_gateways_addresses = regex(local.regex_valid_gateways_addresses, var.gateways_addresses) == var.gateways_addresses ? 0 : "Variable [gateways_addresses] must be a valid gateways addresses" + + regex_valid_management_server = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.management_server is invalid + regex_management_server = regex(local.regex_valid_management_server, var.management_server) == var.management_server ? 0 : "Variable [management_server] can not be an empty string" + + regex_valid_configuration_template = "^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$" + // Will fail if var.configuration_template is invalid + regex_configuration_template = regex(local.regex_valid_configuration_template, var.configuration_template) == var.configuration_template ? 0 : "Variable [configuration_template] can not be an empty string" + + deploy_management_condition = var.management_deploy == true + + volume_type_allowed_values = [ + "gp3", + "gp2"] + // will fail if [var.VolumeType] is invalid: + validate_volume_type = index(local.volume_type_allowed_values, var.volume_type) + + + #note: we need to add validiation for every subnet in masters solution +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb/main.tf b/terraform/aws/tgw-gwlb/main.tf new file mode 100755 index 00000000..64ce7101 --- /dev/null +++ b/terraform/aws/tgw-gwlb/main.tf @@ -0,0 +1,438 @@ +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key +} + + +resource "aws_subnet" "gwlbe_subnet1" { + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 0) + cidr_block = var.gwlbe_subnet_1_cidr + tags = { + Name = "GWLBe subnet 1" + Network = "Private" + } +} +resource "aws_route_table" "gwlbe_subnet1_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.nat_gateway1.id + } + tags = { + Name = "GWLBe Subnet 1 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "gwlbe_subnet1_rtb_assoc" { + subnet_id = aws_subnet.gwlbe_subnet1.id + route_table_id = aws_route_table.gwlbe_subnet1_rtb.id +} + + +resource "aws_subnet" "gwlbe_subnet2" { + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 1) + cidr_block = var.gwlbe_subnet_2_cidr + tags = { + Name = "GWLBe subnet 2" + Network = "Private" + } +} +resource "aws_route_table" "gwlbe_subnet2_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.nat_gateway2.id + } + tags = { + Name = "GWLBe Subnet 2 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "gwlbe_subnet2_rtb_assoc" { + subnet_id = aws_subnet.gwlbe_subnet2.id + route_table_id = aws_route_table.gwlbe_subnet2_rtb.id +} + + +resource "aws_subnet" "gwlbe_subnet3" { + count = var.number_of_AZs >= 3 ? 1 :0 + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 2) + cidr_block = var.gwlbe_subnet_3_cidr + tags = { + Name = "GWLBe subnet 3" + Network = "Private" + } +} +resource "aws_route_table" "gwlbe_subnet3_rtb" { + count = var.number_of_AZs >= 3 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.nat_gateway3[0].id + } + tags = { + Name = "GWLBe Subnet 3 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "gwlbe_subnet3_rtb_assoc" { + count = var.number_of_AZs >= 3 ? 1 :0 + subnet_id = aws_subnet.gwlbe_subnet3[0].id + route_table_id = aws_route_table.gwlbe_subnet3_rtb[0].id +} + + +resource "aws_subnet" "gwlbe_subnet4" { + count = var.number_of_AZs >= 4 ? 1 :0 + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 3) + cidr_block = var.gwlbe_subnet_4_cidr + tags = { + Name = "GWLBe subnet 4" + Network = "Private" + } +} +resource "aws_route_table" "gwlbe_subnet4_rtb" { + count = var.number_of_AZs >= 4 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.nat_gateway4[0].id + } + tags = { + Name = "GWLBe Subnet 4 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "gwlbe_subnet4_rtb_assoc" { + count = var.number_of_AZs >= 4 ? 1 :0 + subnet_id = aws_subnet.gwlbe_subnet4[0].id + route_table_id = aws_route_table.gwlbe_subnet4_rtb[0].id +} + + + + +resource "aws_subnet" "nat_gw_subnet1" { + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 0) + cidr_block = var.nat_gw_subnet_1_cidr + tags = { + Name = "NAT subnet 1" + Network = "Private" + } +} +resource "aws_route_table" "nat_gw_subnet1_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + gateway_id = var.internet_gateway_id + } + tags = { + Name = "NAT Subnet 1 Route Table" + Network = "Public" + } +} +resource "aws_route_table_association" "nat_gw_subnet1_rtb_assoc" { + subnet_id = aws_subnet.nat_gw_subnet1.id + route_table_id = aws_route_table.nat_gw_subnet1_rtb.id +} + +resource "aws_subnet" "nat_gw_subnet2" { + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 1) + cidr_block = var.nat_gw_subnet_2_cidr + tags = { + Name = "NAT subnet 2" + Network = "Private" + } +} +resource "aws_route_table" "nat_gw_subnet2_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + gateway_id = var.internet_gateway_id + } + tags = { + Name = "NAT Subnet 2 Route Table" + Network = "Public" + } +} +resource "aws_route_table_association" "nat_gw_subnet2_rtb_assoc" { + subnet_id = aws_subnet.nat_gw_subnet2.id + route_table_id = aws_route_table.nat_gw_subnet2_rtb.id +} + +resource "aws_subnet" "nat_gw_subnet3" { + count = var.number_of_AZs >= 3 ? 1 :0 + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 2) + cidr_block = var.nat_gw_subnet_3_cidr + tags = { + Name = "NAT subnet 3" + Network = "Private" + } +} +resource "aws_route_table" "nat_gw_subnet3_rtb" { + count = var.number_of_AZs >= 3 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + gateway_id = var.internet_gateway_id + } + tags = { + Name = "NAT Subnet 3 Route Table" + Network = "Public" + } +} +resource "aws_route_table_association" "nat_gw_subnet3_rtb_assoc" { + count = var.number_of_AZs >= 3 ? 1 :0 + subnet_id = aws_subnet.nat_gw_subnet3[0].id + route_table_id = aws_route_table.nat_gw_subnet3_rtb[0].id +} + +resource "aws_subnet" "nat_gw_subnet4" { + count = var.number_of_AZs >= 4 ? 1 :0 + vpc_id = var.vpc_id + availability_zone = element(var.availability_zones, 3) + cidr_block = var.nat_gw_subnet_4_cidr + tags = { + Name = "NAT subnet 4" + Network = "Private" + } +} +resource "aws_route_table" "nat_gw_subnet4_rtb" { + count = var.number_of_AZs >= 4 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + gateway_id = var.internet_gateway_id + } + tags = { + Name = "NAT Subnet 4 Route Table" + Network = "Public" + } +} +resource "aws_route_table_association" "nat_gw_subnet4_rtb_assoc" { + count = var.number_of_AZs >= 4 ? 1 :0 + subnet_id = aws_subnet.nat_gw_subnet4[0].id + route_table_id = aws_route_table.nat_gw_subnet4_rtb[0].id +} + +module "gwlb" { + source = "../gwlb" + providers = { + aws = aws + } + vpc_id = var.vpc_id + subnet_ids = var.gateways_subnets + + // --- General Settings --- + key_name = var.key_name + enable_volume_encryption = var.enable_volume_encryption + volume_size = var.volume_size + enable_instance_connect = var.enable_instance_connect + disable_instance_termination = var.disable_instance_termination + metadata_imdsv2_required = var.metadata_imdsv2_required + allow_upload_download = var.allow_upload_download + management_server = var.management_server + configuration_template = var.configuration_template + admin_shell = var.admin_shell + + // --- Gateway Load Balancer Configuration --- + gateway_load_balancer_name = var.gateway_load_balancer_name + target_group_name = var.target_group_name + connection_acceptance_required = false + enable_cross_zone_load_balancing = var.enable_cross_zone_load_balancing + + // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + gateway_name = var.gateway_name + gateway_instance_type = var.gateway_instance_type + minimum_group_size = var.minimum_group_size + maximum_group_size = var.maximum_group_size + gateway_version = var.gateway_version + gateway_password_hash = var.gateway_password_hash + gateway_maintenance_mode_password_hash = var.gateway_maintenance_mode_password_hash + gateway_SICKey = var.gateway_SICKey + gateways_provision_address_type = var.gateways_provision_address_type + allocate_public_IP = var.allocate_public_IP + enable_cloudwatch = var.enable_cloudwatch + gateway_bootstrap_script = var.gateway_bootstrap_script + + // --- Check Point CloudGuard IaaS Security Management Server Configuration --- + management_deploy = var.management_deploy + management_instance_type = var.management_instance_type + management_version = var.management_version + management_password_hash = var.management_password_hash + management_maintenance_mode_password_hash = var.management_maintenance_mode_password_hash + gateways_policy = var.gateways_policy + gateway_management = var.gateway_management + admin_cidr = var.admin_cidr + gateways_addresses = var.gateways_addresses + + volume_type = var.volume_type +} + +resource "aws_vpc_endpoint" "gwlb_endpoint1" { + depends_on = [module.gwlb, aws_subnet.gwlbe_subnet1] + vpc_id = var.vpc_id + vpc_endpoint_type = "GatewayLoadBalancer" + service_name = module.gwlb.gwlb_service_name + subnet_ids = aws_subnet.gwlbe_subnet1[*].id + tags = { + "Name" = "gwlb_endpoint1" + } +} +resource "aws_vpc_endpoint" "gwlb_endpoint2" { + depends_on = [module.gwlb, aws_subnet.gwlbe_subnet2] + vpc_id = var.vpc_id + vpc_endpoint_type = "GatewayLoadBalancer" + service_name = module.gwlb.gwlb_service_name + subnet_ids = aws_subnet.gwlbe_subnet2[*].id + tags = { + "Name" = "gwlb_endpoint2" + } +} +resource "aws_vpc_endpoint" "gwlb_endpoint3" { + count = var.number_of_AZs >= 3 ? 1 :0 + depends_on = [module.gwlb, aws_subnet.gwlbe_subnet3] + vpc_id = var.vpc_id + vpc_endpoint_type = "GatewayLoadBalancer" + service_name = module.gwlb.gwlb_service_name + subnet_ids = aws_subnet.gwlbe_subnet3[*].id + tags = { + "Name" = "gwlb_endpoint3" + } +} +resource "aws_vpc_endpoint" "gwlb_endpoint4" { + count = var.number_of_AZs >= 4 ? 1 :0 + depends_on = [module.gwlb, aws_subnet.gwlbe_subnet4] + vpc_id = var.vpc_id + vpc_endpoint_type = "GatewayLoadBalancer" + service_name = module.gwlb.gwlb_service_name + subnet_ids = aws_subnet.gwlbe_subnet4[*].id + tags = { + "Name" = "gwlb_endpoint4" + } +} + + +resource "aws_route_table" "tgw_attachment_subnet1_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + vpc_endpoint_id = aws_vpc_endpoint.gwlb_endpoint1.id + } + tags = { + Name = "TGW Attachment Subnet 1 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "tgw_attachment1_rtb_assoc" { + subnet_id = var.transit_gateway_attachment_subnet_1_id + route_table_id = aws_route_table.tgw_attachment_subnet1_rtb.id +} +resource "aws_route_table" "tgw_attachment_subnet2_rtb" { + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + vpc_endpoint_id = aws_vpc_endpoint.gwlb_endpoint2.id + } + tags = { + Name = "TGW Attachment Subnet 2 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "tgw_attachment2_rtb_assoc" { + subnet_id = var.transit_gateway_attachment_subnet_2_id + route_table_id = aws_route_table.tgw_attachment_subnet2_rtb.id +} +resource "aws_route_table" "tgw_attachment_subnet3_rtb" { + count = var.number_of_AZs >= 3 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + vpc_endpoint_id = aws_vpc_endpoint.gwlb_endpoint3[0].id + } + tags = { + Name = "TGW Attachment Subnet 3 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "tgw_attachment3_rtb_assoc" { + count = var.number_of_AZs >= 3 ? 1 :0 + subnet_id = var.transit_gateway_attachment_subnet_3_id + route_table_id = aws_route_table.tgw_attachment_subnet3_rtb[0].id +} +resource "aws_route_table" "tgw_attachment_subnet4_rtb" { + count = var.number_of_AZs >= 4 ? 1 :0 + vpc_id = var.vpc_id + route{ + cidr_block = "0.0.0.0/0" + vpc_endpoint_id = aws_vpc_endpoint.gwlb_endpoint4[0].id + } + tags = { + Name = "TGW Attachment Subnet 4 Route Table" + Network = "Private" + } +} +resource "aws_route_table_association" "tgw_attachment4_rtb_assoc" { + count = var.number_of_AZs >= 4 ? 1 :0 + subnet_id = var.transit_gateway_attachment_subnet_4_id + route_table_id = aws_route_table.tgw_attachment_subnet4_rtb[0].id +} + + +resource "aws_eip" "nat_gw_public_address1" { +} +resource "aws_eip" "nat_gw_public_address2" { +} +resource "aws_eip" "nat_gw_public_address3" { + count = var.number_of_AZs >= 3 ? 1 : 0 +} +resource "aws_eip" "nat_gw_public_address4" { + count = var.number_of_AZs >= 4 ? 1 : 0 +} + +resource "aws_nat_gateway" "nat_gateway1" { + depends_on = [aws_subnet.nat_gw_subnet1, aws_eip.nat_gw_public_address1] + allocation_id = aws_eip.nat_gw_public_address1.id + subnet_id = aws_subnet.nat_gw_subnet1.id + + tags = { + Name = "NatGW1" + } +} +resource "aws_nat_gateway" "nat_gateway2" { + depends_on = [aws_subnet.nat_gw_subnet2, aws_eip.nat_gw_public_address2] + allocation_id = aws_eip.nat_gw_public_address2.id + subnet_id = aws_subnet.nat_gw_subnet2.id + + tags = { + Name = "NatGW2" + } +} +resource "aws_nat_gateway" "nat_gateway3" { + count = var.number_of_AZs >= 3 ? 1 :0 + depends_on = [aws_subnet.nat_gw_subnet3, aws_eip.nat_gw_public_address3] + allocation_id = aws_eip.nat_gw_public_address3[0].id + subnet_id = aws_subnet.nat_gw_subnet3[0].id + + tags = { + Name = "NatGW3" + } +} +resource "aws_nat_gateway" "nat_gateway4" { + count = var.number_of_AZs >= 4 ? 1 :0 + depends_on = [aws_subnet.nat_gw_subnet4, aws_eip.nat_gw_public_address4] + allocation_id = aws_eip.nat_gw_public_address4[0].id + subnet_id = aws_subnet.nat_gw_subnet4[0].id + + tags = { + Name = "NatGW4" + } +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb/output.tf b/terraform/aws/tgw-gwlb/output.tf new file mode 100755 index 00000000..15cb48a3 --- /dev/null +++ b/terraform/aws/tgw-gwlb/output.tf @@ -0,0 +1,24 @@ +output "Deployment" { + value = "Finalizing instances configuration may take up to 20 minutes after deployment is finished." +} +output "management_public_ip" { + depends_on = [module.gwlb] + value = module.gwlb[*].management_public_ip +} +output "gwlb_arn" { + depends_on = [module.gwlb] + value = module.gwlb[*].gwlb_arn +} +output "gwlb_service_name" { + depends_on = [module.gwlb] + value = module.gwlb[*].gwlb_service_name +} +output "gwlb_name" { + value = var.gateway_load_balancer_name +} +output "controller_name" { + value = "gwlb-controller" +} +output "template_name" { + value = var.configuration_template +} \ No newline at end of file diff --git a/terraform/aws/tgw-gwlb/terraform.tfvars b/terraform/aws/tgw-gwlb/terraform.tfvars new file mode 100755 index 00000000..266b4d1a --- /dev/null +++ b/terraform/aws/tgw-gwlb/terraform.tfvars @@ -0,0 +1,69 @@ +//PLEASE refer to README.md for accepted values FOR THE VARIABLES BELOW + +// --- VPC Network Configuration --- +vpc_id = "vpc-12345678" +internet_gateway_id ="igw-12345" +availability_zones = ["us-east-1a", "us-east-1b"] +number_of_AZs = 2 +gateways_subnets= ["subnet-123456", "subnet-234567"] + +transit_gateway_attachment_subnet_1_id="subnet-3456" +transit_gateway_attachment_subnet_2_id="subnet-4567" +transit_gateway_attachment_subnet_3_id="subnet-5678" +transit_gateway_attachment_subnet_4_id="subnet-6789" + +nat_gw_subnet_1_cidr ="10.0.13.0/24" +nat_gw_subnet_2_cidr = "10.0.23.0/24" +nat_gw_subnet_3_cidr = "10.0.33.0/24" +nat_gw_subnet_4_cidr = "10.0.43.0/24" + +gwlbe_subnet_1_cidr = "10.0.14.0/24" +gwlbe_subnet_2_cidr = "10.0.24.0/24" +gwlbe_subnet_3_cidr = "10.0.34.0/24" +gwlbe_subnet_4_cidr = "10.0.44.0/24" + +// --- General Settings --- +key_name = "publickey" +enable_volume_encryption = true +volume_size = 100 +enable_instance_connect = false +disable_instance_termination = false +metadata_imdsv2_required = true +allow_upload_download = true +management_server = "CP-Management-gwlb-tf" +configuration_template = "gwlb-configuration" +admin_shell = "/etc/cli.sh" + +// --- Gateway Load Balancer Configuration --- +gateway_load_balancer_name = "gwlb1" +target_group_name = "tg1" +enable_cross_zone_load_balancing = "true" + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- +gateway_name = "Check-Point-GW-tf" +gateway_instance_type = "c5.xlarge" +minimum_group_size = 2 +maximum_group_size = 10 +gateway_version = "R81.20-BYOL" +gateway_password_hash = "" +gateway_maintenance_mode_password_hash = "" # For R81.10 and below the gateway_password_hash is used also as maintenance-mode password. +gateway_SICKey = "12345678" +gateways_provision_address_type = "private" +allocate_public_IP = false +enable_cloudwatch = false +gateway_bootstrap_script = "echo 'this is bootstrap script' > /home/admin/bootstrap.txt" + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- +management_deploy = true +management_instance_type = "m5.xlarge" +management_version = "R81.20-BYOL" +management_password_hash = "" +management_maintenance_mode_password_hash = "" # For R81.10 and below the management_password_hash is used also as maintenance-mode password. +gateways_policy = "Standard" +gateway_management = "Locally managed" +admin_cidr = "0.0.0.0/0" +gateways_addresses = "0.0.0.0/0" + +// --- Other parameters --- +volume_type = "gp3" + diff --git a/terraform/aws/tgw-gwlb/variables.tf b/terraform/aws/tgw-gwlb/variables.tf new file mode 100755 index 00000000..52b97b13 --- /dev/null +++ b/terraform/aws/tgw-gwlb/variables.tf @@ -0,0 +1,333 @@ +// Module: Check Point CloudGuard Network Gateway Load Balancer into an existing VPC + +// --- AWS Provider --- +variable "region" { + type = string + description = "AWS region" + default = "" +} +variable "access_key" { + type = string + description = "AWS access key" + default = "" +} +variable "secret_key" { + type = string + description = "AWS secret key" + default = "" +} + +// ---VPC Network Configuration --- +variable "vpc_id" { + type = string +} +variable "internet_gateway_id" { + type = string + description = "VPC's Internet Gateway Id (e.g. igw-123a4567)" +} +variable "availability_zones"{ + type = list(string) + description = "The Availability Zones (AZs) to use for the subnets in the VPC. Select two (the logical order is preserved)" +} +variable "number_of_AZs" { + type = number + description = "Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter" + default = 2 +} +resource "null_resource" "availability_zones_validation1" { + count = var.number_of_AZs == length(var.availability_zones) ? 0 : "variable availability_zones list size must be equal to variable num_of_AZs" +} + +variable "gateways_subnets" { + type = list(string) + description = "Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet" +} + +variable "transit_gateway_attachment_subnet_1_id" { + type = string + description = "The TGW attachment subnet ID located in the 1st Availability Zone" +} +variable "transit_gateway_attachment_subnet_2_id" { + type = string + description = "The TGW attachment subnet ID located in the 2st Availability Zone" +} +variable "transit_gateway_attachment_subnet_3_id" { + type = string + description = "The TGW attachment subnet ID located in the 3st Availability Zone" + default = "" +} +variable "transit_gateway_attachment_subnet_4_id" { + type = string + description = "The TGW attachment subnet ID located in the 4st Availability Zone" + default = "" +} +variable "nat_gw_subnet_1_cidr" { + type = string + description = "CIDR block for NAT subnet 1 located in the 1st Availability Zone" + default = "10.0.13.0/24" +} +variable "nat_gw_subnet_2_cidr" { + type = string + description = "CIDR block for NAT subnet 2 located in the 2st Availability Zone" + default = "10.0.23.0/24" +} +variable "nat_gw_subnet_3_cidr" { + type = string + description = "CIDR block for NAT subnet 3 located in the 3st Availability Zone" + default = "10.0.33.0/24" +} +variable "nat_gw_subnet_4_cidr" { + type = string + description = "CIDR block for NAT subnet 4 located in the 4st Availability Zone" + default = "10.0.43.0/24" +} +variable "gwlbe_subnet_1_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 1 located in the 1st Availability Zone" + default = "10.0.14.0/24" +} +variable "gwlbe_subnet_2_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 2 located in the 2st Availability Zone" + default = "10.0.24.0/24" +} +variable "gwlbe_subnet_3_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 3 located in the 3st Availability Zone" + default = "10.0.34.0/24" +} +variable "gwlbe_subnet_4_cidr" { + type = string + description = "CIDR block for Gateway Loadbalancer endpoint subnet 4 located in the 4st Availability Zone" + default = "10.0.44.0/24" +} +// --- General Settings --- +variable "key_name" { + type = string + description = "The EC2 Key Pair name to allow SSH access to the instances" +} +variable "enable_volume_encryption" { + type = bool + description = "Encrypt Environment instances volume with default AWS KMS key" + default = true +} +variable "volume_size" { + type = number + description = "Root volume size (GB) - minimum 100" + default = 100 +} +resource "null_resource" "volume_size_too_small" { + // Will fail if var.volume_size is less than 100 + count = var.volume_size >= 100 ? 0 : "variable volume_size must be at least 100" +} +variable "volume_type" { + type = string + description = "General Purpose SSD Volume Type" + default = "gp3" +} +variable "enable_instance_connect" { + type = bool + description = "Enable SSH connection over AWS web console" + default = false +} +variable "disable_instance_termination" { + type = bool + description = "Prevents an instance from accidental termination" + default = false +} +variable "metadata_imdsv2_required" { + type = bool + description = "Set true to deploy the instance with metadata v2 token required" + default = true +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} +variable "management_server" { + type = string + description = "The name that represents the Security Management Server in the automatic provisioning configuration." + default = "gwlb-management-server" +} +variable "configuration_template" { + type = string + description = "A name of a gateway configuration template in the automatic provisioning configuration." + default = "gwlb-ASG-configuration" + validation { + condition = length(var.configuration_template) < 31 + error_message = "The configuration_template name can not exceed 30 characters" + } +} +variable "admin_shell" { + type = string + description = "Set the admin shell to enable advanced command line configuration" + default = "/etc/cli.sh" +} + +// --- Gateway Load Balancer Configuration --- + +variable "gateway_load_balancer_name" { + type = string + description = "Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "gwlb1" +} +resource "null_resource" "gateway_load_balancer_name_too_long" { + // Will fail if gateway_load_balancer_name more than 32 + count = length(var.gateway_load_balancer_name) <= 32 ? 0 : "variable gateway_load_balancer_name must be at most 32" +} +variable "target_group_name" { + type = string + description = "Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen." + default = "tg1" +} +resource "null_resource" "target_group_name_too_long" { + // Will fail if target_group_name more than 32 + count = length(var.target_group_name) <= 32 ? 0 : "variable target_group_name must be at most 32" +} +variable "enable_cross_zone_load_balancing" { + type = bool + description = "Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges." + default = true +} + +// --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- + +variable "gateway_name" { + type = string + description = "The name tag of the Security Gateway instances. (optional)" + default = "Check-Point-Gateway-tf" +} +variable "gateway_instance_type" { + type = string + description = "The EC2 instance type for the Security Gateways." + default = "c5.xlarge" +} +module "validate_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "gateway" + instance_type = var.gateway_instance_type +} +variable "minimum_group_size" { + type = number + description = "The minimal number of Security Gateways." + default = 2 +} +variable "maximum_group_size" { + type = number + description = "The maximal number of Security Gateways." + default = 10 +} +variable "gateway_version" { + type = string + description = "The version and license to install on the Security Gateways." + default = "R81.20-BYOL" +} +module "validate_gateway_version" { + source = "../modules/common/version_license" + + chkp_type = "gwlb_gw" + version_license = var.gateway_version +} +variable "gateway_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" +} +variable "gateway_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the gateway instances, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateway_SICKey" { + type = string + description = "The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters)" +} + +variable "gateways_provision_address_type" { + type = string + description = "Determines if the gateways are provisioned using their private or public address" + default = "private" +} + +variable "allocate_public_IP" { + type = bool + description = "Allocate an Elastic IP for security gateway." + default = false +} + +resource "null_resource" "invalid_allocation" { + // Will fail if var.gateways_provision_address_type is public and var.allocate_public_IP is false + count = var.gateways_provision_address_type != "public" ? 0 : var.allocate_public_IP == true ? 0 : "Gateway's selected to be provisioned by public IP, but [allocate_public_IP] parameter is false" +} + +variable "enable_cloudwatch" { + type = bool + description = "Report Check Point specific CloudWatch metrics." + default = false +} + +variable "gateway_bootstrap_script" { + type = string + description = "(Optional) An optional script with semicolon (;) separated commands to run on the initial boot" + default = "" +} + +// --- Check Point CloudGuard IaaS Security Management Server Configuration --- + +variable "management_deploy" { + type = bool + description = "Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section" + default = true +} +variable "management_instance_type" { + type = string + description = "The EC2 instance type of the Security Management Server" + default = "m5.xlarge" +} +module "validate_management_instance_type" { + source = "../modules/common/instance_type" + + chkp_type = "management" + instance_type = var.management_instance_type +} +variable "management_version" { + type = string + description = "The license to install on the Security Management Server" + default = "R81.20-BYOL" +} +module "validate_management_version" { + source = "../modules/common/version_license" + + chkp_type = "management" + version_license = var.management_version +} +variable "management_password_hash" { + type = string + description = "(Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash)" + default = "" +} +variable "management_maintenance_mode_password_hash" { + description = "Maintenance mode password hash for the management instance, relevant only for R81.20 and higher versions" + type = string + default = "" +} +variable "gateways_policy" { + type = string + description = "The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group" + default = "Standard" +} +variable "gateway_management" { + type = string + description = "Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address." + default = "Locally managed" +} +variable "admin_cidr" { + type = string + description = "Allow web, ssh, and graphical clients only from this network to communicate with the Security Management Server" +} +variable "gateways_addresses" { + type = string + description = "Allow gateways only from this network to communicate with the Security Management Server" +} + diff --git a/terraform/aws/tgw-gwlb/versions.tf b/terraform/aws/tgw-gwlb/versions.tf new file mode 100755 index 00000000..dbebf275 --- /dev/null +++ b/terraform/aws/tgw-gwlb/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.20.0" + } + http = { + version = "~> 3.4.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/azure/README.md b/terraform/azure/README.md new file mode 100755 index 00000000..c24588d9 --- /dev/null +++ b/terraform/azure/README.md @@ -0,0 +1,12 @@ +# Check Point Terraform deployment modules for Azure + +This project was developed to allow Terraform deployments for Check Point CloudGuard IaaS solutions on Azure. + + +These modules use Terraform's [Azurerm provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) in order to create and provision resources on Azure. + + + ## Prerequisites + +1. [Download Terraform](https://www.terraform.io/downloads.html) and follow the instructions according to your OS. +2. Get started with Terraform Azurerm provider - refer to [Terraform Azurerm provider best practices](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs). \ No newline at end of file diff --git a/terraform/azure/high-availability-existing-vnet/README.md b/terraform/azure/high-availability-existing-vnet/README.md new file mode 100755 index 00000000..c26e307a --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/README.md @@ -0,0 +1,239 @@ +# Check Point CloudGuard IaaS High Availability Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS High Availability solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- System assigned identity +- Availability Set - conditional creation + +For additional information, +please see the [CloudGuard Network for Azure High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/high-availability-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**", "**User Access Administrator**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/high-availability-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a | + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" | + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a | + | | | | | | + | **cluster_name** | The name of the Check Point Cluster Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a | + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a | + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a | + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a | + | | | | | | + | **frontend_IP_addresses** | A list of three whole numbers representing the private ip addresses of the members eth0 NICs and the cluster vip ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given frontend subnet prefix. The IP addresses are defined by their position in the frontend subnet | list(number) | | n/a + | | | | | | + | **backend_IP_addresses** | A list of three whole numbers representing the private ip addresses of the members eth1 NICs and the backend lb ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given backend subnet prefix. The IP addresses are defined by their position in the backend subnet | list(number) | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a | + | | | | | | + | **smart_1_cloud_token_a** | Smart-1 Cloud token to connect automatically ***Member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart_1_cloud_token_b** | Smart-1 Cloud token to connect automatically ***Member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a | + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20"; | n/a | + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a | + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a | + | | | | | | + | **availability_type** | Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone | string | "Availability Zone";
"Availability Set"; | "Availability Zone" | + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for Cluster members monitoring | boolean | true;
false; | true | + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false | + | | | | | | + | **use_public_ip_prefix** | Indicates whether the public IP resources will be deployed with public IP prefix | boolean | true;
false; | false | + | | | | | | + | **create_public_ip_prefix** | Indicates whether the public IP prefix will created or an existing will be used | boolean | true;
false; | false | + | | | | | | + | **existing_public_ip_prefix_id** | The existing public IP prefix resource id | string | Existing public IP prefix resource id | n/a | + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | n/a | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To deploy the solution based on Azure Availability Set and create a new Availability Set for the virtual machines: +``` +availability_type = "Availability Set" +``` + Otherwise, to deploy the solution based on Azure Availability Zone: +``` +availability_type = "Availability Zone" +``` +- To enable CloudGuard metrics in order to send statuses and statistics collected from HA instances to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` +- To create new public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = true + ``` +- To use an existing public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = false + existing_public_ip_prefix_id = "public IP prefix resource id" + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-ha-terraform" + cluster_name = "checkpoint-ha-terraform" + location = "eastus" + vnet_name = "checkpoint-ha-vnet" + vnet_resource_group = "existing-vnet" + frontend_subnet_name = "frontend" + backend_subnet_name = "backend" + frontend_IP_addresses = [5, 6, 7] + backend_IP_addresses = [5, 6, 7] + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token_a = "xxxxxxxxxxxx" + smart_1_cloud_token_b = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_type = "Availability Zone" + enable_custom_metrics = true + enable_floating_ip = false + use_public_ip_prefix = false + create_public_ip_prefix = false + existing_public_ip_prefix_id = "" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230212 | - Added Smart-1 Cloud support | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells. | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment into an existing Vnet in Azure. | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files. | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/high-availability-existing-vnet/azure_public_key b/terraform/azure/high-availability-existing-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/high-availability-existing-vnet/cloud-init.sh b/terraform/azure/high-availability-existing-vnet/cloud-init.sh new file mode 100755 index 00000000..0609bfcf --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/cloud-init.sh @@ -0,0 +1,22 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +tenantId="${tenant_id}" +virtualNetwork="${virtual_network}" +clusterName="${cluster_name}" +externalPrivateAddresses="${external_private_addresses}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +smart1CloudToken="${smart_1_cloud_token}" +Vips='[{"name": "cluster-vip", "privateIPAddress": "${external_private_addresses}", "publicIPAddress": "${cluster_name}"}]' +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/high-availability-existing-vnet/main.tf b/terraform/azure/high-availability-existing-vnet/main.tf new file mode 100755 index 00000000..934102da --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/main.tf @@ -0,0 +1,531 @@ +//********************** Providers **************************// +provider "azurerm" { + + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip_prefix" "public_ip_prefix" { + count = var.use_public_ip_prefix && var.create_public_ip_prefix ? 1 : 0 + name = "${module.common.resource_group_name}-ipprefix" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + prefix_length = 30 +} + +data "azurerm_subnet" "frontend" { + name = var.frontend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend" { + name = var.backend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + count = 2 + name = "${var.cluster_name}${count.index+1}_IP" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${count.index+1}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_public_ip" "cluster-vip" { + name = var.cluster_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-vip-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_network_interface" "nic_vip" { + depends_on = [ + azurerm_public_ip.cluster-vip, + azurerm_public_ip.public-ip] + name = "${var.cluster_name}1-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[0]) + public_ip_address_id = azurerm_public_ip.public-ip.0.id + } + ip_configuration { + name = "cluster-vip" + subnet_id = data.azurerm_subnet.frontend.id + primary = false + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[2]) + public_ip_address_id = azurerm_public_ip.cluster-vip.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_vip_lb_association" { + depends_on = [azurerm_network_interface.nic_vip, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic_vip.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip, + azurerm_lb.frontend-lb] + name = "${var.cluster_name}2-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = data.azurerm_subnet.frontend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.frontend.address_prefixes[0], var.frontend_IP_addresses[1]) + public_ip_address_id = azurerm_public_ip.public-ip.1.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_lb_association" { + depends_on = [azurerm_network_interface.nic, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [ + azurerm_lb.backend-lb] + count = 2 + name = "${var.cluster_name}${count.index+1}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0], var.backend_IP_addresses[count.index+1]) + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic1_lb_association" { + depends_on = [azurerm_network_interface.nic1, azurerm_lb_backend_address_pool.backend-lb-pool] + count = 2 + network_interface_id = azurerm_network_interface.nic1[count.index].id + ip_configuration_name = "ipconfig2" + backend_address_pool_id = azurerm_lb_backend_address_pool.backend-lb-pool.id +} + +//********************** Load Balancers **************************// +resource "azurerm_public_ip" "public-ip-lb" { + name = "frontend_lb_ip" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_lb" "frontend-lb" { + depends_on = [ + azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "LoadBalancerFrontend" + public_ip_address_id = azurerm_public_ip.public-ip-lb.id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + loadbalancer_id = azurerm_lb.frontend-lb.id + name = "frontend-lb-pool" +} + +resource "azurerm_lb" "backend-lb" { + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0], var.backend_IP_addresses[0]) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb.id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = 2 + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb.id : azurerm_lb.backend-lb.id + name = var.lb_probe_name + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +resource "azurerm_lb_rule" "backend_lb_rules" { + loadbalancer_id = azurerm_lb.backend-lb.id + name = "backend-lb" + protocol = "All" + frontend_port = 0 + backend_port = 0 + frontend_ip_configuration_name = "backend-lb" + load_distribution = "Default" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool.id] + probe_id = azurerm_lb_probe.azure_lb_healprob[1].id + enable_floating_ip = var.enable_floating_ip +} + +//********************** Availability Set **************************// +locals { + availability_set_condition = var.availability_type == "Availability Set" ? true : false + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false +} +resource "azurerm_availability_set" "availability-set" { + count = local.availability_set_condition ? 1 : 0 + name = "${var.cluster_name}-AvailabilitySet" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + platform_fault_domain_count = 2 + platform_update_domain_count = 5 + managed = true +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} +resource "azurerm_virtual_machine" "vm-instance-availability-set" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? module.common.number_of_vm_instances : 0 + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + availability_set_id = local.availability_set_condition ? azurerm_availability_set.availability-set[0].id : "" + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${lower(var.cluster_name)}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = var.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} + +resource "azurerm_virtual_machine" "vm-instance-availability-zone" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? 0 : module.common.number_of_vm_instances + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + zones = [ + count.index+1] + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${lower(var.cluster_name)}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = var.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} +//********************** Role Assigments **************************// +data "azurerm_role_definition" "virtual_machine_contributor_role_definition" { + name = "Virtual Machine Contributor" +} +data "azurerm_role_definition" "reader_role_definition" { + name = "Reader" +} +data "azurerm_client_config" "client_config" { +} +resource "azurerm_role_assignment" "cluster_virtual_machine_contributor_assignment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.virtual_machine_contributor_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} +resource "azurerm_role_assignment" "cluster_reader_assigment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.reader_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} \ No newline at end of file diff --git a/terraform/azure/high-availability-existing-vnet/terraform.tfvars b/terraform/azure/high-availability-existing-vnet/terraform.tfvars new file mode 100755 index 00000000..e235eaa9 --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/terraform.tfvars @@ -0,0 +1,38 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-ha-terraform" +cluster_name = "PLEASE ENTER CLUSTER NAME" # "checkpoint-ha-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-ha-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +frontend_subnet_name = "PLEASE ENTER EXTERNAL SUBNET NAME" # "frontend" +backend_subnet_name = "PLEASE ENTER INTERNAL SUBNET NAME" # "backend" +frontend_IP_addresses = "PLEASE ENTER 3 FRONTEND IP ADDRESS POSITIONAL NUMBER" # [5, 6, 7] +backend_IP_addresses = "PLEASE ENTER 3 BACKEND IP ADDRESSES POSITIONAL NUMBERS" # [5, 6, 7] +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_type = "PLEASE ENTER AVAILABILITY TYPE" # "Availability Zone" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +use_public_ip_prefix = "PLEASE ENTER true or false" # false +create_public_ip_prefix = "PLEASE ENTER true or false" # false +existing_public_ip_prefix_id = "PLEASE ENTER IP PREFIX RESOURCE ID" # "" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/high-availability-existing-vnet/variables.tf b/terraform/azure/high-availability-existing-vnet/variables.tf new file mode 100755 index 00000000..c11fa238 --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/variables.tf @@ -0,0 +1,339 @@ +//********************** Basic Configuration Variables **************************// +variable "cluster_name" { + description = "Cluster name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "availability_type" { + description = "Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone." + type = string + default = "Availability Zone" +} + +locals { // locals for 'availability_type' allowed values + availability_type_allowed_values = [ + "Availability Zone", + "Availability Set" + ] + // will fail if [var.availability_type] is invalid: + validate_availability_type_value = index(local.availability_type_allowed_values, var.availability_type) +} + +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token_a" { + description = "Smart-1 Cloud Token, for configuring member A" + type = string +} + +variable "smart_1_cloud_token_b" { + description = "Smart-1 Cloud Token, for configuring member B" + type = string +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "ha_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "cluster" +} + +variable "number_of_vm_instances" { + description = "Number of VM instances to deploy " + type = string + default = "2" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "frontend_subnet_name" { + description = "Frontend subnet name" + type = string +} + +variable "backend_subnet_name" { + description = "Backend subnet name" + type = string +} + +variable "frontend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth0 NICs and the cluster vip ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given frontend subnet prefix. The IP addresses are defined by their position in the frontend subnet." + type = list(number) +} + +variable "backend_IP_addresses" { + description = "A list of three whole numbers representing the private ip addresses of the members eth1 NICs and the backend lb ip addresses. The numbers can be represented as binary integers with no more than the number of digits remaining in the address after the given backend subnet prefix. The IP addresses are defined by their position in the backend subnet." + type = list(number) +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "lb_probe_name" { + description = "Name to be used for lb health probe" + default = "health_prob_port" +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "use_public_ip_prefix" { + description = "Indicates whether the public IP resources will be deployed with public IP prefix." + type = bool + default = false +} + +variable "create_public_ip_prefix" { + description = "Indicates whether the public IP prefix will created or an existing will be used." + type = bool + default = false +} + +variable "existing_public_ip_prefix_id" { + description = "The existing public IP prefix resource id." + type = string + default = "" +} + +locals{ + # Validate both s1c tokens are used or both empty + is_both_tokens_used = length(var.smart_1_cloud_token_a) > 0 == length(var.smart_1_cloud_token_b) > 0 + validation_message_both = "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" + _ = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.smart_1_cloud_token_a) > 0 + # Validate both s1c tokens are unqiue + token_parts_a = split(" ",var.smart_1_cloud_token_a) + token_parts_b = split(" ",var.smart_1_cloud_token_b) + acutal_token_a = local.token_parts_a[length(local.token_parts_a) - 1] + acutal_token_b = local.token_parts_b[length(local.token_parts_b) - 1] + is_both_tokens_the_same = local.acutal_token_a == local.acutal_token_b + validation_message_unique = "Same Smart-1 Cloud token used for both memeber, you must provide unique token for each member" + __ = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" +} \ No newline at end of file diff --git a/terraform/azure/high-availability-existing-vnet/versions.tf b/terraform/azure/high-availability-existing-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/high-availability-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/high-availability-new-vnet/README.md b/terraform/azure/high-availability-new-vnet/README.md new file mode 100755 index 00000000..51153c0a --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/README.md @@ -0,0 +1,242 @@ +# Check Point CloudGuard IaaS High Availability Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS High Availability solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- System assigned identity +- Availability Set - conditional creation + +For additional information, +please see the [CloudGuard Network for Azure High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_HA_Cluster/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/high-availability-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**", "**User Access Administrator**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/high-availability-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a | + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a | + | | | | | | + | **cluster_name** | The name of the Check Point Cluster Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a | + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.0.0.0/16" | + | | | | | | + | **subnet_prefixes** | The address prefixes to be used for created subnets | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | ["10.0.0.0/24", "10.0.1.0/24"] | + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a | + | | | | | | + | **smart_1_cloud_token_a** | Smart-1 Cloud token to connect automatically ***Member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart_1_cloud_token_b** | Smart-1 Cloud token to connect automatically ***Member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a | + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license;| n/a | + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a | + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a | + | | | | | | + | **availability_type** | Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone | string | "Availability Zone";
"Availability Set"; | "Availability Zone" | + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for Cluster members monitoring | boolean | true;
false; | true | + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false | + | | | | | | + | **use_public_ip_prefix** | Indicates whether the public IP resources will be deployed with public IP prefix | boolean | true;
false; | false| + | | | | | | + | **create_public_ip_prefix** | Indicates whether the public IP prefix will created or an existing will be used | boolean | true;
false; | false | + | | | | | | + | **existing_public_ip_prefix_id** | The existing public IP prefix resource id | string | Existing public IP prefix resource id | ""| + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" | + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Conditional creation +- To deploy the solution based on Azure Availability Set and create a new Availability Set for the virtual machines: +``` +availability_type = "Availability Set" +``` + Otherwise, to deploy the solution based on Azure Availability Zone: +``` +availability_type = "Availability Zone" +``` +- To enable CloudGuard metrics in order to send statuses and statistics collected from HA instances to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` +- To create new public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = true + ``` +- To use an exisiting public IP prefix for the public IP: + ``` + use_public_ip_prefix = true + create_public_ip_prefix = false + existing_public_ip_prefix_id = "public IP prefix resource id" + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-ha-terraform" + cluster_name = "checkpoint-ha-terraform" + location = "eastus" + vnet_name = "checkpoint-ha-vnet" + address_space = "10.0.0.0/16" + subnet_prefixes = ["10.0.1.0/24","10.0.2.0/24"] + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token_a = "xxxxxxxxxxxx" + smart_1_cloud_token_b = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_type = "Availability Zone" + enable_custom_metrics = true + enable_floating_ip = false + use_public_ip_prefix = false + create_public_ip_prefix = false + existing_public_ip_prefix_id = "" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230212 | - Added Smart-1 Cloud support | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Merge ha-availability-set-new-vnet and ha-availability-zones-new-vnet deployments to one deployment.
- Adding support for R81.
- Add support to CloudGuards metrics.
- Update resources for NSG https://github.com/CheckPointSW/CloudGuardIaaS/issues/67
- The cluster member current state is kept when redeploying.
- Avoid role-assignment re-creation when re-apply | +| | | | +| 20200508 |- Add backend load balancer rules resource.
- Rename the health probe for the backend load balancer.
- Rename the template name to "ha" | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/high-availability-new-vnet/azure_public_key b/terraform/azure/high-availability-new-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/high-availability-new-vnet/cloud-init.sh b/terraform/azure/high-availability-new-vnet/cloud-init.sh new file mode 100755 index 00000000..0609bfcf --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/cloud-init.sh @@ -0,0 +1,22 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +tenantId="${tenant_id}" +virtualNetwork="${virtual_network}" +clusterName="${cluster_name}" +externalPrivateAddresses="${external_private_addresses}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +smart1CloudToken="${smart_1_cloud_token}" +Vips='[{"name": "cluster-vip", "privateIPAddress": "${external_private_addresses}", "publicIPAddress": "${cluster_name}"}]' +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/high-availability-new-vnet/main.tf b/terraform/azure/high-availability-new-vnet/main.tf new file mode 100755 index 00000000..1506b913 --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/main.tf @@ -0,0 +1,550 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id + address_space = var.address_space + subnet_prefixes = var.subnet_prefixes +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip_prefix" "public_ip_prefix" { + count = var.use_public_ip_prefix && var.create_public_ip_prefix ? 1 : 0 + name = "${module.common.resource_group_name}-ipprefix" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + prefix_length = 30 +} + +resource "azurerm_public_ip" "public-ip" { + count = 2 + name = "${var.cluster_name}${count.index+1}_IP" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${count.index+1}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_public_ip" "cluster-vip" { + name = var.cluster_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-vip-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_network_interface" "nic_vip" { + depends_on = [ + azurerm_public_ip.cluster-vip, + azurerm_public_ip.public-ip] + name = "${var.cluster_name}1-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 5) + public_ip_address_id = azurerm_public_ip.public-ip.0.id + } + ip_configuration { + name = "cluster-vip" + subnet_id = module.vnet.vnet_subnets[0] + primary = false + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 7) + public_ip_address_id = azurerm_public_ip.cluster-vip.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_vip_lb_association" { + depends_on = [azurerm_network_interface.nic_vip, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic_vip.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip, + azurerm_lb.frontend-lb] + name = "${var.cluster_name}2-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig1" + primary = true + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[0], 6) + public_ip_address_id = azurerm_public_ip.public-ip.1.id + } + lifecycle { + ignore_changes = [ + # Ignore changes to ip_configuration when Re-applying, e.g. because a cluster failover and associating the cluster- vip with the other member. + # updates these based on some ruleset managed elsewhere. + ip_configuration + ] + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic_lb_association" { + depends_on = [azurerm_network_interface.nic, azurerm_lb_backend_address_pool.frontend-lb-pool] + network_interface_id = azurerm_network_interface.nic.id + ip_configuration_name = "ipconfig1" + backend_address_pool_id = azurerm_lb_backend_address_pool.frontend-lb-pool.id +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [ + azurerm_lb.backend-lb] + count = 2 + name = "${var.cluster_name}${count.index+1}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], count.index+5) + } +} + +resource "azurerm_network_interface_backend_address_pool_association" "nic1_lb_association" { + depends_on = [azurerm_network_interface.nic1, azurerm_lb_backend_address_pool.backend-lb-pool] + count = 2 + network_interface_id = azurerm_network_interface.nic1[count.index].id + ip_configuration_name = "ipconfig2" + backend_address_pool_id = azurerm_lb_backend_address_pool.backend-lb-pool.id +} + +//********************** Load Balancers **************************// +resource "azurerm_public_ip" "public-ip-lb" { + name = "frontend_lb_ip" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.cluster_name)}-${random_id.random_id.hex}" + public_ip_prefix_id = var.use_public_ip_prefix ? (var.create_public_ip_prefix ? azurerm_public_ip_prefix.public_ip_prefix[0].id : var.existing_public_ip_prefix_id) : null +} + +resource "azurerm_lb" "frontend-lb" { +// depends_on = [ +// azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "LoadBalancerFrontend" + public_ip_address_id = azurerm_public_ip.public-ip-lb.id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + loadbalancer_id = azurerm_lb.frontend-lb.id + name = "frontend-lb-pool" +} + +resource "azurerm_lb" "backend-lb" { + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], 4) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb.id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = 2 + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb.id : azurerm_lb.backend-lb.id + name = var.lb_probe_name + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +resource "azurerm_lb_rule" "backend_lb_rules" { + loadbalancer_id = azurerm_lb.backend-lb.id + name = "backend-lb" + protocol = "All" + frontend_port = 0 + backend_port = 0 + frontend_ip_configuration_name = "backend-lb" + load_distribution = "Default" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool.id] + probe_id = azurerm_lb_probe.azure_lb_healprob[1].id + enable_floating_ip = var.enable_floating_ip +} + +//********************** Availability Set **************************// +locals { + availability_set_condition = var.availability_type == "Availability Set" ? true : false + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false +} +resource "azurerm_availability_set" "availability-set" { + count = local.availability_set_condition ? 1 : 0 + name = "${var.cluster_name}-AvailabilitySet" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + platform_fault_domain_count = 2 + platform_update_domain_count = 5 + managed = true +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} +resource "azurerm_virtual_machine" "vm-instance-availability-set" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? module.common.number_of_vm_instances : 0 + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + availability_set_id = local.availability_set_condition ? azurerm_availability_set.availability-set[0].id : "" + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${lower(var.cluster_name)}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = module.vnet.vnet_name + cluster_name = var.cluster_name + external_private_addresses = azurerm_network_interface.nic_vip.ip_configuration[1].private_ip_address + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} + +resource "azurerm_virtual_machine" "vm-instance-availability-zone" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1, + azurerm_network_interface.nic_vip] + count = local.availability_set_condition ? 0 : module.common.number_of_vm_instances + name = "${var.cluster_name}${count.index+1}" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + zones = [ + count.index+1] + vm_size = module.common.vm_size + network_interface_ids = count.index == 0 ? [ + azurerm_network_interface.nic_vip.id, + azurerm_network_interface.nic1.0.id] : [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.1.id] + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = count.index == 0 ? azurerm_network_interface.nic_vip.id : azurerm_network_interface.nic.id + identity { + type = module.common.vm_instance_identity + } + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = "${var.cluster_name}-${count.index+1}" + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + os_profile { + computer_name = "${lower(var.cluster_name)}${count.index+1}" + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + tenant_id = var.tenant_id + virtual_network = module.vnet.vnet_name + cluster_name = var.cluster_name + external_private_addresses = cidrhost(module.vnet.subnet_prefixes[0], 7) + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + smart_1_cloud_token = count.index == 0 ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } +} +//********************** Role Assigments **************************// +data "azurerm_role_definition" "virtual_machine_contributor_role_definition" { + name = "Virtual Machine Contributor" +} +data "azurerm_role_definition" "reader_role_definition" { + name = "Reader" +} +data "azurerm_client_config" "client_config" { +} +resource "azurerm_role_assignment" "cluster_virtual_machine_contributor_assignment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.virtual_machine_contributor_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} +resource "azurerm_role_assignment" "cluster_reader_assigment" { + count = 2 + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } + scope = module.common.resource_group_id + role_definition_id = data.azurerm_role_definition.reader_role_definition.id + principal_id = local.availability_set_condition ? lookup(azurerm_virtual_machine.vm-instance-availability-set[count.index].identity[0], "principal_id") : lookup(azurerm_virtual_machine.vm-instance-availability-zone[count.index].identity[0], "principal_id") +} \ No newline at end of file diff --git a/terraform/azure/high-availability-new-vnet/terraform.tfvars b/terraform/azure/high-availability-new-vnet/terraform.tfvars new file mode 100755 index 00000000..7cd8490e --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/terraform.tfvars @@ -0,0 +1,36 @@ +//#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-ha-terraform" +cluster_name = "PLEASE ENTER CLUSTER NAME" # "checkpoint-ha-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-ha-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefixes = "PLEASE ENTER ADDRESS PREFIXES FOR SUBNETS" # ["10.0.1.0/24","10.0.2.0/24"] +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_type = "PLEASE ENTER AVAILABILITY TYPE" # "Availability Zone" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +use_public_ip_prefix = "PLEASE ENTER true or false" # false +create_public_ip_prefix = "PLEASE ENTER true or false" # false +existing_public_ip_prefix_id = "PLEASE ENTER IP PREFIX RESOURCE ID" # "" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/high-availability-new-vnet/variables.tf b/terraform/azure/high-availability-new-vnet/variables.tf new file mode 100755 index 00000000..6bb79338 --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/variables.tf @@ -0,0 +1,328 @@ +//********************** Basic Configuration Variables **************************// +variable "cluster_name" { + description = "Cluster name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "availability_type" { + description = "Specifies whether to deploy the solution based on Azure Availability Set or based on Azure Availability Zone." + type = string + default = "Availability Zone" +} + +locals { // locals for 'availability_type' allowed values + availability_type_allowed_values = [ + "Availability Zone", + "Availability Set" + ] + // will fail if [var.availability_type] is invalid: + validate_availability_type_value = index(local.availability_type_allowed_values, var.availability_type) +} + +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Macine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token_a" { + description = "Smart-1 Cloud Token, for configuring member A" + type = string +} + +variable "smart_1_cloud_token_b" { + description = "Smart-1 Cloud Token, for configuring member B" + type = string +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "ha_terraform" +} + +variable "template_version" { + description = "Template version. It is reccomended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "cluster" +} + +variable "number_of_vm_instances" { + description = "Number of VM instances to deploy " + type = string + default = "2" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Natworking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefixes" { + description = "Address prefix to be used for netwok subnets" + type = list(string) + default = [ + "10.0.0.0/24", + "10.0.1.0/24"] +} + +variable "lb_probe_name" { + description = "Name to be used for lb health probe" + default = "health_prob_port" +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule perfoms a check" + default = 5 +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Aplication ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "use_public_ip_prefix" { + description = "Indicates whether the public IP resources will be deployed with public IP prefix." + type = bool + default = false +} + +variable "create_public_ip_prefix" { + description = "Indicates whether the public IP prefix will created or an existing will be used." + type = bool + default = false +} + +variable "existing_public_ip_prefix_id" { + description = "The existing public IP prefix resource id." + type = string + default = "" +} + +locals{ + # Validate both s1c tokens are used or both empty + is_both_tokens_used = length(var.smart_1_cloud_token_a) > 0 == length(var.smart_1_cloud_token_b) > 0 + validation_message_both = "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" + _ = regex("^$", (local.is_both_tokens_used ? "" : local.validation_message_both)) + + is_tokens_used = length(var.smart_1_cloud_token_a) > 0 + # Validate both s1c tokens are unqiue + token_parts_a = split(" ",var.smart_1_cloud_token_a) + token_parts_b = split(" ",var.smart_1_cloud_token_b) + acutal_token_a = local.token_parts_a[length(local.token_parts_a) - 1] + acutal_token_b = local.token_parts_b[length(local.token_parts_b) - 1] + is_both_tokens_the_same = local.acutal_token_a == local.acutal_token_b + validation_message_unique = "Same Smart-1 Cloud token used for both memeber, you must provide unique token for each member" + __ = local.is_tokens_used ? regex("^$", (local.is_both_tokens_the_same ? local.validation_message_unique : "")) : "" +} \ No newline at end of file diff --git a/terraform/azure/high-availability-new-vnet/versions.tf b/terraform/azure/high-availability-new-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/high-availability-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/management-existing-vnet/README.md b/terraform/azure/management-existing-vnet/README.md new file mode 100755 index 00000000..3ab73dbd --- /dev/null +++ b/terraform/azure/management-existing-vnet/README.md @@ -0,0 +1,189 @@ +# Check Point CloudGuard IaaS Management Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS Management solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/management-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/management-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mgmt_name** | Management name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **management_subnet_name** | Management subnet name | string | The exact name of the existing subnet | n/a + | | | | | | + | **subnet_1st_Address** | The first available address of the subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mgmt_enable_api** | Enable api access to the management | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mgmt-terraform" + mgmt_name = "checkpoint-mgmt-terraform" + location = "eastus" + vnet_name = "checkpoint-mgmt-vnet" + vnet_resource_group = "existing-vnet" + management_subnet_name = "mgmt-subnet" + subnet_1st_Address = "10.0.1.4" + management_GUI_client_network = "0.0.0.0/0" + mgmt_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS Management Terraform deployment into an existing Vnet in Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/management-existing-vnet/azure_public_key b/terraform/azure/management-existing-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/management-existing-vnet/cloud-init.sh b/terraform/azure/management-existing-vnet/cloud-init.sh new file mode 100755 index 00000000..4639554e --- /dev/null +++ b/terraform/azure/management-existing-vnet/cloud-init.sh @@ -0,0 +1,16 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/management-existing-vnet/main.tf b/terraform/azure/management-existing-vnet/main.tf new file mode 100755 index 00000000..a471b842 --- /dev/null +++ b/terraform/azure/management-existing-vnet/main.tf @@ -0,0 +1,312 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "mgmt_subnet" { + name = var.management_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mgmt_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mgmt_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mgmt_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.mgmt_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mgmt-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mgmt_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.mgmt_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mgmt_enable_api + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mgmt_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} \ No newline at end of file diff --git a/terraform/azure/management-existing-vnet/terraform.tfvars b/terraform/azure/management-existing-vnet/terraform.tfvars new file mode 100755 index 00000000..ea2f8f7e --- /dev/null +++ b/terraform/azure/management-existing-vnet/terraform.tfvars @@ -0,0 +1,30 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mgmt-terraform" +mgmt_name = "PLEASE ENTER MANAGEMENT NAME" # "checkpoint-mgmt-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mgmt-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +management_subnet_name = "PLEASE ENTER MGMT SUBNET NAME" # "mgmt-subnet" +subnet_1st_Address = "PLEASE ENTER AVAILABLE ADDRESS OF THE SUBNET" # "10.0.1.4" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mgmt_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/management-existing-vnet/variables.tf b/terraform/azure/management-existing-vnet/variables.tf new file mode 100755 index 00000000..6030652b --- /dev/null +++ b/terraform/azure/management-existing-vnet/variables.tf @@ -0,0 +1,251 @@ +//********************** Basic Configuration Variables **************************// +variable "mgmt_name" { + description = "Management name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss)" + type = string + default = "mgmt_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "management" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "management_subnet_name" { + description = "management subnet name" + type = string +} + +variable "subnet_1st_Address" { + description = "The first available address of the subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "mgmt_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + mgmt_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mgmt_enable_api] is invalid: + validate_mgmt_enable_api_value = index(local.mgmt_enable_api_allowed_values, var.mgmt_enable_api) + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_1st_Address) == var.subnet_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/terraform/azure/management-existing-vnet/versions.tf b/terraform/azure/management-existing-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/management-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/management-new-vnet/README.md b/terraform/azure/management-new-vnet/README.md new file mode 100755 index 00000000..f744dccc --- /dev/null +++ b/terraform/azure/management-new-vnet/README.md @@ -0,0 +1,187 @@ +# Check Point CloudGuard IaaS Management Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/management-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/management-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mgmt_name** | Management name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address space that is used by a Virtual Network | string | A valid address in CIDR notation | "10.0.0.0/16" + | | | | | | + | **subnet_prefix** | Address prefix to be used for network subnet | string | A valid address in CIDR notation | "10.0.0.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mgmt_enable_api** | Enable api access to the management | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mgmt-terraform" + mgmt_name = "checkpoint-mgmt-terraform" + location = "eastus" + vnet_name = "checkpoint-mgmt-vnet" + address_space = "10.0.0.0/16" + subnet_prefix = "10.0.0.0/24" + management_GUI_client_network = "0.0.0.0/0" + mgmt_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS Management Terraform deployment into a new Vnet in Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/management-new-vnet/azure_public_key b/terraform/azure/management-new-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/management-new-vnet/cloud-init.sh b/terraform/azure/management-new-vnet/cloud-init.sh new file mode 100755 index 00000000..4639554e --- /dev/null +++ b/terraform/azure/management-new-vnet/cloud-init.sh @@ -0,0 +1,16 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/management-new-vnet/main.tf b/terraform/azure/management-new-vnet/main.tf new file mode 100755 index 00000000..77c16ac6 --- /dev/null +++ b/terraform/azure/management-new-vnet/main.tf @@ -0,0 +1,316 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.subnet_prefix] + subnet_names = ["${var.mgmt_name}-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mgmt_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mgmt_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mgmt_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mgmt-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mgmt_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.mgmt_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mgmt_enable_api + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mgmt_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/terraform/azure/management-new-vnet/terraform.tfvars b/terraform/azure/management-new-vnet/terraform.tfvars new file mode 100755 index 00000000..163314eb --- /dev/null +++ b/terraform/azure/management-new-vnet/terraform.tfvars @@ -0,0 +1,29 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mgmt-terraform" +mgmt_name = "PLEASE ENTER MANAGEMENT NAME" # "checkpoint-mgmt-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mgmt-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR SUBNET" # "10.0.0.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mgmt_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/management-new-vnet/variables.tf b/terraform/azure/management-new-vnet/variables.tf new file mode 100755 index 00000000..63839bd0 --- /dev/null +++ b/terraform/azure/management-new-vnet/variables.tf @@ -0,0 +1,249 @@ +//********************** Basic Configuration Variables **************************// +variable "mgmt_name" { + description = "Management name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Macine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss)" + type = string + default = "mgmt_terraform" +} + +variable "template_version" { + description = "Template version. It is reccomended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "management" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120", + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Natworking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefix" { + description = "Address prefix to be used for network subnet" + type = string + default = "10.0.0.0/24" +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "mgmt_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + mgmt_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mgmt_enable_api] is invalid: + validate_mgmt_enable_api_value = index(local.mgmt_enable_api_allowed_values, var.mgmt_enable_api) + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_subnet_prefix = regex(local.regex_valid_network_cidr, var.subnet_prefix) == var.subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Aplication ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/terraform/azure/management-new-vnet/versions.tf b/terraform/azure/management-new-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/management-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/mds-existing-vnet/README.md b/terraform/azure/mds-existing-vnet/README.md new file mode 100755 index 00000000..7c8003fd --- /dev/null +++ b/terraform/azure/mds-existing-vnet/README.md @@ -0,0 +1,195 @@ +# Check Point CloudGuard Network Security MDS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/mds-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/mds-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mds_name** | MDS name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **management_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **subnet_1st_Address** | First available address in management subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mds_enable_api** | Enable api access to the mds | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on the mds | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **sic_key** | Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **installation_type** | Enables to select installation type - gateway/standalone | string | mds-primary;
mds-secondary;
mds-logserver; | n/a + | | | | | | + | **primary** | Indicates if the installation type is mds-primary | boolean | true;
false; | n/a + | | | | | | + | **secondary** | Indicates if the installation type is mds-secondary | boolean | true;
false; | n/a + | | | | | | + | **logserver** | Indicates if the installation type is mds-logserver | boolean | true;
false; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mds-rg-terraform" + mds_name = "checkpoint-mds-terraform" + location = "eastus" + vnet_name = "checkpoint-mds-vnet" + vnet_resource_group = "existing-vnet" + management_subnet_name = "mgmt-subnet" + subnet_1st_Address = "10.0.1.4" + management_GUI_client_network = "0.0.0.0/0" + mds_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + sic_key = "xxxxxxxxxxxx" + installation_type = "mds-primary" + primary = "true" + secondary = "false" + logserver = "false" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/mds-existing-vnet/azure_public_key b/terraform/azure/mds-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/terraform/azure/mds-existing-vnet/cloud-init.sh b/terraform/azure/mds-existing-vnet/cloud-init.sh new file mode 100755 index 00000000..627de012 --- /dev/null +++ b/terraform/azure/mds-existing-vnet/cloud-init.sh @@ -0,0 +1,20 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +primary="${primary}" +secondary="${secondary}" +logserver="${logserver}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/mds-existing-vnet/main.tf b/terraform/azure/mds-existing-vnet/main.tf new file mode 100755 index 00000000..0c8719f1 --- /dev/null +++ b/terraform/azure/mds-existing-vnet/main.tf @@ -0,0 +1,316 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + template_name = var.template_name + installation_type = var.installation_type + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "mds_subnet" { + name = var.management_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mds_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mds_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mds_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.mds_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mds-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mds_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.mds_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = var.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mds_enable_api + admin_shell = var.admin_shell + sic_key = var.sic_key + primary = var.primary + secondary = var.secondary + logserver = var.logserver + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mds_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} \ No newline at end of file diff --git a/terraform/azure/mds-existing-vnet/terraform.tfvars b/terraform/azure/mds-existing-vnet/terraform.tfvars new file mode 100755 index 00000000..61547ee1 --- /dev/null +++ b/terraform/azure/mds-existing-vnet/terraform.tfvars @@ -0,0 +1,35 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mds-rg-terraform" +mds_name = "PLEASE ENTER MDS NAME" # "checkpoint-mds-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mds-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK RESOURCE GROUP NAME" # "existing-vnet" +management_subnet_name = "PLEASE ENTER MANAGEMENT SUBNET NAME" # "mgmt-subnet" +subnet_1st_Address = "PLEASE ENTER SUBNET FIRST ADDRESS" # "10.0.1.4" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mds_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "mds-primary" +primary = "PLEASE ENTER true or false" # "true" +secondary = "PLEASE ENTER true or false" # "false" +logserver = "PLEASE ENTER true or false" # "false" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/mds-existing-vnet/variables.tf b/terraform/azure/mds-existing-vnet/variables.tf new file mode 100755 index 00000000..8896ceae --- /dev/null +++ b/terraform/azure/mds-existing-vnet/variables.tf @@ -0,0 +1,280 @@ +//********************** Basic Configuration Variables **************************// +variable "mds_name" { + description = "MDS name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mds, ha, vmss)" + type = string + default = "mds_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "mds-primary" +} + +variable "primary" { + type = string +} + +variable "secondary" { + type = string +} + +variable "logserver" { + type = string +} + +locals { //locals for 'installation_type' + isntallation_type_allowed_values = [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "management_subnet_name" { + description = "management subnet name" + type = string +} + +variable "subnet_1st_Address" { + description = "The first available address of the subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string + validation { + condition = can(regex("(^0\\.0\\.0\\.0\\/0$)|(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", var.management_GUI_client_network)) && var.management_GUI_client_network != "0.0.0.0/32" + error_message = "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)." + } +} + +variable "mds_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + mds_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mds_enable_api] is invalid: + validate_mds_enable_api_value = index(local.mds_enable_api_allowed_values, var.mds_enable_api) + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_1st_Address) == var.subnet_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************** Credentials **************************// + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable sic_key { + description = "sic_key" + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} diff --git a/terraform/azure/mds-existing-vnet/versions.tf b/terraform/azure/mds-existing-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/mds-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/mds-new-vnet/README.md b/terraform/azure/mds-new-vnet/README.md new file mode 100755 index 00000000..293c3862 --- /dev/null +++ b/terraform/azure/mds-new-vnet/README.md @@ -0,0 +1,188 @@ +# Check Point CloudGuard Network Security MDS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Management solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Virtual Machine +- System assigned identity + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/mds-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/mds-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **mds_name** | MDS name | string | | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address space that is used by a Virtual Network | string | A valid address in CIDR notation | "10.0.0.0/16" + | | | | | | + | **subnet_prefix** | Address prefix to be used for network subnet | string | A valid address in CIDR notation | "10.0.0.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **mds_enable_api** | Enable api access to the mds | string | - "all";
- "management_only";
- "gui_clients"
- "disable"; | "disable" + | | | | | | + | **admin_password** | The password associated with the local administrator account on the mds | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **sic_key** | Set the Secure Internal Communication one time secret used to set up trust between the primary and secondary servers. SIC key must be provided if installing a secondary Multi-Domain Server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | mds-primary;
mds-secondary;
mds-logserver; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-mds-rg-terraform" + mds_name = "checkpoint-mds-terraform" + location = "eastus" + vnet_name = "checkpoint-mds-vnet" + address_space = "10.0.0.0/16" + subnet_prefix = "10.0.0.0/24" + management_GUI_client_network = "0.0.0.0/0" + mds_enable_api = "disable" + admin_password = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "mgmt-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + admin_shell = "/etc/cli.sh" + sic_key = "xxxxxxxxxxxx" + installation_type = "mds-primary" + primary = "true" + secondary = "false" + logserver = "false" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | +| | | | + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/mds-new-vnet/azure_public_key b/terraform/azure/mds-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/terraform/azure/mds-new-vnet/cloud-init.sh b/terraform/azure/mds-new-vnet/cloud-init.sh new file mode 100755 index 00000000..627de012 --- /dev/null +++ b/terraform/azure/mds-new-vnet/cloud-init.sh @@ -0,0 +1,20 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +managementGUIClientNetwork="${management_GUI_client_network}" +enableApi="${enable_api}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +primary="${primary}" +secondary="${secondary}" +logserver="${logserver}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/mds-new-vnet/main.tf b/terraform/azure/mds-new-vnet/main.tf new file mode 100755 index 00000000..7f2c1de9 --- /dev/null +++ b/terraform/azure/mds-new-vnet/main.tf @@ -0,0 +1,321 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = false + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.subnet_prefix] + subnet_names = ["${var.mds_name}-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "SSH" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "22" + description = "Allow inbound SSH connection" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "GAiA-portal" + priority = "110" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "443" + description = "Allow inbound HTTPS access to the GAiA portal" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-1" + priority = "120" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18190" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "SmartConsole-2" + priority = "130" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "19009" + description = "Allow inbound access using the SmartConsole GUI client" + source_address_prefix = var.management_GUI_client_network + destination_address_prefix = "*" + }, + { + name = "Logs" + priority = "140" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "257" + description = "Allow inbound logging connections from managed gateways" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "ICA-pull" + priority = "150" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18210" + description = "Allow security gateways to pull a SIC certificate" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "CRL-fetch" + priority = "160" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18264" + description = "Allow security gateways to fetch CRLs" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "Policy-fetch" + priority = "170" + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_ranges = "*" + destination_port_ranges = "18191" + description = "Allow security gateways to fetch policy" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.mds_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.mds_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.mds_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = false + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "mds-vm-instance" { + depends_on = [ + azurerm_network_interface.nic] + location = module.common.resource_group_location + name = var.mds_name + network_interface_ids = [ + azurerm_network_interface.nic.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.mds_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = var.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + management_GUI_client_network = var.management_GUI_client_network + enable_api = var.mds_enable_api + admin_shell = var.admin_shell + sic_key = var.sic_key + primary = var.primary + secondary = var.secondary + logserver = var.logserver + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.mds_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/terraform/azure/mds-new-vnet/terraform.tfvars b/terraform/azure/mds-new-vnet/terraform.tfvars new file mode 100755 index 00000000..7a1045b3 --- /dev/null +++ b/terraform/azure/mds-new-vnet/terraform.tfvars @@ -0,0 +1,34 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-mds-rg-terraform" +mds_name = "PLEASE ENTER MDS NAME" # "checkpoint-mds-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-mds-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR SUBNET" # "10.0.0.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +mds_enable_api = "PLEASE ENTER FOR WHOM TO ENABLE API ACCESS OR disable" # "disable" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "mgmt-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "mds-primary" +primary = "PLEASE ENTER true or false" # "true" +secondary = "PLEASE ENTER true or false" # "false" +logserver = "PLEASE ENTER true or false" # "false" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/mds-new-vnet/variables.tf b/terraform/azure/mds-new-vnet/variables.tf new file mode 100755 index 00000000..9ce9d0ba --- /dev/null +++ b/terraform/azure/mds-new-vnet/variables.tf @@ -0,0 +1,278 @@ +//********************** Basic Configuration Variables **************************// +variable "mds_name" { + description = "MDS name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mds, ha, vmss)" + type = string + default = "mds_terraform" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installaiton type" + type = string + default = "mds-primary" +} + +variable "primary" { + type = string +} + +variable "secondary" { + type = string +} + +variable "logserver" { + type = string +} + +locals { //locals for 'installation_type' + isntallation_type_allowed_values = [ + "mds-primary", + "mds-secondary", + "mds-logserver" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefix" { + description = "Address prefix to be used for network subnet" + type = string + default = "10.0.0.0/24" +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string + validation { + condition = can(regex("(^0\\.0\\.0\\.0\\/0$)|(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/32)?$)", var.management_GUI_client_network)) && var.management_GUI_client_network != "0.0.0.0/32" + error_message = "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR (only 0.0.0.0/0, X.X.X.X/32 or X.X.X.X are acceptable)." + } +} + +variable "mds_enable_api" { + description = "Enable api access to the management. allowed values: all, management_only, gui_clients, disable" + type = string + default = "disable" +} + +locals { + mds_enable_api_allowed_values = [ + "disable", + "all", + "management_only", + "gui_clients" + ] + // will fail if [var.mds_enable_api] is invalid: + validate_mds_enable_api_value = index(local.mds_enable_api_allowed_values, var.mds_enable_api) + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_subnet_prefix = regex(local.regex_valid_network_cidr, var.subnet_prefix) == var.subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + description = "sic key" + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/terraform/azure/mds-new-vnet/versions.tf b/terraform/azure/mds-new-vnet/versions.tf new file mode 100755 index 00000000..de940e72 --- /dev/null +++ b/terraform/azure/mds-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} diff --git a/terraform/azure/modules/add-routing-intent.py b/terraform/azure/modules/add-routing-intent.py new file mode 100644 index 00000000..87437061 --- /dev/null +++ b/terraform/azure/modules/add-routing-intent.py @@ -0,0 +1,29 @@ +import json +import requests +import sys + + +def perform_put_request(url, data, headers=None): + """ + This function perform the PUT request to Azure in order to edit the vWAN Hub Routing-Intent + """ + result = {"status": "success", "message": ""} + try: + response = requests.put(url, json=data, headers=headers) + result["message"] = response.text + except Exception as e: + result["status"] = "error" + result["message"] = f"An error occurred: {str(e)}" + return result + + +if __name__ == "__main__": + """ + This script receives url, body, and authorization token as arguments and set vWAN Hub Routing-Intent + """ + api_url = sys.argv[1] + api_data = eval(sys.argv[2]) + auth_token = sys.argv[3] + api_headers = {"Authorization": f'Bearer {auth_token}'} + result = perform_put_request(api_url, api_data, api_headers) + print(json.dumps(result)) diff --git a/terraform/azure/modules/common/main.tf b/terraform/azure/modules/common/main.tf new file mode 100755 index 00000000..08bc5f97 --- /dev/null +++ b/terraform/azure/modules/common/main.tf @@ -0,0 +1,5 @@ +resource "azurerm_resource_group" "resource_group" { + name = var.resource_group_name + location = var.location +} + diff --git a/terraform/azure/modules/common/outputs.tf b/terraform/azure/modules/common/outputs.tf new file mode 100755 index 00000000..1d4ad2b0 --- /dev/null +++ b/terraform/azure/modules/common/outputs.tf @@ -0,0 +1,130 @@ +output "resource_group_name" { + value = azurerm_resource_group.resource_group.name +} + +output "resource_group_id" { + value = azurerm_resource_group.resource_group.id +} + +output "resource_group_location" { + value = azurerm_resource_group.resource_group.location +} + +output "azurerm_resource_group_id" { + value = azurerm_resource_group.resource_group.id +} + +output "admin_username" { + value = var.admin_username +} + +output "admin_password"{ + value = var.admin_password +} + +output "vm_instance_identity" { + value = var.vm_instance_identity_type +} + +output "template_name"{ + value = var.template_name +} + +output "template_version" { + value = var.template_version +} + +output "bootstrap_script"{ + value = var.bootstrap_script +} + +output "os_version" { + value = var.os_version +} + +output "installation_type" { + value = var.installation_type +} + +output "number_of_vm_instances" { + value = var.number_of_vm_instances +} + +output "allow_upload_download" { + value = var.allow_upload_download +} + +output "is_blink" { + value = var.is_blink +} + +output "vm_size" { + value = var.vm_size +} + +output "delete_os_disk_on_termination" { + value = var.delete_os_disk_on_termination +} + +output "vm_os_offer" { + value = var.vm_os_offer +} + +output "vm_os_sku" { + value = var.vm_os_sku +} + +output "vm_os_version" { + value = var.vm_os_version +} + +output "storage_account_type" { + value = var.storage_account_type +} + +output "storage_account_tier" { + value = var.storage_account_tier +} + +output "account_replication_type" { + value = var.account_replication_type +} + +output "disk_size" { + value = var.disk_size +} + +output "publisher" { + value = var.publisher +} + +output "storage_os_disk_create_option" { + value = var.storage_os_disk_create_option +} + +output "storage_os_disk_caching" { + value = var.storage_os_disk_caching +} + +output "managed_disk_type" { + value = var.managed_disk_type +} + +output "authentication_type" { + value = var.authentication_type +} + +output "tags" { + value = var.tags +} + +output "boot_diagnostics" { + value = var.boot_diagnostics +} + +output "storage_account_ip_rules" { + value = local.storage_account_ip_rules +} +output "role_definition" { + value = var.role_definition +} \ No newline at end of file diff --git a/terraform/azure/modules/common/variables.tf b/terraform/azure/modules/common/variables.tf new file mode 100755 index 00000000..e768159b --- /dev/null +++ b/terraform/azure/modules/common/variables.tf @@ -0,0 +1,369 @@ +//************** Basic config variables**************// +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "resource_group_id" { + description = "Azure Resource Group ID to use." + type = string + default = "" +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} +//************** Virtual machine instance variables ************** +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + type = string + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "tags" { + type = map(string) + description = "A map of the tags to use on the resources that are deployed with this module." + default = {} +} + +variable "boot_diagnostics" { + type = bool + description = "Enable or Disable boot diagnostics" + default = true +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] + validation { + condition = !contains(var.storage_account_additional_ips, "0.0.0.0") && can([for ip in var.storage_account_additional_ips: regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", ip)]) + error_message = "Invalid IPv4 address." + } +} +locals { + serial_console_ips_per_location = { + "eastasia" : ["20.205.69.28", "20.195.85.180"], + "southeastasia" : ["20.205.69.28", "20.195.85.180"], + "australiacentral" : ["20.53.53.224", "20.70.222.112"], + "australiacentral2" : ["20.53.53.224", "20.70.222.112"], + "australiaeast" : ["20.53.53.224", "20.70.222.112"], + "australiasoutheast" : ["20.53.53.224", "20.70.222.112"], + "brazilsouth" : ["91.234.136.63", "20.206.0.194"], + "brazilsoutheast" : ["91.234.136.63", "20.206.0.194"], + "canadacentral" : ["52.228.86.177", "52.242.40.90"], + "canadaeast" : ["52.228.86.177", "52.242.40.90"], + "northeurope" : ["52.146.139.220", "20.105.209.72"], + "westeurope" : ["52.146.139.220", "20.105.209.72"], + "francecentral" : ["20.111.0.244", "52.136.191.10"], + "francesouth" : ["20.111.0.244", "52.136.191.10"], + "germanynorth" : ["51.116.75.88", "20.52.95.48"], + "germanywestcentral" : ["51.116.75.88", "20.52.95.48"], + "centralindia" : ["20.192.168.150", "20.192.153.104"], + "southindia" : ["20.192.168.150", "20.192.153.104"], + "westindia" : ["20.192.168.150", "20.192.153.104"], + "japaneast" : ["20.43.70.205", "20.189.228.222"], + "japanwest" : ["20.43.70.205", "20.189.228.222"], + "koreacentral" : ["20.200.196.96", "52.147.119.29"], + "koreasouth" : ["20.200.196.96", "52.147.119.29"], + "norwaywest" : ["20.100.1.184", "51.13.138.76"], + "norwayeast" : ["20.100.1.184", "51.13.138.76"], + "switzerlandnorth" : ["20.208.4.98", "51.107.251.190"], + "switzerlandwest" : ["20.208.4.98", "51.107.251.190"], + "uaecentral" : ["20.45.95.66", "20.38.141.5"], + "uaenorth" : ["20.45.95.66", "20.38.141.5"], + "uksouth" : ["20.90.132.144", "20.58.68.62"], + "ukwest" : ["20.90.132.144", "20.58.68.62"], + "swedencentral" : ["51.12.72.223", "51.12.22.174"], + "swedensouth" : ["51.12.72.223", "51.12.22.174"], + "centralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "northcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "southcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus2" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus3" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westcentralus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "westus" : ["20.98.146.84", "20.98.194.64", "20.69.5.162", "20.83.222.102"], + "eastus2euap" : ["20.45.242.18", "20.51.21.252"], + "centraluseuap" : ["20.45.242.18", "20.51.21.252"] + } + serial_console_ips = contains(keys(local.serial_console_ips_per_location),var.location) ? local.serial_console_ips_per_location[var.location] : [] + storage_account_ip_rules = concat(local.serial_console_ips, var.storage_account_additional_ips) +} +variable "vm_instance_identity_type" { + description = "Managed Service Identity type" + type = string + default = "SystemAssigned" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string +} + +variable "template_version"{ + description = "Template name. Should be defined according to deployment type(e.g. ha, vmss)" + type = string +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + type = string + default = "" +} + +variable "os_version"{ + description = "GAIA OS version" + type = string +} + +locals { // locals for 'os_version' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.installation_type] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "installation_type"{ + description = "Installation type. Allowed values: cluster, vmss" + type = string +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "cluster", + "vmss", + "management", + "standalone", + "gateway", + "mds-primary", + "mds-secondary", + "mds-logserver" + ] + // will fail if [var.installation_type] is invalid: + validate_installation_type_value = index(local.installation_type_allowed_values, var.installation_type) +} + +variable "number_of_vm_instances"{ + description = "Number of VM instances to deploy" + type = string +} + +variable "allow_upload_download" { + description = "Allow upload/download to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +locals {// locals for 'vm_size' allowed values + allowed_vm_sizes = ["Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", + "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", + "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", + "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", + "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", + "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", + "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", + "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", + "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", + "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", + "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", + "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", + "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", + "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", + "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" + ] + // will fail if [var.vm_size] is invalid: + validate_vm_size_value = index(local.allowed_vm_sizes, var.vm_size) +} +variable "delete_os_disk_on_termination" { + type = bool + description = "Delete datadisk when VM is terminated" + default = true +} + +variable "publisher" { + description = "CheckPoint publisher" + default = "checkpoint" +} + +//************** Storage image reference and plan variables ****************// +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) + validate_os_version_match = regex(split("-", var.vm_os_offer)[3], lower(var.os_version)) +} + +variable "vm_os_sku" { + /* + Choose from: + - "sg-byol" + - "sg-ngtp" (for R80.40 and above) + - "sg-ngtx" (for R80.40 and above) + - "mgmt-byol" + - "mgmt-25" + */ + description = "The sku of the image to be deployed" + type = string +} + +locals { // locals for 'vm_os_sku' allowed values + vm_os_sku_allowed_values = [ + "sg-byol", + "sg-ngtp", + "sg-ngtx", + "mgmt-byol", + "mgmt-25" + ] + // will fail if [var.vm_os_sku] is invalid: + validate_vm_os_sku_value = index(local.vm_os_sku_allowed_values, var.vm_os_sku) +} + +variable "vm_os_version" { + description = "The version of the image that you want to deploy. " + type = string + default = "latest" +} + +variable "storage_account_type" { + description = "Defines the type of storage account to be created. Valid options is Standard_LRS, Premium_LRS" + type = string + default = "Standard_LRS" +} + +locals { // locals for 'storage_account_type' allowed values + storage_account_type_allowed_values = [ + "Standard_LRS", + "Premium_LRS" + ] + // will fail if [var.storage_account_type] is invalid: + validate_storage_account_type_value = index(local.storage_account_type_allowed_values, var.storage_account_type) +} + +variable "storage_account_tier" { + description = "Defines the Tier to use for this storage account.Valid options are Standard and Premium" + default = "Standard" +} + +locals { // locals for 'storage_account_tier' allowed values + storage_account_tier_allowed_values = [ + "Standard", + "Premium" + ] + // will fail if [var.storage_account_tier] is invalid: + validate_storage_account_tier_value = index(local.storage_account_tier_allowed_values, var.storage_account_tier) +} + +variable "account_replication_type" { + description = "Defines the type of replication to use for this storage account.Valid options are LRS, GRS, RAGRS and ZRS" + type = string + default = "LRS" +} + +locals { // locals for 'account_replication_type' allowed values + account_replication_type_allowed_values = [ + "LRS", + "GRS", + "RAGRS", + "ZRS" + ] + // will fail if [var.account_replication_type] is invalid: + validate_account_replication_type_value = index(local.account_replication_type_allowed_values, var.account_replication_type) +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 3995 + count = tonumber(var.disk_size) >= 100 && tonumber(var.disk_size) <= 3995 ? 0 : "variable disk_size must be a number between 100 and 3995" +} + +//************** Storage OS disk variables **************// +variable "storage_os_disk_create_option" { + description = "The method to use when creating the managed disk" + type = string + default = "FromImage" +} + +variable "storage_os_disk_caching" { + description = "Specifies the caching requirements for the OS Disk" + default = "ReadWrite" +} + +variable "managed_disk_type" { + description = "Specifies the type of managed disk to create. Possible values are either Standard_LRS, StandardSSD_LRS, Premium_LRS" + type = string + default = "Standard_LRS" +} + +locals { // locals for 'managed_disk_type' allowed values + managed_disk_type_allowed_values = [ + "Standard_LRS", + "Premium_LRS" + ] + // will fail if [var.managed_disk_type] is invalid: + validate_managed_disk_type_value = index(local.managed_disk_type_allowed_values, var.managed_disk_type) +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + + +//********************** Role Assignments variables**************************// +variable "role_definition" { + description = "Role definition. The full list of Azure Built-in role descriptions can be found at https://docs.microsoft.com/bs-latn-ba/azure/role-based-access-control/built-in-roles" + type = string + default = "Contributor" +} \ No newline at end of file diff --git a/terraform/azure/modules/common/versions.tf b/terraform/azure/modules/common/versions.tf new file mode 100755 index 00000000..0ec4dcca --- /dev/null +++ b/terraform/azure/modules/common/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/terraform/azure/modules/network-security-group/main.tf b/terraform/azure/modules/network-security-group/main.tf new file mode 100755 index 00000000..1beeaf14 --- /dev/null +++ b/terraform/azure/modules/network-security-group/main.tf @@ -0,0 +1,23 @@ +resource "azurerm_network_security_group" "nsg" { + name = var.security_group_name + location = var.location + resource_group_name = var.resource_group_name + tags = var.tags + } + +//************ Security Rule Example **************// +resource "azurerm_network_security_rule" "security_rule" { + count = length(var.security_rules) + name = lookup(var.security_rules[count.index], "name") + priority = lookup(var.security_rules[count.index], "priority", 4096 - length(var.security_rules) + count.index) + direction = lookup(var.security_rules[count.index], "direction") + access = lookup(var.security_rules[count.index], "access") + protocol = lookup(var.security_rules[count.index], "protocol") + source_port_range = lookup(var.security_rules[count.index], "source_port_ranges") + destination_port_range = lookup(var.security_rules[count.index], "destination_port_ranges") + description = lookup(var.security_rules[count.index], "description") + source_address_prefix = lookup(var.security_rules[count.index], "source_address_prefix") + destination_address_prefix = lookup(var.security_rules[count.index], "destination_address_prefix") + resource_group_name = var.resource_group_name + network_security_group_name = azurerm_network_security_group.nsg.name +} diff --git a/terraform/azure/modules/network-security-group/output.tf b/terraform/azure/modules/network-security-group/output.tf new file mode 100755 index 00000000..c1aa127d --- /dev/null +++ b/terraform/azure/modules/network-security-group/output.tf @@ -0,0 +1,7 @@ +output "network_security_group_id" { + value = azurerm_network_security_group.nsg.id +} + +output "network_security_group_name" { + value = azurerm_network_security_group.nsg.name +} \ No newline at end of file diff --git a/terraform/azure/modules/network-security-group/variables.tf b/terraform/azure/modules/network-security-group/variables.tf new file mode 100755 index 00000000..363489e3 --- /dev/null +++ b/terraform/azure/modules/network-security-group/variables.tf @@ -0,0 +1,43 @@ +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + type = string + description = "The location/region where Network Security Group will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" +} + +variable "security_group_name" { + description = "Network Security Group name" + default = "nsg" +} + +variable "tags" { + description = "The tags to associate with Network Security Group" + type = map(string) + default = {} +} + +# Security Rules definition + +variable "security_rules" { + description = "Security rules for the Network Security Group using this format name = [priority, direction, access, protocol, source_port_range, destination_port_range, source_address_prefix, destination_address_prefix, description]" + type = list(any) + default = [] +} + +variable "source_address_prefix" { + description = "Source address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/24"] or ["VirtualNetwork"] +} + +variable "destination_address_prefix" { + description = "Destination address prefix to be applied to all rules" + type = list(string) + default = ["*"] + # Example ["10.0.3.0/32","10.0.3.128/32"] or ["VirtualNetwork"] +} + diff --git a/terraform/azure/modules/network-security-group/versions.tf b/terraform/azure/modules/network-security-group/versions.tf new file mode 100755 index 00000000..0ec4dcca --- /dev/null +++ b/terraform/azure/modules/network-security-group/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/terraform/azure/modules/vnet/main.tf b/terraform/azure/modules/vnet/main.tf new file mode 100755 index 00000000..2c67fc4f --- /dev/null +++ b/terraform/azure/modules/vnet/main.tf @@ -0,0 +1,80 @@ +resource "azurerm_virtual_network" "vnet" { + name = var.vnet_name + location = var.location + address_space = [var.address_space] + resource_group_name = var.resource_group_name + dns_servers = var.dns_servers + tags = var.tags +} + +resource "azurerm_subnet" "subnet" { + depends_on = [azurerm_virtual_network.vnet] + count = length(var.subnet_names) + name = var.subnet_names[count.index] + virtual_network_name = azurerm_virtual_network.vnet.name + resource_group_name = var.resource_group_name + address_prefixes = [var.subnet_prefixes[count.index]] +} + +resource "azurerm_subnet_network_security_group_association" "security_group_frontend_association" { + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[0]] + subnet_id = azurerm_subnet.subnet[0].id + network_security_group_id = var.nsg_id +} +resource "azurerm_subnet_network_security_group_association" "security_group_backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + depends_on = [azurerm_virtual_network.vnet, azurerm_subnet.subnet[1]] + subnet_id = azurerm_subnet.subnet[1].id + network_security_group_id = var.nsg_id +} + +locals { // locals for 'next_hop_type' allowed values + next_hop_type_allowed_values = [ + "VirtualNetworkGateway", + "VnetLocal", + "Internet", + "VirtualAppliance", + "None" + ] +} + +resource "azurerm_route_table" "frontend" { + name = azurerm_subnet.subnet[0].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "Local-Subnet" + address_prefix = azurerm_subnet.subnet[0].address_prefixes[0] + next_hop_type = local.next_hop_type_allowed_values[1] + } + route { + name = "To-Internal" + address_prefix = var.address_space + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "frontend_association" { + subnet_id = azurerm_subnet.subnet[0].id + route_table_id = azurerm_route_table.frontend.id +} + +resource "azurerm_route_table" "backend" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + name = azurerm_subnet.subnet[1].name + location = var.location + resource_group_name = var.resource_group_name + + route { + name = "To-Internet" + address_prefix = "0.0.0.0/0" + next_hop_type = local.next_hop_type_allowed_values[4] + } +} + +resource "azurerm_subnet_route_table_association" "backend_association" { + count = length(var.subnet_names) >= 2 ? 1 : 0 + subnet_id = azurerm_subnet.subnet[1].id + route_table_id = azurerm_route_table.backend[count.index].id +} diff --git a/terraform/azure/modules/vnet/outputs.tf b/terraform/azure/modules/vnet/outputs.tf new file mode 100755 index 00000000..9dc8e206 --- /dev/null +++ b/terraform/azure/modules/vnet/outputs.tf @@ -0,0 +1,27 @@ +output "vnet_id" { + value = azurerm_virtual_network.vnet.id +} + +output "vnet_name" { + value = azurerm_virtual_network.vnet.name +} + +output "vnet_location" { + value = azurerm_virtual_network.vnet.location +} + +output "vnet_address_space" { + value = azurerm_virtual_network.vnet.address_space +} + +output "vnet_subnets" { + value = azurerm_subnet.subnet.*.id +} + +output "subnet_prefixes" { + value = var.subnet_prefixes +} + +output "allocation_method" { + value = var.allocation_method +} \ No newline at end of file diff --git a/terraform/azure/modules/vnet/variables.tf b/terraform/azure/modules/vnet/variables.tf new file mode 100755 index 00000000..1f64d28e --- /dev/null +++ b/terraform/azure/modules/vnet/variables.tf @@ -0,0 +1,63 @@ +variable "vnet_name" { + description = "Name of Virtual Network" + type = string + default = "vnet01" +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where the core network will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +variable "address_space" { + description = "The address prefixes of the virtual network" + type = string + default = "10.0.0.0/16" +} + +variable "dns_servers" { + description = " DNS servers to be used with a Virtual Network. If no values specified, this defaults to Azure DNS" + type = list(string) + default = [] +} + +variable "subnet_prefixes" { + description = "The address prefixes to be used for subnets" + type = list(string) + default = ["10.0.0.0/24","10.0.1.0/24"] +} + +variable "subnet_names" { + description = "A list of subnet names in a Virtual Network" + type = list(string) + default = ["Frontend","Backend"] +} + +variable "tags" { + description = "Tags to be associated with Virtual Network and subnets" + type = map(string) + default = {} +} +variable "nsg_id" { + description = "Network security group to be associated with a Virtual Network and subnets" + type = string +} + +variable "allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +locals { // locals for 'allocation_method' allowed values + allocation_method_allowed_values = [ + "Static" + ] + // will fail if [var.allocation_method] is invalid: + validate_method_allowed_value = index(local.allocation_method_allowed_values, var.allocation_method) +} \ No newline at end of file diff --git a/terraform/azure/modules/vnet/versions.tf b/terraform/azure/modules/vnet/versions.tf new file mode 100755 index 00000000..0ec4dcca --- /dev/null +++ b/terraform/azure/modules/vnet/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.14.3" +} \ No newline at end of file diff --git a/terraform/azure/nva-into-existing-hub/README.md b/terraform/azure/nva-into-existing-hub/README.md new file mode 100644 index 00000000..a2765298 --- /dev/null +++ b/terraform/azure/nva-into-existing-hub/README.md @@ -0,0 +1,172 @@ +# Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into an existing vWAN Hub in Azure. +As part of the deployment the following resources are created: +- Resource groups +- Azure Managed Application: + - NVA + - Managed identity + +For additional information, +please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_vWAN/Default.htm) + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure). +- In order to configure hub routing-intent policies it is **required** to have Python and 'requests' library installed. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the versions.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/nva-into-existing-hub/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | + | **authentication_method** | The authentication method used to deploy the solution | string | "Service Principal";
"Azure CLI"; | n/a + | | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **resource-group-name** | The name of the resource group that will contain the managed application | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period| "tf-managed-app-resource-group" | + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of supported Azure regions can be found at https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-locations-partners#locations | "westcentralus" | + | | | | | | + | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | + | | | | | | + | **vwan-hub-resource-group** | The virtual WAN hub resource group name | string | | n/a | + | | | | | | + | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-managed-app-nva" | + | | | | | | + | **nva-name** | The name of the NVA that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-nva" | + | | | | | | + | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | "tf-vwan-nva-rg"| + | | | | | | + | **os-version** | The GAIA os version | string | "R8110"
"R8120" | "R8120" | + | | | | | | + | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | + | | | | | | | | | | + | **scale-unit** | The scale unit determines the size and number of resources deployed. The higher the scale unit, the greater the amount of traffic that can be handled. | string | "2"
"4"
"10"
"20"
"30"
"60"
"80"
| "2" | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | | | | | | + | **sic-key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | | | | | | + | **ssh-public-key** | The public ssh key used for ssh connection to the NVA GW instances | string | ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx generated-by-azure; | n/a | | string | gateway;
standalone; | + | | | | | | + | **bgp-asn** | The BGP autonomous system number | string | 64512 | "64512" || + | | | | | | + | **custom-metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | string | yes;
no; | "yes" | + | | | | | | + | **routing-intent-internet-traffic** | Set routing intent policy to allow internet traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | | | | | | + | **routing-intent-private-traffic** | Set routing intent policy to allow private traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | | | | | | + | **smart1-cloud-token-a** | Smart-1 Cloud token to connect automatically ***NVA instance a*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-b** | Smart-1 Cloud token to connect automatically ***NVA instance b*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-c** | Smart-1 Cloud token to connect automatically ***NVA instance c*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-d** | Smart-1 Cloud token to connect automatically ***NVA instance d*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | | | | | + | **smart1-cloud-token-e** | Smart-1 Cloud token to connect automatically ***NVA instance e*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + custom-metrics = yes + ``` + +## Example + authentication_method = "Service Principal" + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + resource-group-name = "tf-managed-app-resource-group" + location = "westcentralus" + vwan-hub-name = "tf-vwan-hub" + vwan-hub-resource-group = "tf-vwan-hub-rg" + managed-app-name = "tf-vwan-managed-app-nva" + nva-rg-name = "tf-vwan-nva-rg" + nva-name = "tf-vwan-nva" + os-version = "R8120" + license-type = "Security Enforcement (NGTP)" + scale-unit = "2" + bootstrap-script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + admin-shell = "/etc/cli.sh" + sic-key = "xxxxxxxxxxxx" + ssh-public-key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + bgp-asn = "64512" + custom-metrics = "yes" + routing-intent-internet-traffic = "yes" + routing-intent-private-traffic = "yes" + smart1-cloud-token-a = "" + smart1-cloud-token-b = "" + smart1-cloud-token-c = "" + smart1-cloud-token-d = "" + smart1-cloud-token-e = "" + existing-public-ip = "" + new-public-ip = "yes" + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------| +| 20240613 | Cosmetic fixes & default values | +| 20240228 | Added public IP for ingress support | | | +| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/nva-into-existing-hub/main.tf b/terraform/azure/nva-into-existing-hub/main.tf new file mode 100644 index 00000000..5987c76b --- /dev/null +++ b/terraform/azure/nva-into-existing-hub/main.tf @@ -0,0 +1,195 @@ +//********************** Basic Configuration **************************// +resource "azurerm_resource_group" "managed-app-rg" { + name = var.resource-group-name + location = var.location +} + +data "azurerm_virtual_hub" "vwan-hub" { + name = var.vwan-hub-name + resource_group_name = var.vwan-hub-resource-group +} + +//********************** Image Version **************************// + +data "external" "az_access_token" { + count = var.authentication_method == "Azure CLI" ? 1 : 0 + program = ["az", "account", "get-access-token", "--resource=https://management.azure.com", "--query={accessToken: accessToken}", "--output=json"] +} + +data "http" "azure_auth" { + count = var.authentication_method == "Service Principal" ? 1 : 0 + url = "https://login.microsoftonline.com/${var.tenant_id}/oauth2/v2.0/token" + method = "POST" + request_headers = { + "Content-Type" = "application/x-www-form-urlencoded" + } + request_body = "grant_type=client_credentials&client_id=${var.client_id}&client_secret=${var.client_secret}&scope=https://management.azure.com/.default" +} + +locals { + access_token = var.authentication_method == "Service Principal" ? jsondecode(data.http.azure_auth[0].response_body).access_token : data.external.az_access_token[0].result.accessToken +} + +data "http" "image-versions" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSKUs/checkpoint${var.license-type == "Full Package (NGTX + S1C)" ? "-ngtx" : var.license-type == "Full Package Premium (NGTX + S1C++)" ? "-premium" : ""}?api-version=2020-05-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +locals { + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + routing_intent-internet-policy = { + "name": "InternetTraffic", + "destinations": [ + "Internet" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing_intent-private-policy = { + "name": "PrivateTrafficPolicy", + "destinations": [ + "PrivateTraffic" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing-intent-policies = var.routing-intent-internet-traffic == "yes" ? (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-internet-policy, local.routing_intent-private-policy]) : tolist([local.routing_intent-internet-policy])) : (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-private-policy]) : []) + req_body = jsonencode({"properties": {"routingPolicies": local.routing-intent-policies}}) + req_url = "https://management.azure.com/subscriptions/${var.subscription_id}/resourceGroups/${var.vwan-hub-resource-group}/providers/Microsoft.Network/virtualHubs/${var.vwan-hub-name}/routingIntent/hubRoutingIntent?api-version=2022-01-01" +} + +//********************** Marketplace Terms & Solution Registration **************************// +data "http" "accept-marketplace-terms-existing-agreement" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.MarketplaceOrdering/agreements/checkpoint/offers/cp-vwan-managed-app/plans/vwan-app?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_marketplace_agreement" "accept-marketplace-terms" { + count = can(jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).id) ? (jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).properties.state == "Active" ? 0 : 1) : 1 + publisher = "checkpoint" + offer = "cp-vwan-managed-app" + plan = "vwan-app" +} + +data "http" "azurerm_resource_provider_registration-exist" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Solutions?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_resource_provider_registration" "solutions" { + count = jsondecode(data.http.azurerm_resource_provider_registration-exist.response_body).registrationState == "Registered" ? 0 : 1 + name = "Microsoft.Solutions" +} + + +//********************** Managed Application Configuration **************************// +resource "azurerm_managed_application" "nva" { + depends_on = [azurerm_marketplace_agreement.accept-marketplace-terms, azurerm_resource_provider_registration.solutions] + name = var.managed-app-name + location = azurerm_resource_group.managed-app-rg.location + resource_group_name = azurerm_resource_group.managed-app-rg.name + kind = "MarketPlace" + managed_resource_group_name = var.nva-rg-name + + plan { + name = "vwan-app" + product = "cp-vwan-managed-app" + publisher = "checkpoint" + version = "1.0.14" + } + parameter_values = jsonencode({ + location = { + value = azurerm_resource_group.managed-app-rg.location + }, + hubId = { + value = data.azurerm_virtual_hub.vwan-hub.id + }, + osVersion = { + value = var.os-version + }, + LicenseType = { + value = var.license-type + }, + imageVersion = { + value = element(local.image_versions, length(local.image_versions) -1) + }, + scaleUnit = { + value = var.scale-unit + }, + bootstrapScript = { + value = var.bootstrap-script + }, + adminShell = { + value = var.admin-shell + }, + sicKey = { + value = var.sic-key + }, + sshPublicKey = { + value = var.ssh-public-key + }, + BGP = { + value = var.bgp-asn + }, + NVA = { + value = var.nva-name + }, + customMetrics = { + value = var.custom-metrics + }, + hubASN = { + value = data.azurerm_virtual_hub.vwan-hub.virtual_router_asn + }, + hubPeers = { + value = data.azurerm_virtual_hub.vwan-hub.virtual_router_ips + }, + smart1CloudTokenA = { + value = var.smart1-cloud-token-a + }, + smart1CloudTokenB = { + value = var.smart1-cloud-token-b + }, + smart1CloudTokenC = { + value = var.smart1-cloud-token-c + }, + smart1CloudTokenD = { + value = var.smart1-cloud-token-d + }, + smart1CloudTokenE = { + value = var.smart1-cloud-token-e + }, + publicIPIngress = { + value = (var.new-public-ip == "yes" || length(var.existing-public-ip) > 0) ? "yes" : "no" + }, + createNewIPIngress = { + value = var.new-public-ip + } + ipIngressExistingResourceId = { + value = var.existing-public-ip + } + }) +} + +//********************** Routing Intent **************************// + + +data "external" "update-routing-intent" { + count = length(local.routing-intent-policies) != 0 ? 1 : 0 + depends_on = [azurerm_managed_application.nva] + program = ["python", "../modules/add-routing-intent.py", "${local.req_url}", "${local.req_body}", "${local.access_token}"] +} + +output "api_request_result" { + value = length(local.routing-intent-policies) != 0 ? data.external.update-routing-intent[0].result : {routing-intent: "not changed"} +} + diff --git a/terraform/azure/nva-into-existing-hub/terraform.tfvars b/terraform/azure/nva-into-existing-hub/terraform.tfvars new file mode 100644 index 00000000..268fb4c1 --- /dev/null +++ b/terraform/azure/nva-into-existing-hub/terraform.tfvars @@ -0,0 +1,31 @@ +#PLEASE refer to the README.md for accepted values for the variables below +authentication_method = "PLEASE ENTER AUTHENTICATION METHOD" # "Service Principal" +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +resource-group-name = "PLEASE ENTER RESOURCE GROUP NAME" # "tf-managed-app-resource-group" +location = "PLEASE ENTER LOCATION" # "westcentralus" +vwan-hub-name = "PLEASE ENTER VWAN HUB NAME" # "tf-vwan-hub" +vwan-hub-resource-group = "PLEASE ENTER VWAN HUB RESOURCE GROUP" # "tf-vwan-hub-rg" +managed-app-name = "PLEASE ENTER MANAGED APPLICATION NAME" # "tf-vwan-managed-app-nva" +nva-rg-name = "PLEASE ENTER NVA RESOURCE GROUP NAME" # "tf-vwan-nva-rg" +nva-name = "PLEASE ENTER NVA NAME" # "tf-vwan-nva" +os-version = "PLEASE ENTER GAIA OS VERSION" # "R8120" +license-type = "PLEASE ENTER LICENSE TYPE" # "Security Enforcement (NGTP)" +scale-unit = "PLEASE ENTER SCALE UNIT" # "2" +bootstrap-script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +admin-shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic-key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxx" +ssh-public-key = "PLEASE ENTER SSH PUBLIC KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +bgp-asn = "PLEASE ENTER BGP AUTONOMOUS SYSTEM NUMBER" # "64512" +custom-metrics = "PLEASE ENTER yes or no" # "yes" +routing-intent-internet-traffic = "PLEASE ENTER yes or no" # "yes" +routing-intent-private-traffic = "PLEASE ENTER yes or no" # "yes" +smart1-cloud-token-a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE A OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE B OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-c = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE C OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-d = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE D OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-e = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE E OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +existing-public-ip = "PLEASE ENTER THE RESOURCE ID OF A PUBLIC IP RESOURCE OR LEAVE EMPTY DOUBLE QUOTES" # "/subscription/123/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1" +new-public-ip = "PLEASE ENTER yes or no" # "no" \ No newline at end of file diff --git a/terraform/azure/nva-into-existing-hub/variables.tf b/terraform/azure/nva-into-existing-hub/variables.tf new file mode 100644 index 00000000..d00283d4 --- /dev/null +++ b/terraform/azure/nva-into-existing-hub/variables.tf @@ -0,0 +1,198 @@ +variable "authentication_method" { + description = "Azure authentication method" + type = string + validation { + condition = contains(["Azure CLI", "Service Principal"], var.authentication_method) + error_message = "Valid values for authentication_method are 'Azure CLI','Service Principal'" + } +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "resource-group-name" { + type = string + default = "tf-managed-app-resource-group" +} + +variable "location" { + type = string + default = "westcentralus" +} + +variable "managed-app-name" { + type = string + default = "tf-vwan-managed-app-nva" +} + +variable "vwan-hub-name" { + type = string +} + +variable "vwan-hub-resource-group" { + type = string +} + +variable "nva-rg-name" { + type = string + default = "tf-vwan-nva-rg" +} + +variable "nva-name" { + type = string + default = "tf-vwan-nva" +} + +variable "os-version" { + description = "GAIA OS version" + type = string + default = "R8120" + validation { + condition = contains(["R8110", "R8120"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120'" + } +} + +variable "license-type" { + type = string + default = "Security Enforcement (NGTP)" + validation { + condition = contains(["Security Enforcement (NGTP)", "Full Package (NGTX + S1C)", "Full Package Premium (NGTX + S1C++)"], var.license-type) + error_message = "Allowed values for License Type are 'Security Enforcement (NGTP)', 'Full Package (NGTX + S1C)', 'Full Package Premium (NGTX + S1C++)'" + } +} + +variable "scale-unit" { + type = string + default = "2" + validation { + condition = contains(["2", "4", "10", "20", "30", "60", "80"], var.scale-unit) + error_message = "Valid values for CloudGuard version are '2', '4', '10', '20', '30', '60', '80'" + } +} + +variable "bootstrap-script" { + type = string + default = "" +} + +variable "admin-shell" { + type = string + default = "/etc/cli.sh" + validation { + condition = contains(["/etc/cli.sh", "/bin/bash", "/bin/tcsh", "/bin/csh"], var.admin-shell) + error_message = "Valid shells are '/etc/cli.sh', '/bin/bash', '/bin/tcsh', '/bin/csh'" + } +} + +variable "sic-key" { + type = string + default = "" + sensitive = true + validation { + condition = can(regex("^[a-z0-9A-Z]{12,30}$", var.sic-key)) + error_message = "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + } +} + +variable "ssh-public-key" { + type = string + default = "" +} + +variable "bgp-asn" { + type = string + default = "64512" + validation { + condition = tonumber(var.bgp-asn) >= 64512 && tonumber(var.bgp-asn) <= 65534 && !contains([65515, 65520], tonumber(var.bgp-asn)) + error_message = "Only numbers between 64512 to 65534 are allowed excluding 65515, 65520." + } +} + +variable "custom-metrics" { + type = string + default = "yes" + validation { + condition = contains(["yes", "no"], var.custom-metrics) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-internet-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-internet-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-private-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-private-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "smart1-cloud-token-a" { + type = string + default = "" +} + +variable "smart1-cloud-token-b" { + type = string + default = "" +} + +variable "smart1-cloud-token-c" { + type = string + default = "" +} + +variable "smart1-cloud-token-d" { + type = string + default = "" +} + +variable "smart1-cloud-token-e" { + type = string + default = "" +} + +variable "existing-public-ip" { + type = string + default = "" +} + +variable "new-public-ip" { + type = string + default = "no" + validation { + condition = contains(["yes", "no"], var.new-public-ip) + error_message = "Valid options are string('yes' or 'no')" + } +} + +locals{ + # Validate that new-public-ip is false when existing-public-ip is used + is_both_params_used = length(var.existing-public-ip) > 0 && var.new-public-ip == "yes" + validation_message_both = "Only one parameter of existing-public-ip or new-public-ip can be used" + _ = regex("^$", (!local.is_both_params_used ? "" : local.validation_message_both)) +} \ No newline at end of file diff --git a/terraform/azure/nva-into-existing-hub/versions.tf b/terraform/azure/nva-into-existing-hub/versions.tf new file mode 100644 index 00000000..1c68a298 --- /dev/null +++ b/terraform/azure/nva-into-existing-hub/versions.tf @@ -0,0 +1,17 @@ +terraform { + required_version = ">= 1.5.0" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = " 3.79.0" + } + } +} + +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + features {} +} diff --git a/terraform/azure/nva-into-new-vwan/README.md b/terraform/azure/nva-into-new-vwan/README.md new file mode 100644 index 00000000..52cc1b17 --- /dev/null +++ b/terraform/azure/nva-into-new-vwan/README.md @@ -0,0 +1,182 @@ +# Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into a new vWAN Hub in Azure. +As part of the deployment the following resources are created: +- Resource groups +- Virtual WAN +- Virtual WAN Hub +- Azure Managed Application: + - NVA + - Managed identity + +For additional information, +please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_Azure_vWAN/Default.htm) + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure). +- In order to configure hub routing-intent policies it is **required** to have Python and 'requests' library installed. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the versions.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/nva-into-new-vwan/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | + | **authentication_method** | The authentication method used to deploy the solution | string | "Service Principal";
"Azure CLI"; | n/a + | | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | || | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | || | | | + | **resource-group-name** | The name of the resource group that will contain the managed application | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | "managed-app-resource-group" | + | || | | | + | **location** | The region where the resources will be deployed at | string | The full list of supported Azure regions can be found at https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-locations-partners#locations | "westcentralus" | + | || | | | + | **vwan-name** | The name of the virtual WAN that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan" | + | || | | | + | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-hub" | + | || | | | + | **vwan-hub-address-prefix** | The address prefixes of the virtual hub | string | Valid CIDR block | "10.0.0.0/16" | + | || | | | + | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | tf-vwan-managed-app | + | || | | | + | **nva-name** | The name of the NVA that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | tf-vwan-nva | + | || | | | + | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | tf-vwan-nva-rg | + | || | | | + | **os-version** | The GAIA os version| string | "R8110"
"R8120" | "R8120" | + | || | | | + | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | + | || | | | + | **scale-unit** | The scale unit determines the size and number of resources deployed. The higher the scale unit, the greater the amount of traffic that can be handled. | string | "2"
"4"
"10"
"20"
"30"
"60"
"80"
| "2" | + | || | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | || | | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" | + | || | | | + | **sic-key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a | + | || | | | + | **ssh-public-key** | The public ssh key used for ssh connection to the NVA GW instances | string | ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx generated-by-azure; | n/a | | string | gateway;
standalone; | + | || | | | + | **bgp-asn** | The BGP autonomous system number. | string | 64512 | "64512" || + | || | | | + | **custom-metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | string | yes;
no; | "yes" | + | || | | | + | **routing-intent-internet-traffic** | Set routing intent policy to allow internet traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | || | | | + | **routing-intent-private-traffic** | Set routing intent policy to allow private traffic through the new nva | string | yes;
no;
Please verify routing-intent is configured successfully post-deployment | "yes" | + | || | | | + | **smart1-cloud-token-a** | Smart-1 Cloud token to connect automatically ***NVA instance a*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-b** | Smart-1 Cloud token to connect automatically ***NVA instance b*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-c** | Smart-1 Cloud token to connect automatically ***NVA instance c*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-d** | Smart-1 Cloud token to connect automatically ***NVA instance d*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | || | | | + | **smart1-cloud-token-e** | Smart-1 Cloud token to connect automatically ***NVA instance e*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | | + | | + | **existing-public-ip** | Existing public IP reosurce to attach to the newly deployed NVA | string | A resource ID of the public IP resource | | + | | | | | | + | **new-public-ip** | Deploy a new public IP resource as part of the managed app and attach to the NVA | string | yes;
no;| | + | | + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + custom-metrics = yes + ``` + +## Example + authentication_method = "Service Principal" + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + resource-group-name = "tf-managed-app-resource-group" + location = "westcentralus" + vwan-name = "tf-vwan" + vwan-hub-name = "tf-vwan-hub" + vwan-hub-address-prefix = "10.0.0.0/16" + managed-app-name = "tf-vwan-managed-app-nva" + nva-rg-name = "tf-vwan-nva-rg" + nva-name = "tf-vwan-nva" + os-version = "R8120" + license-type = "Security Enforcement (NGTP)" + scale-unit = "2" + bootstrap-script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + admin-shell = "/etc/cli.sh" + sic-key = "xxxxxxxxxxxx" + ssh-public-key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" + bgp-asn = "64512" + custom-metrics = "yes" + routing-intent-internet-traffic = "yes" + routing-intent-private-traffic = "yes" + smart1-cloud-token-a = "" + smart1-cloud-token-b = "" + smart1-cloud-token-c = "" + smart1-cloud-token-d = "" + smart1-cloud-token-e = "" + existing-public-ip = "" + new-public-ip = "yes" + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-----------------------------------------------------------------------------------------------| +| 20240613 | Cosmetic fixes & default values | +| 20240228 | Added public IP for ingress support | | | +| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/nva-into-new-vwan/main.tf b/terraform/azure/nva-into-new-vwan/main.tf new file mode 100644 index 00000000..43a409c3 --- /dev/null +++ b/terraform/azure/nva-into-new-vwan/main.tf @@ -0,0 +1,202 @@ +//********************** Basic Configuration **************************// +resource "azurerm_resource_group" "managed-app-rg" { + name = var.resource-group-name + location = var.location +} + +resource "azurerm_virtual_wan" "vwan" { + name = var.vwan-name + resource_group_name = azurerm_resource_group.managed-app-rg.name + location = var.location +} + +resource "azurerm_virtual_hub" "vwan-hub" { + name = var.vwan-hub-name + resource_group_name = azurerm_resource_group.managed-app-rg.name + location = azurerm_resource_group.managed-app-rg.location + address_prefix = var.vwan-hub-address-prefix + virtual_wan_id = azurerm_virtual_wan.vwan.id +} + +//********************** Image Version **************************// + +data "external" "az_access_token" { + count = var.authentication_method == "Azure CLI" ? 1 : 0 + program = ["az", "account", "get-access-token", "--resource=https://management.azure.com", "--query={accessToken: accessToken}", "--output=json"] +} + +data "http" "azure_auth" { + count = var.authentication_method == "Service Principal" ? 1 : 0 + url = "https://login.microsoftonline.com/${var.tenant_id}/oauth2/v2.0/token" + method = "POST" + request_headers = { + "Content-Type" = "application/x-www-form-urlencoded" + } + request_body = "grant_type=client_credentials&client_id=${var.client_id}&client_secret=${var.client_secret}&scope=https://management.azure.com/.default" +} + +locals { + access_token = var.authentication_method == "Service Principal" ? jsondecode(data.http.azure_auth[0].response_body).access_token : data.external.az_access_token[0].result.accessToken +} + +data "http" "image-versions" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSKUs/checkpoint${var.license-type == "Full Package (NGTX + S1C)" ? "-ngtx" : var.license-type == "Full Package Premium (NGTX + S1C++)" ? "-premium" : ""}?api-version=2020-05-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +locals { + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + routing_intent-internet-policy = { + "name": "InternetTraffic", + "destinations": [ + "Internet" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing_intent-private-policy = { + "name": "PrivateTrafficPolicy", + "destinations": [ + "PrivateTraffic" + ], + "nextHop": "/subscriptions/${var.subscription_id}/resourcegroups/${var.nva-rg-name}/providers/Microsoft.Network/networkVirtualAppliances/${var.nva-name}" + } + routing-intent-policies = var.routing-intent-internet-traffic == "yes" ? (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-internet-policy, local.routing_intent-private-policy]) : tolist([local.routing_intent-internet-policy])) : (var.routing-intent-private-traffic == "yes" ? tolist([local.routing_intent-private-policy]) : []) + req_body = jsonencode({"properties": {"routingPolicies": local.routing-intent-policies}}) + req_url = "https://management.azure.com/subscriptions/${var.subscription_id}/resourceGroups/${azurerm_resource_group.managed-app-rg.name}/providers/Microsoft.Network/virtualHubs/${var.vwan-hub-name}/routingIntent/hubRoutingIntent?api-version=2022-01-01" + +} + +//********************** Marketplace Terms & Solution Registration **************************// +data "http" "accept-marketplace-terms-existing-agreement" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.MarketplaceOrdering/agreements/checkpoint/offers/cp-vwan-managed-app/plans/vwan-app?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_marketplace_agreement" "accept-marketplace-terms" { + count = can(jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).id) ? (jsondecode(data.http.accept-marketplace-terms-existing-agreement.response_body).properties.state == "Active" ? 0 : 1) : 1 + publisher = "checkpoint" + offer = "cp-vwan-managed-app" + plan = "vwan-app" +} + + +data "http" "azurerm_resource_provider_registration-exist" { + method = "GET" + url = "https://management.azure.com/subscriptions/${var.subscription_id}/providers/Microsoft.Solutions?api-version=2021-01-01" + request_headers = { + Accept = "application/json" + "Authorization" = "Bearer ${local.access_token}" + } +} + +resource "azurerm_resource_provider_registration" "solutions" { + count = jsondecode(data.http.azurerm_resource_provider_registration-exist.response_body).registrationState == "Registered" ? 0 : 1 + name = "Microsoft.Solutions" +} + +//********************** Managed Application Configuration **************************// +resource "azurerm_managed_application" "nva" { + depends_on = [azurerm_marketplace_agreement.accept-marketplace-terms, azurerm_resource_provider_registration.solutions] + name = var.managed-app-name + location = azurerm_resource_group.managed-app-rg.location + resource_group_name = azurerm_resource_group.managed-app-rg.name + kind = "MarketPlace" + managed_resource_group_name = var.nva-rg-name + + plan { + name = "vwan-app" + product = "cp-vwan-managed-app" + publisher = "checkpoint" + version = "1.0.14" + } + parameter_values = jsonencode({ + location = { + value = azurerm_resource_group.managed-app-rg.location + }, + hubId = { + value = azurerm_virtual_hub.vwan-hub.id + }, + osVersion = { + value = var.os-version + }, + LicenseType = { + value = var.license-type + }, + imageVersion = { + value = element(local.image_versions, length(local.image_versions) -1) + }, + scaleUnit = { + value = var.scale-unit + }, + bootstrapScript = { + value = var.bootstrap-script + }, + adminShell = { + value = var.admin-shell + }, + sicKey = { + value = var.sic-key + }, + sshPublicKey = { + value = var.ssh-public-key + }, + BGP = { + value = var.bgp-asn + }, + NVA = { + value = var.nva-name + }, + customMetrics = { + value = var.custom-metrics + }, + hubASN = { + value = azurerm_virtual_hub.vwan-hub.virtual_router_asn + }, + hubPeers = { + value = azurerm_virtual_hub.vwan-hub.virtual_router_ips + }, + smart1CloudTokenA = { + value = var.smart1-cloud-token-a + }, + smart1CloudTokenB = { + value = var.smart1-cloud-token-b + }, + smart1CloudTokenC = { + value = var.smart1-cloud-token-c + }, + smart1CloudTokenD = { + value = var.smart1-cloud-token-d + }, + smart1CloudTokenE = { + value = var.smart1-cloud-token-e + }, + publicIPIngress = { + value = (var.new-public-ip == "yes" || length(var.existing-public-ip) > 0) ? "yes" : "no" + }, + createNewIPIngress = { + value = var.new-public-ip + } + ipIngressExistingResourceId = { + value = var.existing-public-ip + } + }) +} + +//********************** Routing Intent **************************// +data "external" "update-routing-intent" { + count = length(local.routing-intent-policies) != 0 ? 1 : 0 + depends_on = [azurerm_managed_application.nva] + program = ["python", "../modules/add-routing-intent.py", "${local.req_url}", "${local.req_body}", "${local.access_token}"] +} + +output "api_request_result" { + value = length(local.routing-intent-policies) != 0 ? data.external.update-routing-intent[0].result : {routing-intent: "not changed"} +} diff --git a/terraform/azure/nva-into-new-vwan/terraform.tfvars b/terraform/azure/nva-into-new-vwan/terraform.tfvars new file mode 100644 index 00000000..8473e72c --- /dev/null +++ b/terraform/azure/nva-into-new-vwan/terraform.tfvars @@ -0,0 +1,32 @@ +#PLEASE refer to the README.md for accepted values for the variables below +authentication_method = "PLEASE ENTER AUTHENTICATION METHOD" # "Service Principal" +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +resource-group-name = "PLEASE ENTER RESOURCE GROUP NAME" # "tf-managed-app-resource-group" +location = "PLEASE ENTER LOCATION" # "westcentralus" +vwan-name = "PLEASE ENTER VIRTUAL WAN NAME" # "tf-cp-vwan" +vwan-hub-name = "PLEASE ENTER VWAN HUB NAME" # "tf-cp-vwan-hub" +vwan-hub-address-prefix = "PLEASE ENTER VWAN HUB ADDRESS PREFIX" # "10.0.0.0/16" +managed-app-name = "PLEASE ENTER MANAGED APPLICATION NAME" # "tf-vwan-managed-app-nva" +nva-rg-name = "PLEASE ENTER NVA RESOURCE GROUP NAME" # "tf-vwan-nva-rg" +nva-name = "PLEASE ENTER NVA NAME" # "tf-vwan-nva" +os-version = "PLEASE ENTER GAIA OS VERSION" # "R8120" +license-type = "PLEASE ENTER LICENSE TYPE" # "Security Enforcement (NGTP)" +scale-unit = "PLEASE ENTER SCALE UNIT" # "2" +bootstrap-script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +admin-shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +sic-key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxx" +ssh-public-key = "PLEASE ENTER SSH PUBLIC KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +bgp-asn = "PLEASE ENTER BGP AUTONOMOUS SYSTEM NUMBER" # "64512" +custom-metrics = "PLEASE ENTER yes or no" # "yes" +routing-intent-internet-traffic = "PLEASE ENTER yes or no" # "yes" +routing-intent-private-traffic = "PLEASE ENTER yes or no" # "yes" +smart1-cloud-token-a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE A OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE B OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-c = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE C OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-d = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE D OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +smart1-cloud-token-e = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL FOR INSTANCE E OR LEAVE EMPTY DOUBLE QUOTES" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +existing-public-ip = "PLEASE ENTER THE RESOURCE ID OF A PUBLIC IP RESOURCE OR LEAVE EMPTY DOUBLE QUOTES" # "/subscription/123/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1" +new-public-ip = "PLEASE ENTER yes or no" # "no" \ No newline at end of file diff --git a/terraform/azure/nva-into-new-vwan/variables.tf b/terraform/azure/nva-into-new-vwan/variables.tf new file mode 100644 index 00000000..927592c9 --- /dev/null +++ b/terraform/azure/nva-into-new-vwan/variables.tf @@ -0,0 +1,209 @@ +variable "authentication_method" { + description = "Azure authentication method" + type = string + validation { + condition = contains(["Azure CLI", "Service Principal"], var.authentication_method) + error_message = "Valid values for authentication_method are 'Azure CLI','Service Principal'" + } +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "resource-group-name" { + type = string + default = "managed-app-resource-group" +} + +variable "location" { + type = string + default = "westcentralus" +} + +variable "vwan-name" { + type = string + default = "tf-vwan" +} + +variable "vwan-hub-name" { + type = string + default = "tf-vwan-hub" +} + +variable "vwan-hub-address-prefix" { + type = string + default = "10.0.0.0/16" + validation { + condition = can(cidrhost(var.vwan-hub-address-prefix, 0)) + error_message = "Please provide a valid CIDR specification for the VWAN address space" + } +} + +variable "managed-app-name" { + type = string + default = "tf-vwan-managed-app" +} + +variable "nva-rg-name" { + type = string + default = "tf-vwan-nva-rg" +} + +variable "nva-name" { + type = string + default = "tf-vwan-nva" +} + +variable "os-version" { + description = "GAIA OS version" + type = string + default = "R8120" + validation { + condition = contains(["R8110", "R8120"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120'" + } +} + +variable "license-type" { + type = string + default = "Security Enforcement (NGTP)" + validation { + condition = contains(["Security Enforcement (NGTP)", "Full Package (NGTX + S1C)", "Full Package Premium (NGTX + S1C++)"], var.license-type) + error_message = "Allowed values for License Type are 'Security Enforcement (NGTP)', 'Full Package (NGTX + S1C)', 'Full Package Premium (NGTX + S1C++)'" + } +} + +variable "scale-unit" { + type = string + default = "2" + validation { + condition = contains(["2", "4", "10", "20", "30", "60", "80"], var.scale-unit) + error_message = "Valid values for CloudGuard version are '2', '4', '10', '20', '30', '60', '80'" + } +} + +variable "bootstrap-script" { + type = string + default = "" +} + +variable "admin-shell" { + type = string + default = "/etc/cli.sh" + validation { + condition = contains(["/etc/cli.sh", "/bin/bash", "/bin/tcsh", "/bin/csh"], var.admin-shell) + error_message = "Valid shells are '/etc/cli.sh', '/bin/bash', '/bin/tcsh', '/bin/csh'" + } +} + +variable "sic-key" { + type = string + default = "" + sensitive = true + validation { + condition = can(regex("^[a-z0-9A-Z]{12,30}$", var.sic-key)) + error_message = "Only alphanumeric characters are allowed, and the value must be 12-30 characters long." + } +} + +variable "ssh-public-key" { + type = string + default = "" +} + +variable "bgp-asn" { + type = string + default = "64512" + validation { + condition = tonumber(var.bgp-asn) >= 64512 && tonumber(var.bgp-asn) <= 65534 && !contains([65515, 65520], tonumber(var.bgp-asn)) + error_message = "Only numbers between 64512 to 65534 are allowed excluding 65515, 65520." + } +} + +variable "custom-metrics" { + type = string + default = "yes" + validation { + condition = contains(["yes", "no"], var.custom-metrics) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-internet-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-internet-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "routing-intent-private-traffic" { + default = "yes" + validation { + condition = contains(["yes", "no"], var.routing-intent-private-traffic) + error_message = "Valid options are string('yes' or 'no')" + } +} + +variable "smart1-cloud-token-a" { + type = string + default = "" +} + +variable "smart1-cloud-token-b" { + type = string + default = "" +} + +variable "smart1-cloud-token-c" { + type = string + default = "" +} + +variable "smart1-cloud-token-d" { + type = string + default = "" +} + +variable "smart1-cloud-token-e" { + type = string + default = "" +} + +variable "existing-public-ip" { + type = string + default = "" +} + +variable "new-public-ip" { + type = string + default = "no" + validation { + condition = contains(["yes", "no"], var.new-public-ip) + error_message = "Valid options are string('yes' or 'no')" + } +} + +locals{ + # Validate that new-public-ip is false when existing-public-ip is used + is_both_params_used = length(var.existing-public-ip) > 0 && var.new-public-ip == "yes" + validation_message_both = "Only one parameter of existing-public-ip or new-public-ip can be used" + _ = regex("^$", (!local.is_both_params_used ? "" : local.validation_message_both)) +} \ No newline at end of file diff --git a/terraform/azure/nva-into-new-vwan/versions.tf b/terraform/azure/nva-into-new-vwan/versions.tf new file mode 100644 index 00000000..40d04f16 --- /dev/null +++ b/terraform/azure/nva-into-new-vwan/versions.tf @@ -0,0 +1,17 @@ +terraform { + required_version = ">= 1.5.0" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = " 3.79.0" + } + } +} + +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + features {} +} \ No newline at end of file diff --git a/terraform/azure/single-gateway-existing-vnet/README.md b/terraform/azure/single-gateway-existing-vnet/README.md new file mode 100755 index 00000000..73fa074d --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/README.md @@ -0,0 +1,200 @@ +# Check Point CloudGuard Network Security Single Gateway Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Single Gateway solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- System assigned identity + + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/single-gateway-existing-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/single-gateway-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- |---------| ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **single_gateway_name** | The name of the Check Point single GW Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a + | | | | | | + | **subnet_frontend_1st_Address** | First available address in frontend subnet | string | | n/a + | | | | | | + | **subnet_backend_1st_Address** | First available address in backend subnet | string | | n/a + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on the gateway | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **smart_1_cloud_token** | Smart-1 Cloud token to connect automatically ***Gateway*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a | + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for gateways monitoring | boolean | true;
false; | true + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | gateway;
standalone; | n/a + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-single-gw-terraform" + single_gateway_name = "checkpoint-single-gw-terraform" + location = "eastus" + vnet_name = "checkpoint-single-gw-vnet" + vnet_resource_group = "existing-vnet-rg" + subnet_frontend_name = "frontend" + subnet_backend_name = "backend" + subnet_frontend_1st_Address = "10.0.1.4" + subnet_backend_1st_Address = "10.12.1.5" + management_GUI_client_network = "0.0.0.0/0" + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + enable_custom_metrics = true + admin_shell = "/etc/cli.sh" + installation_type = "gateway" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | +| | | | + + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/single-gateway-existing-vnet/azure_public_key b/terraform/azure/single-gateway-existing-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/terraform/azure/single-gateway-existing-vnet/cloud-init.sh b/terraform/azure/single-gateway-existing-vnet/cloud-init.sh new file mode 100755 index 00000000..71bf3916 --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/cloud-init.sh @@ -0,0 +1,18 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +managementGUIClientNetwork="${management_GUI_client_network}" +smart1CloudToken="${smart_1_cloud_token}" +customMetrics="${enable_custom_metrics}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" \ No newline at end of file diff --git a/terraform/azure/single-gateway-existing-vnet/main.tf b/terraform/azure/single-gateway-existing-vnet/main.tf new file mode 100755 index 00000000..81ced59f --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/main.tf @@ -0,0 +1,257 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +data "azurerm_subnet" "frontend_subnet" { + name = var.subnet_frontend_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend_subnet" { + name = var.subnet_backend_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +resource "azurerm_public_ip" "public-ip" { + name = var.single_gateway_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.single_gateway_name), + "-", + random_id.randomId.hex]) +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.single_gateway_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.frontend_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_frontend_1st_Address + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [] + name = "${var.single_gateway_name}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend_subnet.id + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = var.subnet_backend_1st_Address + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "single-gateway-vm-instance" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1] + location = module.common.resource_group_location + name = var.single_gateway_name + network_interface_ids = [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.single_gateway_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + admin_shell = var.admin_shell + sic_key = var.sic_key + management_GUI_client_network = var.management_GUI_client_network + smart_1_cloud_token = var.smart_1_cloud_token + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.single_gateway_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/terraform/azure/single-gateway-existing-vnet/terraform.tfvars b/terraform/azure/single-gateway-existing-vnet/terraform.tfvars new file mode 100755 index 00000000..0a186633 --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/terraform.tfvars @@ -0,0 +1,35 @@ + #PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-single-terraform" +single_gateway_name = "PLEASE ENTER GW NAME" # "checkpoint-single-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-single-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK RG NAME" # "existing-vnet-rg" +subnet_frontend_name = "PLEASE ENTER VIRTUAL NETWORK FRONTEND SUBNET NAME" # "frontend" +subnet_backend_name = "PLEASE ENTER VIRTUAL NETWORK BACKEND SUBNET NAME" # "backend" +subnet_frontend_1st_Address = "PLEASE ENTER VIRTUAL NETWORK FRONTEND SUBNET FIRST ADDRESS" # "10.0.1.4" +subnet_backend_1st_Address = "PLEASE ENTER VIRTUAL NETWORK BACKEND SUBNET FIRST ADDRESS" # "10.0.2.5" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +enable_custom_metrics = "PLEASE ENTER true or false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "gateway" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] diff --git a/terraform/azure/single-gateway-existing-vnet/variables.tf b/terraform/azure/single-gateway-existing-vnet/variables.tf new file mode 100755 index 00000000..dd4dc15e --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/variables.tf @@ -0,0 +1,281 @@ +//********************** Basic Configuration Variables **************************// +variable "single_gateway_name" { + description = "Single gateway name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "smart_1_cloud_token" { + description = "Smart-1 Cloud Token" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss, sg)" + type = string + default = "single" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "Installation type" + type = string + default = "gateway" +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "gateway", + "standalone" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "subnet_frontend_name" { + description = "management subnet name" + type = string +} + +variable "subnet_backend_name" { + description = "management subnet name" + type = string +} + +variable "subnet_frontend_1st_Address" { + description = "The first available address of the frontend subnet" + type = string +} + +variable "subnet_backend_1st_Address" { + description = "The first available address of the backend subnet" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +locals { + regex_valid_single_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_single_GUI_client_network = regex(local.regex_valid_single_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + + regex_valid_subnet_1st_Address = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + // Will fail if var.subnet_1st_Address is invalid + regex_subnet_frontend_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_frontend_1st_Address) == var.subnet_frontend_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." + + regex_subnet_backend_1st_Address = regex(local.regex_valid_subnet_1st_Address, var.subnet_backend_1st_Address) == var.subnet_backend_1st_Address ? 0 : "Variable [subnet_1st_Address] must be a valid address." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/terraform/azure/single-gateway-existing-vnet/versions.tf b/terraform/azure/single-gateway-existing-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/single-gateway-existing-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/single-gateway-new-vnet/README.md b/terraform/azure/single-gateway-new-vnet/README.md new file mode 100755 index 00000000..d4d821ac --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/README.md @@ -0,0 +1,197 @@ +# Check Point CloudGuard Network Security Single Gateway Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard Network Security Single Gateway solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- System assigned identity + + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/single-gateway-new-vnet/azure_public_key file. + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/single-gateway-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- |----------------| ------------- | + | **client_secret** | The client secret value of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | n/a + | | | | | | + | **single_gateway_name** | The name of the Check Point single GW Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.12.0.0/16" + | | | | | | + | **frontend_subnet_prefix** | The address prefix to be used for created frontend subnet | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | "10.12.0.0/24" + | | | | | | + | **backend_subnet_prefix** | The address prefix to be used for created backend subnet | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | "10.12.1.0/24" + | | | | | | + | **management_GUI_client_network** | Allowed GUI clients - GUI clients network CIDR | string | | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on the gateway | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **smart_1_cloud_token** | Smart-1 Cloud token to connect automatically ***Gateway*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the gateway object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) | string | A number in the range 100 - 3995 (GB) | n/a + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether CloudGuard Metrics will be use for gateway monitoring | boolean | true;
false; | true + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **installation_type** | Enables to select installation type- gateway/standalone | string | gateway;
standalone; | n/a | string | gateway;
standalone; | + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if isn't provided will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +- To enable CloudGuard metrics in order to send statuses and statistics collected from the gateway instance to the Azure Monitor service: + ``` + enable_custom_metrics = true + ``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-single-gw-terraform" + single_gateway_name = "checkpoint-single-gw-terraform" + location = "eastus" + vnet_name = "checkpoint-single-gw-vnet" + address_space = "10.0.0.0/16" + frontend_subnet_prefix = "10.0.1.0/24" + backend_subnet_prefix = "10.0.2.0/24" + management_GUI_client_network = "0.0.0.0/0" + admin_password = "xxxxxxxxxxxx" + smart_1_cloud_token = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "110" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + enable_custom_metrics = true + admin_shell = "/etc/cli.sh" + installation_type = "gateway" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|---------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/single-gateway-new-vnet/azure_public_key b/terraform/azure/single-gateway-new-vnet/azure_public_key new file mode 100644 index 00000000..e69de29b diff --git a/terraform/azure/single-gateway-new-vnet/cloud-init.sh b/terraform/azure/single-gateway-new-vnet/cloud-init.sh new file mode 100755 index 00000000..71bf3916 --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/cloud-init.sh @@ -0,0 +1,18 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +adminShell="${admin_shell}" +sicKey="${sic_key}" +managementGUIClientNetwork="${management_GUI_client_network}" +smart1CloudToken="${smart_1_cloud_token}" +customMetrics="${enable_custom_metrics}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" \ No newline at end of file diff --git a/terraform/azure/single-gateway-new-vnet/main.tf b/terraform/azure/single-gateway-new-vnet/main.tf new file mode 100755 index 00000000..dcb817bf --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/main.tf @@ -0,0 +1,256 @@ +//********************** Providers **************************// +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = 1 + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + is_blink = var.is_blink + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + address_space = var.address_space + subnet_prefixes = [var.frontend_subnet_prefix, var.backend_subnet_prefix] + subnet_names = ["${var.single_gateway_name}-frontend-subnet", "${var.single_gateway_name}-backend-subnet"] + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}-nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +resource "azurerm_public_ip" "public-ip" { + name = var.single_gateway_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + idle_timeout_in_minutes = 30 + domain_name_label = join("", [ + lower(var.single_gateway_name), + "-", + random_id.randomId.hex]) +} + +resource "azurerm_network_interface_security_group_association" "security_group_association" { + depends_on = [azurerm_network_interface.nic, module.network-security-group] + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id +} + +resource "azurerm_network_interface" "nic" { + depends_on = [ + azurerm_public_ip.public-ip] + name = "${var.single_gateway_name}-eth0" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.frontend_subnet_prefix, 4) + public_ip_address_id = azurerm_public_ip.public-ip.id + } +} + +resource "azurerm_network_interface" "nic1" { + depends_on = [] + name = "${var.single_gateway_name}-eth1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + enable_ip_forwarding = true + enable_accelerated_networking = true + + + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = var.vnet_allocation_method + private_ip_address = cidrhost(var.backend_subnet_prefix, 4) + } +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "bootdiag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + account_kind = "Storage" + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } + +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_virtual_machine" "single-gateway-vm-instance" { + depends_on = [ + azurerm_network_interface.nic, + azurerm_network_interface.nic1] + location = module.common.resource_group_location + name = var.single_gateway_name + network_interface_ids = [ + azurerm_network_interface.nic.id, + azurerm_network_interface.nic1.id] + resource_group_name = module.common.resource_group_name + vm_size = module.common.vm_size + delete_os_disk_on_termination = module.common.delete_os_disk_on_termination + primary_network_interface_id = azurerm_network_interface.nic.id + + identity { + type = module.common.vm_instance_identity + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [ + ] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + boot_diagnostics { + enabled = module.common.boot_diagnostics + storage_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + os_profile { + computer_name = lower(var.single_gateway_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + admin_shell = var.admin_shell + sic_key = var.sic_key + management_GUI_client_network = var.management_GUI_client_network + smart_1_cloud_token = var.smart_1_cloud_token + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + }) + } + + os_profile_linux_config { + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "ssh_keys" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + path = "/home/notused/.ssh/authorized_keys" + key_data = file("${path.module}/azure_public_key") + } + } + } + + storage_image_reference { + id = local.custom_image_condition ? azurerm_image.custom-image[0].id : null + publisher = local.custom_image_condition ? null : module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + + storage_os_disk { + name = var.single_gateway_name + create_option = module.common.storage_os_disk_create_option + caching = module.common.storage_os_disk_caching + managed_disk_type = module.common.storage_account_type + disk_size_gb = module.common.disk_size + } +} diff --git a/terraform/azure/single-gateway-new-vnet/terraform.tfvars b/terraform/azure/single-gateway-new-vnet/terraform.tfvars new file mode 100755 index 00000000..636e9491 --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/terraform.tfvars @@ -0,0 +1,33 @@ +#PLEASE refer to the README.md for accepted values for the variables below +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-single-terraform" +single_gateway_name = "PLEASE ENTER GW NAME" # "checkpoint-single-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-single-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +frontend_subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR FRONTEND SUBNET" # "10.0.0.0/24" +backend_subnet_prefix = "PLEASE ENTER ADDRESS PREFIX FOR BACKEND SUBNET" # "10.0.1.0/24" +management_GUI_client_network = "PLEASE ENTER A MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +enable_custom_metrics = "PLEASE ENTER true or false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +installation_type = "PLEASE ENTER INSTALLATION TYPE" # "gateway" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/single-gateway-new-vnet/variables.tf b/terraform/azure/single-gateway-new-vnet/variables.tf new file mode 100755 index 00000000..65076afc --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/variables.tf @@ -0,0 +1,280 @@ +//********************** Basic Configuration Variables **************************// +variable "single_gateway_name" { + description = "Single gateway name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resource will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "smart_1_cloud_token" { + description = "Smart-1 Cloud Token" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "template_name" { + description = "Template name. Should be defined according to deployment type(mgmt, ha, vmss, sg)" + type = string + default = "single" +} + +variable "template_version" { + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type" { + description = "installation type" + type = string + default = "gateway" +} + +locals { // locals for 'installation_type' allowed values + installation_type_allowed_values = [ + "gateway", + "standalone" + ] +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995" + type = string +} + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} + +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "vm_os_offer" { + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120" + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "enable_custom_metrics" { + description = "Indicates whether CloudGuard Metrics will be use for Cluster members monitoring." + type = bool + default = true +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.12.0.0/16" +} + +variable "frontend_subnet_prefix" { + description = "Address prefix to be used for network frontend subnet" + type = string + default = "10.12.0.0/24" +} + +variable "backend_subnet_prefix" { + description = "Address prefix to be used for network backend subnet" + type = string + default = "10.12.1.0/24" +} + +variable "vnet_subnets" { + description = "Subnets in vnet" + type = list(string) + default = ["10.12.0.0/24", "10.12.1.0/24"] +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "management_GUI_client_network" { + description = "Allowed GUI clients - GUI clients network CIDR" + type = string +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +locals { + regex_valid_management_GUI_client_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$" + // Will fail if var.management_GUI_client_network is invalid + regex_management_GUI_client_network = regex(local.regex_valid_management_GUI_client_network, var.management_GUI_client_network) == var.management_GUI_client_network ? 0 : "Variable [management_GUI_client_network] must be a valid IPv4 network CIDR." + + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + // Will fail if var.address_space is invalid + regex_address_space = regex(local.regex_valid_network_cidr, var.address_space) == var.address_space ? 0 : "Variable [address_space] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_frontend_subnet_prefix = regex(local.regex_valid_network_cidr, var.frontend_subnet_prefix) == var.frontend_subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." + // Will fail if var.subnet_prefix is invalid + regex_backend_subnet_prefix = regex(local.regex_valid_network_cidr, var.backend_subnet_prefix) == var.backend_subnet_prefix ? 0 : "Variable [subnet_prefix] must be a valid address in CIDR notation." +} + +variable "bootstrap_script" { + description = "An optional script to run on the initial boot" + default = "" + type = string + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sic_key" { + type = string +} + +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} \ No newline at end of file diff --git a/terraform/azure/single-gateway-new-vnet/versions.tf b/terraform/azure/single-gateway-new-vnet/versions.tf new file mode 100755 index 00000000..0d5ca4f3 --- /dev/null +++ b/terraform/azure/single-gateway-new-vnet/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} \ No newline at end of file diff --git a/terraform/azure/vmss-existing-vnet/README.md b/terraform/azure/vmss-existing-vnet/README.md new file mode 100755 index 00000000..dca0361a --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/README.md @@ -0,0 +1,247 @@ +# Check Point CloudGuard IaaS VMSS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS VMSS solution into an existing Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Role assignment - conditional creation + + +For additional information, +please see the [CloudGuard Network for Azure Virtual Machine Scale Sets (VMSS) Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/vmss-existing-vnet/azure_public_key file + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id, tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/vmss-existing-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subsscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss_name name must not contain reserved words based on: sk40179 | n/a + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a + | | | | | | + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix | string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a + | | | | | | + | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | true + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false + | | | | | | + | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +To create role assignment and enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service: +``` +enable_custom_metrics = true +``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-vmss-terraform" + location = "eastus" + vmss_name = "checkpoint-vmss-terraform" + vnet_name = "checkpoint-vmss-vnet" + vnet_resource_group = "existing-vnet" + frontend_subnet_name = "frontend" + backend_subnet_name = "backend" + backend_lb_IP_address = 4 + admin_password = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "100" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_zones_num = "1" + minimum_number_of_vm_instances = 2 + maximum_number_of_vm_instances = 10 + management_name = "mgmt" + management_IP = "13.92.42.181" + management_interface = "eth1-private" + configuration_template_name = "vmss_template" + notification_email = "" + frontend_load_distribution = "Default" + backend_load_distribution = "Default" + enable_custom_metrics = true + enable_floating_ip = false + deployment_mode = "Standard" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + + +## Deploy Without Public IP + +1. By default, the VMSS is deployed with public IP +2. To deploy without public IP, remove the "public_ip_address_configuration" block in main.tf + +## Known limitations + +## Revision History + +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image
- Fix zones filed for scale set be installed as multi-zone
- Modify "management_interface" variable and tags regarding managing the Gateways in the Scale Set | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Adding support for R81.
- Add public IP addresses support.
- Add support to CloudGuards metrics.
- Avoid role-assignment re-creation when re-apply | +| | | | +| 20200323 | Remove the domain_name_label variable from the azurerm_public_ip resource; | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS VMSS Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/vmss-existing-vnet/azure_public_key b/terraform/azure/vmss-existing-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/vmss-existing-vnet/cloud-init.sh b/terraform/azure/vmss-existing-vnet/cloud-init.sh new file mode 100755 index 00000000..f11f72c3 --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/cloud-init.sh @@ -0,0 +1,17 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +vnet="${vnet}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/vmss-existing-vnet/main.tf b/terraform/azure/vmss-existing-vnet/main.tf new file mode 100755 index 00000000..70e7169a --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/main.tf @@ -0,0 +1,446 @@ +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// + +data "azurerm_subnet" "frontend" { + name = var.frontend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +data "azurerm_subnet" "backend" { + name = var.backend_subnet_name + virtual_network_name = var.vnet_name + resource_group_name = var.vnet_resource_group +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +//********************** Load Balancers **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip" "public-ip-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + name = "${var.vmss_name}-app-1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = var.vnet_allocation_method + sku = var.sku + domain_name_label = "${lower(var.vmss_name)}-${random_id.random_id.hex}" +} + +resource "azurerm_lb" "frontend-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + depends_on = [azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "${var.vmss_name}-app-1" + public_ip_address_id = azurerm_public_ip.public-ip-lb[0].id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + count = var.deployment_mode != "Internal" ? 1 : 0 + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" +} + +resource "azurerm_lb" "backend-lb" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = data.azurerm_subnet.backend.id + private_ip_address_allocation = "Static" + private_ip_address = cidrhost(data.azurerm_subnet.backend.address_prefixes[0],var.backend_lb_IP_address) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb[0].id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = var.deployment_mode == "Standard" ? 2 : 1 + depends_on = [azurerm_lb.frontend-lb, azurerm_lb.backend-lb] + loadbalancer_id = var.deployment_mode == "Standard" ? (count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) : (var.deployment_mode == "External" ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) + name = var.deployment_mode == "Standard" ? (count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb") : (var.deployment_mode == "External" ? "${var.vmss_name}-app-1" : "backend-lb") + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +// Standard deployment +resource "azurerm_lb_rule" "lbnatrule-standard" { + count = var.deployment_mode == "Standard" ? 2 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id + name = count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb" + protocol = count.index == 0 ? "Tcp" : "All" + frontend_port = count.index == 0 ? var.frontend_port : "0" + backend_port = count.index == 0 ? var.backend_port : "0" + backend_address_pool_ids = count.index == 0 ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] : [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = count.index == 0 ? azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name : azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[count.index].id + load_distribution = count.index == 0 ? var.frontend_load_distribution : var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// External deployment +resource "azurerm_lb_rule" "lbnatrule-external" { + count = var.deployment_mode == "External" ? 1 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob] + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" + protocol = "Tcp" + frontend_port = var.frontend_port + backend_port = var.backend_port + backend_address_pool_ids = [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.frontend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// Internal deployment +resource "azurerm_lb_rule" "lbnatrule-internal" { + count = var.deployment_mode == "Internal" ? 1 : 0 + depends_on = [azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = azurerm_lb.backend-lb[0].id + name = "backend-lb" + protocol = "All" + frontend_port = "0" + backend_port = "0" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "diag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + availability_zones_num_condition = var.availability_zones_num == "0" ? null : var.availability_zones_num == "1" ? ["1"] : var.availability_zones_num == "2" ? ["1", "2"] : ["1", "2", "3"] + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true + management_interface_name = split("-", var.management_interface)[0] + management_ip_address_type = split("-", var.management_interface)[1] +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_linux_virtual_machine_scale_set" "vmss" { + name = var.vmss_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = module.common.vm_size + zones = local.availability_zones_num_condition + instances = var.number_of_vm_instances + overprovision = false + + dynamic "identity" { + for_each = var.enable_custom_metrics ? [1] : [] + content { + type = "SystemAssigned" + } + } + + dynamic "source_image_reference" { + for_each = local.custom_image_condition ? [] : [1] + content { + publisher = module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + } + source_image_id = local.custom_image_condition? azurerm_image.custom-image[0].id : null + + os_disk { + disk_size_gb = module.common.disk_size + caching = module.common.storage_os_disk_caching + storage_account_type = module.common.storage_account_type + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + computer_name_prefix = lower(var.vmss_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = base64encode(templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + vnet = data.azurerm_subnet.frontend.address_prefixes[0] + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + })) + + + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "admin_ssh_key" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + public_key = file("azure_public_key") + username = "notused" + } + } + + + boot_diagnostics { + storage_account_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + upgrade_mode = "Manual" + + network_interface { + name = "eth0" + primary = true + enable_ip_forwarding = true + enable_accelerated_networking = true + network_security_group_id = module.network-security-group[0].network_security_group_id + ip_configuration { + name = "ipconfig1" + subnet_id = data.azurerm_subnet.frontend.id + load_balancer_backend_address_pool_ids = var.deployment_mode != "Internal" ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id]: null + primary = true + public_ip_address { + name = "${var.vmss_name}-public-ip" + idle_timeout_in_minutes = 15 + domain_name_label = "${lower(var.vmss_name)}-dns-name" + } + } + } + + network_interface { + name = "eth1" + primary = false + enable_ip_forwarding = true + enable_accelerated_networking = true + ip_configuration { + name = "ipconfig2" + subnet_id = data.azurerm_subnet.backend.id + load_balancer_backend_address_pool_ids = var.deployment_mode != "External" ? [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] : null + primary = true + } + } + + tags = var.management_interface == "eth0"?{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-management-address = var.management_IP, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + }:{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + } +} + +resource "azurerm_monitor_autoscale_setting" "vmss_settings" { + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + name = var.vmss_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + target_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + + profile { + name = "Profile1" + + capacity { + default = module.common.number_of_vm_instances + minimum = var.minimum_number_of_vm_instances + maximum = var.maximum_number_of_vm_instances + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "GreaterThan" + threshold = 80 + } + + scale_action { + direction = "Increase" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "LessThan" + threshold = 60 + } + + scale_action { + direction = "Decrease" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + } + + notification { + email { + send_to_subscription_administrator = false + send_to_subscription_co_administrator = false + custom_emails = var.notification_email == "" ? [] : [var.notification_email] + } + } +} + +resource "azurerm_role_assignment" "custom_metrics_role_assignment"{ + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + count = var.enable_custom_metrics ? 1 : 0 + role_definition_id = join("", ["/subscriptions/", var.subscription_id, "/providers/Microsoft.Authorization/roleDefinitions/", "3913510d-42f4-4e42-8a64-420c390055eb"]) + principal_id = lookup(azurerm_linux_virtual_machine_scale_set.vmss.identity[0], "principal_id") + scope = module.common.resource_group_id + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } +} diff --git a/terraform/azure/vmss-existing-vnet/terraform.tfvars b/terraform/azure/vmss-existing-vnet/terraform.tfvars new file mode 100755 index 00000000..66836af3 --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/terraform.tfvars @@ -0,0 +1,43 @@ +#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-vmss-terraform" +vmss_name = "PLEASE ENTER SCALE SET NAME" # "checkpoint-vmss-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-vmss-vnet" +vnet_resource_group = "PLEASE ENTER VIRTUAL NETWORK'S RESOURCE GROUP NAME" # "existing-vnet" +frontend_subnet_name = "PLEASE ENTER EXTERNAL SUBNET NAME" # "frontend" +backend_subnet_name = "PLEASE ENTER INTERNAL SUBNET NAME" # "backend" +backend_lb_IP_address = "PLEASE ENTER BACKEND LB IP ADDRESS POSITIONAL NUMBER" # 4 +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE MUST BE 100 FOR VERSIONS R81.20 AND BELOW" # "100" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_zones_num = "PLEASE ENTER NUMBER OF AVAILABILITY ZONES" # "1" +minimum_number_of_vm_instances = "PLEASE ENTER MINIMUM NUMBER OF VM INSTANCES" # 2 +maximum_number_of_vm_instances = "PLEASE ENTER MAXIMUM NUMBER OF VM INSTANCES" # 10 +management_name = "PLEASE ENTER MANAGEMENT NAME" # "mgmt" +management_IP = "PLEASE ENTER MANAGEMENT IP" # "13.92.42.181" +management_interface = "PLEASE ENTER MANAGEMENT INTERFACE" # "eth1-private" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "vmss_template" +notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "" +frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +deployment_mode = "PLEASE ENTER DEPLOYMENT MODE" # "Standard" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" \ No newline at end of file diff --git a/terraform/azure/vmss-existing-vnet/variables.tf b/terraform/azure/vmss-existing-vnet/variables.tf new file mode 100755 index 00000000..9ef598a3 --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/variables.tf @@ -0,0 +1,404 @@ +//********************** Basic Configuration Variables **************************// +variable "vmss_name"{ + description = "vmss name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "availability_zones_num" { + description = "The number of availability zones to use for Scale Set. Note that the load balancers and their IP addresses will be redundant in any case" + #Availability Zones are only supported in several regions at this time + #"centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" + #type = list(string) +} + +locals { // locals for 'availability_zones_num' allowed values + availability_zones_num_allowed_values = [ + "0", + "1", + "2", + "3" + ] + // will fail if [var.availability_zones_num] is invalid: + validate_availability_zones_num_value = index(local.availability_zones_num_allowed_values, var.availability_zones_num) +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "vmss-terraform" +} + +variable "template_version"{ + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type"{ + description = "Installation type" + type = string + default = "vmss" +} + +variable "number_of_vm_instances"{ + description = "Default number of VM instances to deploy" + type = string + default = "2" +} + +variable "minimum_number_of_vm_instances" { + description = "Minimum number of VM instances to deploy" + type = string +} + +variable "maximum_number_of_vm_instances" { + description = "Maximum number of VM instances to deploy" + type = string +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120" + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995, if you are using R81.20 or below, the disk size must be 100" + type = string + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is not 100 and the version is R81.20 or below + count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 +} +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "management_name" { + description = "The name of the management server as it appears in the configuration file" + type = string +} + +variable "management_IP" { + description = "The IP address used to manage the VMSS instances" + type = string +} + +variable "management_interface" { + description = "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address" + type = string + default = "eth1-private" +} +locals { // locals for 'management_interface' allowed values + management_interface_allowed_values = [ + "eth0-public", + "eth0-private", + "eth1-private" + ] + // will fail if [var.management_interface] is invalid: + validate_management_interface_value = index(local.management_interface_allowed_values, var.management_interface) +} + +variable "configuration_template_name" { + description = "The configuration template name as it appears in the configuration file" + type = string +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "frontend_subnet_name" { + description = "Frontend subnet name" + type = string +} + +variable "backend_subnet_name" { + description = "Backend subnet name" + type = string +} + +variable "vnet_resource_group" { + description = "Resource group of existing vnet" + type = string +} + +variable "vnet_allocation_method" { + description = "IP address allocation method" + type = string + default = "Static" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} + +//********************* Load Balancers Variables **********************// + +variable "deployment_mode" { + description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" + type = string + default = "Standard" +} + +locals { // locals for 'deployment_mode' allowed values + deployment_mode_allowd_values = [ + "Standard", + "External", + "Internal" + ] + // will fail if [var.deployment_mode] is invalid: + validate_deployment_mode_value = index(local.deployment_mode_allowd_values, var.deployment_mode) +} + +variable "backend_lb_IP_address" { + description = "The IP address is defined by its position in the subnet" + type = number +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "frontend_port" { + description = "Port that will be exposed to the external Load Balancer" + type = string + default = "80" +} + +variable "backend_port" { + description = "Port that will be exposed to the external Load Balance" + type = string + default = "8081" +} + +variable "frontend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the frontend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + frontend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.frontend_load_distribution] is invalid: + validate_frontend_load_distribution_value = index(local.frontend_load_distribution_allowed_values, var.frontend_load_distribution) +} + +variable "backend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the backend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + backend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.backend_load_distribution] is invalid: + validate_backend_load_distribution_value = index(local.backend_load_distribution_allowed_values, var.backend_load_distribution) +} + +//********************** Scale Set variables *******************// + +variable "vm_os_offer" { + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "bootstrap_script"{ + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "notification_email" { + description = "Specifies a list of custom email addresses to which the email notifications will be sent" + type = string +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} diff --git a/terraform/azure/vmss-existing-vnet/versions.tf b/terraform/azure/vmss-existing-vnet/versions.tf new file mode 100644 index 00000000..df4caa26 --- /dev/null +++ b/terraform/azure/vmss-existing-vnet/versions.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} + + diff --git a/terraform/azure/vmss-new-vnet/README.md b/terraform/azure/vmss-new-vnet/README.md new file mode 100755 index 00000000..b57e3011 --- /dev/null +++ b/terraform/azure/vmss-new-vnet/README.md @@ -0,0 +1,247 @@ +# Check Point CloudGuard IaaS VMSS Terraform deployment for Azure + +This Terraform module deploys Check Point CloudGuard IaaS VMSS solution into a new Vnet in Azure. +As part of the deployment the following resources are created: +- Resource group +- Virtual network +- Network security group +- Role assignment - conditional creation + + +For additional information, +please see the [CloudGuard Network for Azure Virtual Machine Scale Sets (VMSS) Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_VMSS_for_Azure/Default.htm) + +This solution uses the following modules: +- /terraform/azure/modules/common - used for creating a resource group and defining common variables. +- /terraform/azure/modules/vnet - used for creating new virtual network and subnets. +- /terraform/azure/modules/network-security-group - used for creating new network security groups and rules. + + +## Configurations +- Install and configure Terraform to provision Azure resources: [Configure Terraform for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure) +- In order to use ssh connection to VMs, it is **required** to add a public key to the /terraform/azure/vmss-new-vnet/azure_public_key file + +## Usage +- Choose the preferred login method to Azure in order to deploy the solution: +
1. Using Service Principal: + - Create a [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) (or use the existing one) + - Grant the Service Principal at least "**Managed Application Contributor**", "**Storage Account Contributor**", "**Network Contributor**", "**Virtual Machine Contributor**" permissions to the Azure subscription
+ - The Service Principal credentials can be stored either in the terraform.tfvars or as [Environment Variables](https://www.terraform.io/docs/providers/azuread/guides/service_principal_client_secret.html)
+ + In case the Environment Variables are used, perform modifications described below:
+ + a. The next lines in the main.tf file, in the provider azurerm resource, need to be deleted or commented: + + provider "azurerm" { + + // subscription_id = var.subscription_id + // client_id = var.client_id + // client_secret = var.client_secret + // tenant_id = var.tenant_id + + features {} + } + + b. In the terraform.tfvars file leave empty double quotes for client_secret, client_id , tenant_id and subscription_id variables: + + client_secret = "" + client_id = "" + tenant_id = "" + subscription_id = "" + +
2. Using **az** commands from a command-line: + - Run **az login** command + - Sign in with your account credentials in the browser + - [Accept Azure Marketplace image terms](https://docs.microsoft.com/en-us/cli/azure/vm/image/terms?view=azure-cli-latest) by running: +
**az vm image terms accept --urn publisher:offer:sku:version**, where: + - publisher = checkpoint; + - offer = vm_os_offer (see accepted values in the table below); + - sku = vm_os_sku (see accepted values in the table below); + - version = latest
+
Example:
+ az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + + - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. + +- Fill all variables in the /terraform/azure/vmss-new-vnet/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + + terraform init +- Create an execution plan: + + terraform plan +- Create or modify the deployment: + + terraform apply + +### terraform.tfvars variables: + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- |---------| ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss name must not contain reserved words based on: sk40179 | n/a + | | | | | | + | **vnet_name** | The name of virtual network that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **address_space** | The address prefixes of the virtual network | string | Valid CIDR block | "10.0.0.0/16" + | | | | | | + | **subnet_prefixes** | The address prefixes to be used for created subnets | string | The subnets need to contain within the address space for this virtual network(defined by address_space variable) | ["10.0.0.0/24","10.0.1.0/24"] + | | | | | | + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix| number | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a + | | | | | | + | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | n/a + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | n/a + | | | | | | + | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + +## Conditional creation +To create role assignment and enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service: +``` +enable_custom_metrics = true +``` + +## Example + client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + tenant_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + subscription_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + source_image_vhd_uri = "noCustomUri" + resource_group_name = "checkpoint-vmss-terraform" + location = "eastus" + vmss_name = "checkpoint-vmss-terraform" + vnet_name = "checkpoint-vmss-vnet" + address_space = "10.0.0.0/16" + subnet_prefixes = ["10.0.1.0/24","10.0.2.0/24"] + backend_lb_IP_address = 4 + admin_password = "xxxxxxxxxxxx" + sic_key = "xxxxxxxxxxxx" + vm_size = "Standard_D3_v2" + disk_size = "100" + vm_os_sku = "sg-byol" + vm_os_offer = "check-point-cg-r8110" + os_version = "R8110" + bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" + allow_upload_download = true + authentication_type = "Password" + availability_zones_num = "1" + minimum_number_of_vm_instances = 2 + maximum_number_of_vm_instances = 10 + management_name = "mgmt" + management_IP = "13.92.42.181" + management_interface = "eth1-private" + configuration_template_name = "vmss_template" + notification_email = "" + frontend_load_distribution = "Default" + backend_load_distribution = "Default" + enable_custom_metrics = true + enable_floating_ip = false + deployment_mode = "Standard" + admin_shell = "/etc/cli.sh" + serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" + add_storage_account_ip_rules = false + storage_account_additional_ips = [] + +## Deploy Without Public IP + +1. By default, the VMSS is deployed with public IP +2. To deploy without public IP, remove the "public_ip_address_configuration" block in main.tf + +## Known limitations + +## Revision History + +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | --------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | +| 20230910 | - R81.20 is the default version | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image
- Fix zones filed for scale set be installed as multi-zone
- Modify "management_interface" variable and tags regarding managing the Gateways in the Scale Set | +| | | | +| 20210111 |- Update terraform version to 0.14.3
- Update azurerm version to 2.17.0
- Add authentication_type variable for choosing the authentication type.
- Add support for R81.
- Add public IP addresses support.
- Add support to CloudGuards metrics.
- Update resources for NSG https://github.com/CheckPointSW/CloudGuardIaaS/issues/67
- Avoid role-assignment re-creation when re-applying | +| | | | +| 20200323 | Remove the domain_name_label variable from the azurerm_public_ip resource | +| | | | +| 20200305 | First release of Check Point CloudGuard IaaS VMSS Terraform deployment for Azure | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files | +| | | | + + +## License + +See the [LICENSE](../../LICENSE) file for details + diff --git a/terraform/azure/vmss-new-vnet/azure_public_key b/terraform/azure/vmss-new-vnet/azure_public_key new file mode 100755 index 00000000..e69de29b diff --git a/terraform/azure/vmss-new-vnet/cloud-init.sh b/terraform/azure/vmss-new-vnet/cloud-init.sh new file mode 100755 index 00000000..f11f72c3 --- /dev/null +++ b/terraform/azure/vmss-new-vnet/cloud-init.sh @@ -0,0 +1,17 @@ +#!/usr/bin/python3 /etc/cloud_config.py + +installationType="${installation_type}" +allowUploadDownload="${allow_upload_download}" +osVersion="${os_version}" +templateName="${template_name}" +templateVersion="${template_version}" +templateType="${template_type}" +isBlink="${is_blink}" +bootstrapScript64="${bootstrap_script64}" +location="${location}" +sicKey="${sic_key}" +vnet="${vnet}" +customMetrics="${enable_custom_metrics}" +adminShell="${admin_shell}" +passwordHash="${serial_console_password_hash}" +MaintenanceModePassword="${maintenance_mode_password_hash}" diff --git a/terraform/azure/vmss-new-vnet/main.tf b/terraform/azure/vmss-new-vnet/main.tf new file mode 100755 index 00000000..2438915d --- /dev/null +++ b/terraform/azure/vmss-new-vnet/main.tf @@ -0,0 +1,442 @@ +provider "azurerm" { + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + + features {} +} + +//********************** Basic Configuration **************************// +module "common" { + source = "../modules/common" + resource_group_name = var.resource_group_name + location = var.location + admin_password = var.authentication_type == "SSH Public Key" ? random_id.random_id.hex : var.admin_password + installation_type = var.installation_type + template_name = var.template_name + template_version = var.template_version + number_of_vm_instances = var.number_of_vm_instances + allow_upload_download = var.allow_upload_download + vm_size = var.vm_size + disk_size = var.disk_size + is_blink = var.is_blink + os_version = var.os_version + vm_os_sku = var.vm_os_sku + vm_os_offer = var.vm_os_offer + authentication_type = var.authentication_type + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + storage_account_additional_ips = var.storage_account_additional_ips +} + +//********************** Networking **************************// +module "vnet" { + source = "../modules/vnet" + vnet_name = var.vnet_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + nsg_id = var.nsg_id == "" ? module.network-security-group[0].network_security_group_id: var.nsg_id + address_space = var.address_space + subnet_prefixes = var.subnet_prefixes +} + +module "network-security-group" { + source = "../modules/network-security-group" + count = var.nsg_id == "" ? 1 : 0 + resource_group_name = module.common.resource_group_name + security_group_name = "${module.common.resource_group_name}_nsg" + location = module.common.resource_group_location + security_rules = [ + { + name = "AllowAllInBound" + priority = "100" + direction = "Inbound" + access = "Allow" + protocol = "*" + source_port_ranges = "*" + destination_port_ranges = "*" + description = "Allow all inbound connections" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] +} + +//********************** Load Balancers **************************// +resource "random_id" "random_id" { + byte_length = 13 + keepers = { + rg_id = module.common.resource_group_id + } +} + +resource "azurerm_public_ip" "public-ip-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + name = "${var.vmss_name}-app-1" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + allocation_method = module.vnet.allocation_method + sku = var.sku + domain_name_label = "${lower(var.vmss_name)}-${random_id.random_id.hex}" +} + +resource "azurerm_lb" "frontend-lb" { + count = var.deployment_mode != "Internal" ? 1 : 0 + depends_on = [azurerm_public_ip.public-ip-lb] + name = "frontend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + + frontend_ip_configuration { + name = "${var.vmss_name}-app-1" + public_ip_address_id = azurerm_public_ip.public-ip-lb[0].id + } +} + +resource "azurerm_lb_backend_address_pool" "frontend-lb-pool" { + count = var.deployment_mode != "Internal" ? 1 : 0 + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" +} + +resource "azurerm_lb" "backend-lb" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb" + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = var.sku + frontend_ip_configuration { + name = "backend-lb" + subnet_id = module.vnet.vnet_subnets[1] + private_ip_address_allocation = module.vnet.allocation_method + private_ip_address = cidrhost(module.vnet.subnet_prefixes[1], var.backend_lb_IP_address) + } +} + +resource "azurerm_lb_backend_address_pool" "backend-lb-pool" { + count = var.deployment_mode != "External" ? 1 : 0 + name = "backend-lb-pool" + loadbalancer_id = azurerm_lb.backend-lb[0].id +} + +resource "azurerm_lb_probe" "azure_lb_healprob" { + count = var.deployment_mode == "Standard" ? 2 : 1 + depends_on = [azurerm_lb.frontend-lb, azurerm_lb.backend-lb] + loadbalancer_id = var.deployment_mode == "Standard" ? (count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) : (var.deployment_mode == "External" ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id) + name = var.deployment_mode == "Standard" ? (count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb") : (var.deployment_mode == "External" ? "${var.vmss_name}-app-1" : "backend-lb") + protocol = var.lb_probe_protocol + port = var.lb_probe_port + interval_in_seconds = var.lb_probe_interval + number_of_probes = var.lb_probe_unhealthy_threshold +} + +// Standard deployment +resource "azurerm_lb_rule" "lbnatrule-standard" { + count = var.deployment_mode == "Standard" ? 2 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = count.index == 0 ? azurerm_lb.frontend-lb[0].id : azurerm_lb.backend-lb[0].id + name = count.index == 0 ? "${var.vmss_name}-app-1" : "backend-lb" + protocol = count.index == 0 ? "Tcp" : "All" + frontend_port = count.index == 0 ? var.frontend_port : "0" + backend_port = count.index == 0 ? var.backend_port : "0" + backend_address_pool_ids = count.index == 0 ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] : [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = count.index == 0 ? azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name : azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[count.index].id + load_distribution = count.index == 0 ? var.frontend_load_distribution : var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// External deployment +resource "azurerm_lb_rule" "lbnatrule-external" { + count = var.deployment_mode == "External" ? 1 : 0 + depends_on = [azurerm_lb.frontend-lb[0],azurerm_lb_probe.azure_lb_healprob] + loadbalancer_id = azurerm_lb.frontend-lb[0].id + name = "${var.vmss_name}-app-1" + protocol = "Tcp" + frontend_port = var.frontend_port + backend_port = var.backend_port + backend_address_pool_ids = [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.frontend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.frontend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +// Internal deployment +resource "azurerm_lb_rule" "lbnatrule-internal" { + count = var.deployment_mode == "Internal" ? 1 : 0 + depends_on = [azurerm_lb_probe.azure_lb_healprob,azurerm_lb.backend-lb[0]] + loadbalancer_id = azurerm_lb.backend-lb[0].id + name = "backend-lb" + protocol = "All" + frontend_port = "0" + backend_port = "0" + backend_address_pool_ids = [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] + frontend_ip_configuration_name = azurerm_lb.backend-lb[0].frontend_ip_configuration[0].name + probe_id = azurerm_lb_probe.azure_lb_healprob[0].id + load_distribution = var.backend_load_distribution + enable_floating_ip = var.enable_floating_ip +} + +//********************** Storage accounts **************************// +// Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = module.common.resource_group_name + } + byte_length = 8 +} +resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + name = "diag${random_id.randomId.hex}" + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + account_tier = module.common.storage_account_tier + account_replication_type = module.common.account_replication_type + network_rules { + default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" + ip_rules = module.common.storage_account_ip_rules + } + blob_properties { + delete_retention_policy { + days = "15" + } + } +} + +//********************** Virtual Machines **************************// +locals { + SSH_authentication_type_condition = var.authentication_type == "SSH Public Key" ? true : false + availability_zones_num_condition = var.availability_zones_num == "0" ? null : var.availability_zones_num == "1" ? ["1"] : var.availability_zones_num == "2" ? ["1", "2"] : ["1", "2", "3"] + custom_image_condition = var.source_image_vhd_uri == "noCustomUri" ? false : true + management_interface_name = split("-", var.management_interface)[0] + management_ip_address_type = split("-", var.management_interface)[1] +} + +resource "azurerm_image" "custom-image" { + count = local.custom_image_condition ? 1 : 0 + name = "custom-image" + location = var.location + resource_group_name = module.common.resource_group_name + + os_disk { + os_type = "Linux" + os_state = "Generalized" + blob_uri = var.source_image_vhd_uri + } +} + +resource "azurerm_linux_virtual_machine_scale_set" "vmss" { + name = var.vmss_name + location = module.common.resource_group_location + resource_group_name = module.common.resource_group_name + sku = module.common.vm_size + zones = local.availability_zones_num_condition + instances = var.number_of_vm_instances + overprovision = false + + dynamic "identity" { + for_each = var.enable_custom_metrics ? [1] : [] + content { + type = "SystemAssigned" + } + } + + dynamic "source_image_reference" { + for_each = local.custom_image_condition ? [] : [1] + content { + publisher = module.common.publisher + offer = module.common.vm_os_offer + sku = module.common.vm_os_sku + version = module.common.vm_os_version + } + } + source_image_id = local.custom_image_condition? azurerm_image.custom-image[0].id : null + + os_disk { + disk_size_gb = module.common.disk_size + caching = module.common.storage_os_disk_caching + storage_account_type = module.common.storage_account_type + } + + dynamic "plan" { + for_each = local.custom_image_condition ? [] : [1] + content { + name = module.common.vm_os_sku + publisher = module.common.publisher + product = module.common.vm_os_offer + } + } + + computer_name_prefix = lower(var.vmss_name) + admin_username = module.common.admin_username + admin_password = module.common.admin_password + custom_data = base64encode(templatefile("${path.module}/cloud-init.sh", { + installation_type = module.common.installation_type + allow_upload_download = module.common.allow_upload_download + os_version = module.common.os_version + template_name = module.common.template_name + template_version = module.common.template_version + template_type = "terraform" + is_blink = module.common.is_blink + bootstrap_script64 = base64encode(var.bootstrap_script) + location = module.common.resource_group_location + sic_key = var.sic_key + vnet = module.vnet.subnet_prefixes[0] + enable_custom_metrics = var.enable_custom_metrics ? "yes" : "no" + admin_shell = var.admin_shell + serial_console_password_hash = var.serial_console_password_hash + maintenance_mode_password_hash = var.maintenance_mode_password_hash + })) + + + disable_password_authentication = local.SSH_authentication_type_condition + + dynamic "admin_ssh_key" { + for_each = local.SSH_authentication_type_condition ? [ + 1] : [] + content { + public_key = file("azure_public_key") + username = "notused" + } + } + + + boot_diagnostics { + storage_account_uri = module.common.boot_diagnostics ? join(",", azurerm_storage_account.vm-boot-diagnostics-storage.*.primary_blob_endpoint) : "" + } + + upgrade_mode = "Manual" + + network_interface { + name = "eth0" + primary = true + enable_ip_forwarding = true + enable_accelerated_networking = true + network_security_group_id = module.network-security-group[0].network_security_group_id + ip_configuration { + name = "ipconfig1" + subnet_id = module.vnet.vnet_subnets[0] + load_balancer_backend_address_pool_ids = var.deployment_mode != "Internal" ? [azurerm_lb_backend_address_pool.frontend-lb-pool[0].id]: null + primary = true + public_ip_address { + name = "${var.vmss_name}-public-ip" + idle_timeout_in_minutes = 15 + domain_name_label = "${lower(var.vmss_name)}-dns-name" + } + } + } + + network_interface { + name = "eth1" + primary = false + enable_ip_forwarding = true + enable_accelerated_networking = true + ip_configuration { + name = "ipconfig2" + subnet_id = module.vnet.vnet_subnets[1] + load_balancer_backend_address_pool_ids = var.deployment_mode != "External" ? [azurerm_lb_backend_address_pool.backend-lb-pool[0].id] : null + primary = true + } + } + + tags = var.management_interface == "eth0"?{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-management-address = var.management_IP, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + }:{ + x-chkp-management = var.management_name, + x-chkp-template = var.configuration_template_name, + x-chkp-ip-address = local.management_ip_address_type, + x-chkp-management-interface = local.management_interface_name, + x-chkp-topology = "eth0:external,eth1:internal", + x-chkp-anti-spoofing = "eth0:false,eth1:false", + x-chkp-srcImageUri = var.source_image_vhd_uri + } +} + +resource "azurerm_monitor_autoscale_setting" "vmss_settings" { + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + name = var.vmss_name + resource_group_name = module.common.resource_group_name + location = module.common.resource_group_location + target_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + + profile { + name = "Profile1" + + capacity { + default = module.common.number_of_vm_instances + minimum = var.minimum_number_of_vm_instances + maximum = var.maximum_number_of_vm_instances + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "GreaterThan" + threshold = 80 + } + + scale_action { + direction = "Increase" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + + rule { + metric_trigger { + metric_name = "Percentage CPU" + metric_resource_id = azurerm_linux_virtual_machine_scale_set.vmss.id + time_grain = "PT1M" + statistic = "Average" + time_window = "PT5M" + time_aggregation = "Average" + operator = "LessThan" + threshold = 60 + } + + scale_action { + direction = "Decrease" + type = "ChangeCount" + value = "1" + cooldown = "PT5M" + } + } + } + + notification { + email { + send_to_subscription_administrator = false + send_to_subscription_co_administrator = false + custom_emails = var.notification_email == "" ? [] : [var.notification_email] + } + } +} + +resource "azurerm_role_assignment" "custom_metrics_role_assignment"{ + depends_on = [azurerm_linux_virtual_machine_scale_set.vmss] + count = var.enable_custom_metrics ? 1 : 0 + role_definition_id = join("", ["/subscriptions/", var.subscription_id, "/providers/Microsoft.Authorization/roleDefinitions/", "3913510d-42f4-4e42-8a64-420c390055eb"]) + principal_id = lookup(azurerm_linux_virtual_machine_scale_set.vmss.identity[0], "principal_id") + scope = module.common.resource_group_id + lifecycle { + ignore_changes = [ + role_definition_id, principal_id + ] + } +} diff --git a/terraform/azure/vmss-new-vnet/terraform.tfvars b/terraform/azure/vmss-new-vnet/terraform.tfvars new file mode 100755 index 00000000..73266464 --- /dev/null +++ b/terraform/azure/vmss-new-vnet/terraform.tfvars @@ -0,0 +1,42 @@ +//#PLEASE refer to the README.md for accepted values FOR THE VARIABLES BELOW +client_secret = "PLEASE ENTER CLIENT SECRET" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +client_id = "PLEASE ENTER CLIENT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +tenant_id = "PLEASE ENTER TENANT ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +subscription_id = "PLEASE ENTER SUBSCRIPTION ID" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +source_image_vhd_uri = "PLEASE ENTER SOURCE IMAGE VHD URI OR noCustomUri" # "noCustomUri" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-vmss-terraform" +vmss_name = "PLEASE ENTER SCALE SET NAME" # "checkpoint-vmss-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-vmss-vnet" +address_space = "PLEASE ENTER VIRTUAL NETWORK ADDRESS SPACE" # "10.0.0.0/16" +subnet_prefixes = "PLEASE ENTER ADDRESS PREFIXES FOR SUBNETS" # ["10.0.1.0/24","10.0.2.0/24"] +backend_lb_IP_address = "PLEASE ENTER BACKEND LB IP ADDRESS POSITIONAL NUMBER" # 4 +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE MUST BE 100 FOR VERSIONS R81.20 AND BELOW" # "100" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8110" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8110" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +authentication_type = "PLEASE ENTER AUTHENTICATION TYPE" # "Password" +availability_zones_num = "PLEASE ENTER NUMBER OF AVAILABILITY ZONES" # "1" +minimum_number_of_vm_instances = "PLEASE ENTER MINIMUM NUMBER OF VM INSTANCES" # 2 +maximum_number_of_vm_instances = "PLEASE ENTER MAXIMUM NUMBER OF VM INSTANCES" # 10 +management_name = "PLEASE ENTER MANAGEMENT NAME" # "mgmt" +management_IP = "PLEASE ENTER MANAGEMENT IP" # "13.92.42.181" +management_interface = "PLEASE ENTER MANAGEMENT INTERFACE" # "eth1-private" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "vmss_template" +notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "" +frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +enable_custom_metrics = "PLEASE ENTER true or false" # true +enable_floating_ip = "PLEASE ENTER true or false" # false +deployment_mode = "PLEASE ENTER DEPLOYMENT MODE" # "Standard" +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" +add_storage_account_ip_rules = "PLEASE ENTER true or false" # false +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/vmss-new-vnet/variables.tf b/terraform/azure/vmss-new-vnet/variables.tf new file mode 100755 index 00000000..1760b8a2 --- /dev/null +++ b/terraform/azure/vmss-new-vnet/variables.tf @@ -0,0 +1,393 @@ +//********************** Basic Configuration Variables **************************// +variable "vmss_name"{ + description = "vmss name" + type = string +} + +variable "resource_group_name" { + description = "Azure Resource Group name to build into" + type = string +} + +variable "location" { + description = "The location/region where resources will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" + type = string +} + +//********************** Virtual Machine Instances Variables **************************// +variable "source_image_vhd_uri" { + type = string + description = "The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images." + default = "noCustomUri" +} + +variable "admin_username" { + description = "Administrator username of deployed VM. Due to Azure limitations 'notused' name can be used" + default = "notused" +} + +variable "admin_password" { + description = "Administrator password of deployed Virtual Machine. The password must meet the complexity requirements of Azure" + type = string +} + +variable "serial_console_password_hash" { + description = "Optional parameter, used to enable serial console connection in case of SSH key as authentication type" + type = string +} + +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string +} + +variable "availability_zones_num" { + description = "The number of availability zones to use for Scale Set. Note that the load balancers and their IP addresses will be redundant in any case" + #Availability Zones are only supported in several regions at this time + #"centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" + #type = list(string) +} + +locals { // locals for 'availability_zones_num' allowed values + availability_zones_num_allowed_values = [ + "0", + "1", + "2", + "3" + ] + // will fail if [var.availability_zones_num] is invalid: + validate_availability_zones_num_value = index(local.availability_zones_num_allowed_values, var.availability_zones_num) +} + +variable "sic_key" { + description = "Secure Internal Communication(SIC) key" + type = string +} +resource "null_resource" "sic_key_invalid" { + count = length(var.sic_key) >= 12 ? 0 : "SIC key must be at least 12 characters long" +} + +variable "template_name"{ + description = "Template name. Should be defined according to deployment type(ha, vmss)" + type = string + default = "vmss-terraform" +} + +variable "template_version"{ + description = "Template version. It is recommended to always use the latest template version" + type = string + default = "20230910" +} + +variable "installation_type"{ + description = "Installation type" + type = string + default = "vmss" +} + +variable "number_of_vm_instances"{ + description = "Default number of VM instances to deploy" + type = string + default = "2" +} + +variable "minimum_number_of_vm_instances" { + description = "Minimum number of VM instances to deploy" + type = string +} + +variable "maximum_number_of_vm_instances" { + description = "Maximum number of VM instances to deploy" + type = string +} + +variable "vm_size" { + description = "Specifies size of Virtual Machine" + type = string +} + + +variable "os_version" { + description = "GAIA OS version" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + os_version_allowed_values = [ + "R8040", + "R81", + "R8110", + "R8120", + ] + // will fail if [var.os_version] is invalid: + validate_os_version_value = index(local.os_version_allowed_values, var.os_version) +} +variable "disk_size" { + description = "Storage data disk size size(GB). Select a number between 100 and 3995, if you are using R81.20 or below, the disk size must be 100" + type = string + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is not 100 and the version is R81.20 or below + count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 +} +variable "vm_os_sku" { + description = "The sku of the image to be deployed." + type = string +} + +variable "authentication_type" { + description = "Specifies whether a password authentication or SSH Public Key authentication should be used" + type = string +} +locals { // locals for 'authentication_type' allowed values + authentication_type_allowed_values = [ + "Password", + "SSH Public Key" + ] + // will fail if [var.authentication_type] is invalid: + validate_authentication_type_value = index(local.authentication_type_allowed_values, var.authentication_type) +} + +variable "allow_upload_download" { + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + type = bool +} + +variable "is_blink" { + description = "Define if blink image is used for deployment" + default = true +} + +variable "management_name" { + description = "The name of the management server as it appears in the configuration file" + type = string +} + +variable "management_IP" { + description = "The IP address used to manage the VMSS instances" + type = string +} + +variable "management_interface" { + description = "Manage the Gateways in the Scale Set via the instance's external (eth0) or internal (eth1) NIC's private IP address" + type = string + default = "eth1-private" +} +locals { // locals for 'management_interface' allowed values + management_interface_allowed_values = [ + "eth0-public", + "eth0-private", + "eth1-private" + ] + // will fail if [var.management_interface] is invalid: + validate_management_interface_value = index(local.management_interface_allowed_values, var.management_interface) +} + +variable "configuration_template_name" { + description = "The configuration template name as it appears in the configuration file" + type = string +} + +variable "admin_shell" { + description = "The admin shell to configure on machine or the first time" + type = string + default = "/etc/cli.sh" +} + +locals { + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh" + ] + // Will fail if [var.admin_shell] is invalid + validate_admin_shell_value = index(local.admin_shell_allowed_values, var.admin_shell) +} + +//********************** Networking Variables **************************// +variable "vnet_name" { + description = "Virtual Network name" + type = string +} + +variable "address_space" { + description = "The address space that is used by a Virtual Network." + type = string + default = "10.0.0.0/16" +} + +variable "subnet_prefixes" { + description = "Address prefix to be used for network subnets" + type = list(string) + default = ["10.0.0.0/24","10.0.1.0/24"] +} + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} + +variable "add_storage_account_ip_rules" { + type = bool + default = false + description = "Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location" +} + +variable "storage_account_additional_ips" { + type = list(string) + description = "IPs/CIDRs that are allowed access to the Storage Account" + default = [] +} +//********************* Load Balancers Variables **********************// +variable "deployment_mode" { + description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" + type = string + default = "Standard" +} + +locals { // locals for 'deployment_mode' allowed values + deployment_mode_allowd_values = [ + "Standard", + "External", + "Internal" + ] + // will fail if [var.deployment_mode] is invalid: + validate_deployment_mode_value = index(local.deployment_mode_allowd_values, var.deployment_mode) +} + +variable "backend_lb_IP_address" { + description = "The IP address is defined by its position in the subnet" + type = number +} + +variable "lb_probe_port" { + description = "Port to be used for load balancer health probes and rules" + default = "8117" +} + +variable "lb_probe_protocol" { + description = "Protocols to be used for load balancer health probes and rules" + default = "Tcp" +} + +variable "lb_probe_unhealthy_threshold" { + description = "Number of times load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy." + default = 2 +} + +variable "lb_probe_interval" { + description = "Interval in seconds load balancer health probe rule performs a check" + default = 5 +} + +variable "frontend_port" { + description = "Port that will be exposed to the external Load Balancer" + type = string + default = "80" +} + +variable "backend_port" { + description = "Port that will be exposed to the external Load Balance" + type = string + default = "8081" +} + +variable "frontend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the frontend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + frontend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.frontend_load_distribution] is invalid: + validate_frontend_load_distribution_value = index(local.frontend_load_distribution_allowed_values, var.frontend_load_distribution) +} + +variable "backend_load_distribution" { + description = "Specifies the load balancing distribution type to be used by the backend load balancer" + type = string +} + +locals { // locals for 'frontend_load_distribution' allowed values + backend_load_distribution_allowed_values = [ + "Default", + "SourceIP", + "SourceIPProtocol" + ] + // will fail if [var.backend_load_distribution] is invalid: + validate_backend_load_distribution_value = index(local.backend_load_distribution_allowed_values, var.backend_load_distribution) +} + +//********************** Scale Set variables *******************// + +variable "vm_os_offer" { + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + type = string +} + +locals { // locals for 'vm_os_offer' allowed values + vm_os_offer_allowed_values = [ + "check-point-cg-r8040", + "check-point-cg-r81", + "check-point-cg-r8110", + "check-point-cg-r8120", + ] + // will fail if [var.vm_os_offer] is invalid: + validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) +} + +variable "bootstrap_script"{ + description = "An optional script to run on the initial boot" + #example: + #"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +} + +variable "notification_email" { + description = "Specifies a list of custom email addresses to which the email notifications will be sent" + type = string +} + +//********************** Credentials **************************// +variable "tenant_id" { + description = "Tenant ID" + type = string +} + +variable "subscription_id" { + description = "Subscription ID" + type = string +} + +variable "client_id" { + description = "Application ID(Client ID)" + type = string +} + +variable "client_secret" { + description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password." + type = string +} + +variable "sku" { + description = "SKU" + type = string + default = "Standard" +} + +variable "enable_custom_metrics" { + description = "Enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service." + type = bool + default = true +} + +variable "enable_floating_ip" { + description = "Indicates whether the load balancers will be deployed with floating IP." + type = bool + default = false +} diff --git a/terraform/azure/vmss-new-vnet/versions.tf b/terraform/azure/vmss-new-vnet/versions.tf new file mode 100644 index 00000000..df4caa26 --- /dev/null +++ b/terraform/azure/vmss-new-vnet/versions.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.14.3" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.81.0" + } + random = { + version = "~> 3.5.1" + } + } +} + + diff --git a/terraform/gcp/README.md b/terraform/gcp/README.md new file mode 100755 index 00000000..121394b0 --- /dev/null +++ b/terraform/gcp/README.md @@ -0,0 +1,12 @@ +# Check Point Terraform deployment modules for Google Cloud Platform + +This project was developed to allow Terraform deployments for Check Point CloudGuard IaaS solutions on GCP. + + +These modules use Terraform's [Google Cloud Platform provider](https://registry.terraform.io/providers/hashicorp/google/latest/docs) in order to create and provision resources on GCP. + + + ## Prerequisites + +1. [Download Terraform](https://www.terraform.io/downloads.html) and follow the instructions according to your OS. +2. Get started with Terraform GCP provider - refer to [Terraform GCP provider best practices](https://registry.terraform.io/providers/hashicorp/google/latest/docs). \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/README.md b/terraform/gcp/autoscale-into-existing-vpc/README.md new file mode 100755 index 00000000..1c11c3d3 --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/README.md @@ -0,0 +1,233 @@ +# Check Point Autoscale into VPC (MIG) Terraform module for GCP + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into an existing VPC on GCP. + +These types of Terraform resources are supported: +* [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation +* [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) +* [Autoscaler](https://www.terraform.io/docs/providers/google/r/compute_region_autoscaler.html) + + +For additional information, +please see the [CloudGuard Network for GCP Autoscaling MIG Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_Autoscaling_MIG/Default.htm) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.autoscalers.create + compute.autoscalers.delete + compute.autoscalers.get + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instanceGroupManagers.create + compute.instanceGroupManagers.delete + compute.instanceGroupManagers.get + compute.instanceGroupManagers.use + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.setMetadata + compute.instances.setTags + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/autoscale-into-new-vpc/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/autoscale-into-existing-vpc/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in autoscale-into-existing-vpc/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +prefix = "chkp-tf-mig" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "Ephemeral Public IP (eth0)" +management_name = "tf-checkpoint-management" +configuration_template_name = "tf-asg-autoprov-tmplt" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = true +admin_shell = "/etc/cli.sh" +allow_upload_download = true + +# --- Networking --- +region = "us-central1" +external_network_name = "default" +external_subnetwork_name = "default" +internal_network_name = "tf-vpc-network" +internal_subnetwork_name = "tf-vpc-subnetwork" +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +cpu_usage = 60 +instances_min_grop_size = 2 +instances_max_grop_size = 10 +disk_type = "SSD Persistent Disk" +disk_size = 100 +enable_monitoring = false +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | +| management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | +| configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| external_network_name | The network determines what network traffic the instance can access. | string | N/A | N/A | yes | +| external_subnetwork_name | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | N/A | yes | +| internal_network_name | The network determines what network traffic the instance can access. | string | N/A | N/A | yes | +| internal_subnetwork_name | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | N/A | yes | +| ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| | | | | | +| machine_type | Machine Type. | string | N/A | "n1-standard-4" | no | +| cpu_usage | Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance. | number | number between 10 and 90 | 60 | no | +| instances_min_grop_size | The minimal number of instances | number | N/A | 2 | no | +| instances_max_grop_size | The maximal number of instances | number | N/A | 10 | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Balanced Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| management_name | Security Management server name. | +| configuration_template_name | Provisioning configuration template name. | +| instance_template_name | Instance template name. | +| instance_group_manager_name | Instance group manager name. | +| autoscaler_name | Autoscaler name. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into an existing VPC on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/locals.tf b/terraform/gcp/autoscale-into-existing-vpc/locals.tf new file mode 100755 index 00000000..058d0689 --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/locals.tf @@ -0,0 +1,63 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + management_nic_allowed_values = [ + "Ephemeral Public IP (eth0)", + "Private IP (eth1)"] + // will fail if [var.management_nic] is invalid: + validate_management_nic = index(local.management_nic_allowed_values, var.management_nic) + + regex_valid_management_name = "^([ -~]+)$" + // Will fail if var.management_name is invalid + regex_management_name = regex(local.regex_valid_management_name, var.management_name) == var.management_name ? 0 : "Variable [management_name] must be a valid Security Management name including ascii characters only" + + regex_valid_configuration_template_name = "^([ -~]+)$" + // Will fail if var.configuration_template_name is invalid + regex_configuration_template_name = regex(local.regex_valid_configuration_template_name, var.configuration_template_name) == var.configuration_template_name ? 0 : "Variable [configuration_template_name] must be a valid autoprovisioing configuration template name including ascii characters only" + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regions_allowed_values = data.google_compute_regions.available_regions.names + // Will fail if var.region is invalid + validate_region = index(local.regions_allowed_values, var.region) + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) + + + + disk_type_condition = var.disk_type == "SSD Persistent Disk" ? "pd-ssd" : var.disk_type == "Balanced Persistent Disk" ? "pd-balanced" : var.disk_type == "Standard Persistent Disk" ? "pd-standard" : "" + mgmt_nic_condition = var.management_nic == "Ephemeral Public IP (eth0)" ? true : false + mgmt_nic_ip_address_condition = local.mgmt_nic_condition ? "x-chkp-ip-address--public" : "x-chkp-ip-address--private" + mgmt_nic_interface_condition = local.mgmt_nic_condition ? "x-chkp-management-interface--eth0" : "x-chkp-management-interface--eth1" + network_defined_by_routes_condition = var.network_defined_by_routes ? "x-chkp-topology-eth1--internal" : "" + network_defined_by_routes_settings_condition = var.network_defined_by_routes ? "x-chkp-topology-settings-eth1--network-defined-by-routes" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false + ICMP_traffic_condition = length(var.ICMP_traffic) == 0 ? 0 : 1 + TCP_traffic_condition = length(var.TCP_traffic) == 0 ? 0 : 1 + UDP_traffic_condition = length(var.UDP_traffic) == 0 ? 0 : 1 + SCTP_traffic_condition = length(var.SCTP_traffic) == 0 ? 0 : 1 + ESP_traffic_condition = length(var.ESP_traffic) == 0 ? 0 : 1 +} \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/main.tf b/terraform/gcp/autoscale-into-existing-vpc/main.tf new file mode 100755 index 00000000..24548144 --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/main.tf @@ -0,0 +1,197 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +data "google_compute_network" "external_network" { + name = var.external_network_name +} +data "google_compute_network" "internal_network" { + name = var.internal_network_name +} +resource "random_string" "random_sic_key" { + length = 12 + special = false +} + +resource "google_compute_instance_template" "instance_template" { + name = "${var.prefix}-tmplt-${random_string.random_string.result}" + machine_type = var.machine_type + can_ip_forward = true + + + disk { + source_image = "checkpoint-public/${var.image_name}" + auto_delete = true + boot = true + device_name = "${var.prefix}-boot-${random_string.random_string.result}" + disk_type = local.disk_type_condition + disk_size_gb = var.disk_size + mode = "READ_WRITE" + type = "PERSISTENT" + } + + network_interface { + network = data.google_compute_network.external_network.self_link + subnetwork = var.external_subnetwork_name + dynamic "access_config" { + for_each = local.mgmt_nic_condition ? [ + 1] : [] + content { + network_tier = local.mgmt_nic_condition ? "PREMIUM" : "STANDARD" + } + } + } + + network_interface { + network = data.google_compute_network.internal_network.self_link + subnetwork = var.internal_subnetwork_name + } + + scheduling { + automatic_restart = true + on_host_maintenance = "MIGRATE" + preemptible = false + } + + service_account { + email = "default" + scopes = [ + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/logging.write", + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/pubsub", + "https://www.googleapis.com/auth/service.management.readonly", + "https://www.googleapis.com/auth/servicecontrol", + "https://www.googleapis.com/auth/trace.append"] + } + tags = [ + format("x-chkp-management--%s", var.management_name), + format("x-chkp-template--%s", var.configuration_template_name), + "checkpoint-gateway", + local.mgmt_nic_ip_address_condition, + local.mgmt_nic_interface_condition, + local.network_defined_by_routes_condition, + local.network_defined_by_routes_settings_condition] + + metadata_startup_script = templatefile("${path.module}/../common/startup-script.sh", { + // script's arguments + generatePassword = "false" + config_url = "" + config_path = "" + sicKey = "" + allowUploadDownload = var.allow_upload_download + templateName = "autoscale_tf" + templateVersion = "20230109" + templateType = "terraform" + mgmtNIC = var.management_nic + hasInternet = "false" + enableMonitoring = var.enable_monitoring + shell = var.admin_shell + installationType = "AutoScale" + computed_sic_key = random_string.random_sic_key.result + managementGUIClientNetwork = "" + primary_cluster_address_name = "" + secondary_cluster_address_name = "" + managementNetwork = "" + numAdditionalNICs = "" + smart_1_cloud_token = "" + name = "" + zoneConfig = "" + region = "" + }) + + metadata = local.admin_SSH_key_condition ? { + serial-port-enable = "true" + instanceSSHKey = var.admin_SSH_key + } : { + serial-port-enable = "true" + } +} + +resource "google_compute_firewall" "ICMP_firewall_rules" { + count = local.ICMP_traffic_condition + name = "${var.prefix}-icmp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "icmp" + } + source_ranges = var.ICMP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "TCP_firewall_rules" { + count = local.TCP_traffic_condition + name = "${var.prefix}-tcp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "tcp" + } + source_ranges = var.TCP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "UDP_firewall_rules" { + count = local.UDP_traffic_condition + name = "${var.prefix}-udp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "udp" + } + source_ranges = var.UDP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "SCTP_firewall_rules" { + count = local.SCTP_traffic_condition + name = "${var.prefix}-sctp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "sctp" + } + source_ranges = var.SCTP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_firewall" "ESP_firewall_rules" { + count = local.ESP_traffic_condition + name = "${var.prefix}-esp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "esp" + } + source_ranges = var.ESP_traffic + target_tags = [ + "checkpoint-gateway"] +} +resource "google_compute_region_instance_group_manager" "instance_group_manager" { + region = var.region + name = "${var.prefix}-igm-${random_string.random_string.result}" + version { + instance_template = google_compute_instance_template.instance_template.id + name = "${var.prefix}-tmplt" + } + base_instance_name = "${var.prefix}-${random_string.random_string.result}" +} +resource "google_compute_region_autoscaler" "autoscaler" { + region = var.region + name = "${var.prefix}-autoscaler-${random_string.random_string.result}" + target = google_compute_region_instance_group_manager.instance_group_manager.id + + autoscaling_policy { + max_replicas = var.instances_max_grop_size + min_replicas = var.instances_min_grop_size + cooldown_period = 90 + + cpu_utilization { + target = var.cpu_usage/100 + } + } +} diff --git a/terraform/gcp/autoscale-into-existing-vpc/output.tf b/terraform/gcp/autoscale-into-existing-vpc/output.tf new file mode 100755 index 00000000..62b1f028 --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/output.tf @@ -0,0 +1,33 @@ +output "SIC_key" { + value = random_string.random_sic_key.result +} +output "management_name" { + value = var.management_name +} +output "configuration_template_name" { + value = var.configuration_template_name +} +output "instance_template_name" { + value = google_compute_instance_template.instance_template.name +} +output "instance_group_manager_name" { + value = google_compute_region_instance_group_manager.instance_group_manager.name +} +output "autoscaler_name" { + value = google_compute_region_autoscaler.autoscaler.name +} +output "ICMP_firewall_rules_name" { + value = google_compute_firewall.ICMP_firewall_rules[*].name +} +output "TCP_firewall_rules_name" { + value = google_compute_firewall.TCP_firewall_rules[*].name +} +output "UDP_firewall_rules_name" { + value = google_compute_firewall.UDP_firewall_rules[*].name +} +output "SCTP_firewall_rules_name" { + value = google_compute_firewall.SCTP_firewall_rules[*].name +} +output "ESP_firewall_rules_name" { + value = google_compute_firewall.ESP_firewall_rules[*].name +} \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars b/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars new file mode 100755 index 00000000..dfb828db --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars @@ -0,0 +1,36 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point--- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" +management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +allow_upload_download = "PLEASE ENTER true OR false" # true + +# --- Networking --- +region = "PLEASE ENTER REGION" # "us-central1" +external_network_name = "PLEASE ENTER EXTERNAL NETWORK NAME" # "default" +external_subnetwork_name = "PLEASE ENTER EXTERNAL SUBNETWORK NAME" # "default" +internal_network_name = "PLEASE ENTER INTERNAL NETWORK NAME" # "tf-vpc-network" +internal_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK NAME" # "tf-vpc-subnetwork" +ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] + +# --- Instance Configuration --- +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +cpu_usage = "PLEASE ENTER CPU USAGE" # 60 +instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 +instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/variables.tf b/terraform/gcp/autoscale-into-existing-vpc/variables.tf new file mode 100755 index 00000000..8acd8fda --- /dev/null +++ b/terraform/gcp/autoscale-into-existing-vpc/variables.tf @@ -0,0 +1,157 @@ +# Check Point CloudGuard IaaS Autoscaling - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point--- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-mig" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "management_nic" { + type = string + description = "Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "management_name" { + type = string + description = "The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including ascii characters only)" + default = "tf-checkpoint-management" +} +variable "configuration_template_name" { + type = string + description = "Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including ascii characters only)" + default = "tf-asg-autoprov-tmplt" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "network_defined_by_routes" { + type = bool + description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." + default = true +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +# --- Networking --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} +variable "external_network_name" { + type = string + description = "The network determines what network traffic the instance can access" +} +variable "external_subnetwork_name" { + type = string + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." +} +variable "internal_network_name" { + type = string + description = "The network determines what network traffic the instance can access" +} +variable "internal_subnetwork_name" { + type = string + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." +} +variable "ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic." + default = [] +} +variable "UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} + +# --- Instance Configuration --- +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "cpu_usage" { + type = number + description = "Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance." + default = 60 +} +resource "null_resource" "cpu_usage_validation" { + // Will fail if var.cpu_usage is less than 10 or more than 90 + count = var.cpu_usage >= 10 && var.cpu_usage <= 90 ? 0 : "variable cpu_usage must be a number between 10 and 90" +} +variable "instances_min_grop_size" { + type = number + description = "The minimal number of instances" + default = 2 +} +variable "instances_max_grop_size" { + type = number + description = "The maximal number of instances" + default = 10 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 4096 + count = var.disk_size >= 100 && var.disk_size <= 4096 ? 0 : "variable disk_size must be a number between 100 and 4096" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-new-vpc/README.md b/terraform/gcp/autoscale-into-new-vpc/README.md new file mode 100755 index 00000000..3439418c --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/README.md @@ -0,0 +1,241 @@ +# Check Point Autoscale (MIG) Terraform module for GCP + +Terraform module which deploys an Auto Scaling Group of Check Point Security Gateways into a new VPC on GCP. + +These types of Terraform resources are supported: +* [Network](https://www.terraform.io/docs/providers/google/d/compute_network.html) +* [Subnetwork](https://www.terraform.io/docs/providers/google/r/compute_subnetwork.html) +* [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation +* [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) +* [Autoscaler](https://www.terraform.io/docs/providers/google/r/compute_region_autoscaler.html) + + +For additional information, +please see the [CloudGuard Network for GCP Autoscaling MIG Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_Autoscaling_MIG/Default.htm) + +This solution uses the following modules: +- /gcp/autoscale-into-existing-vpc + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.autoscalers.create + compute.autoscalers.delete + compute.autoscalers.get + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instanceGroupManagers.create + compute.instanceGroupManagers.delete + compute.instanceGroupManagers.get + compute.instanceGroupManagers.use + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.setMetadata + compute.instances.setTags + compute.networks.create + compute.networks.delete + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.create + compute.subnetworks.delete + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/autoscale-into-new-vpc/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` + ## Usage +- Fill all variables in the /gcp/autoscale-into-new-vpc/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in autoscale-into-new-vpc/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +prefix = "chkp-tf-mig" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "Ephemeral Public IP (eth0)" +management_name = "tf-checkpoint-management" +configuration_template_name = "tf-asg-autoprov-tmplt" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = true +admin_shell = "/etc/cli.sh" +allow_upload_download = true + +# --- Networking --- +region = "us-central1" +external_subnetwork_ip_cidr_range = "10.0.1.0/24" +internal_subnetwork_ip_cidr_range = "10.0.2.0/24" +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +cpu_usage = 60 +instances_min_grop_size = 2 +instances_max_grop_size = 10 +disk_type = "SSD Persistent Disk" +disk_size = 100 +enable_monitoring = false +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = [] +SCTP_traffic = [] +ESP_traffic = [] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | +| management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | +| configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| external_subnetwork_ip_cidr_range | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| internal_subnetwork_ip_cidr_range | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| | | | | | +| machine_type | Machine Type. | string | N/A | "n1-standard-4" | no | +| cpu_usage | Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance. | number | number between 10 and 90 | 60 | no | +| instances_min_grop_size | The minimal number of instances | number | N/A | 2 | no | +| instances_max_grop_size | The maximal number of instances | number | N/A | 10 | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Balanced Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | + + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| external_network_name | The external network name in which the gateways will reside. | +| external_subnetwork_name | The external subnetwork name. | +| internal_network_name | The internal network name in which application servers reside. | +| internal_subnetwork_name | The internal subnetwork name. | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| management_name | Security Management server name. | +| configuration_template_name | Provisioning configuration template name. | +| instance_template_name | Instance template name. | +| instance_group_manager_name | Instance group manager name. | +| autoscaler_name | Autoscaler name. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into a new VPC on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/terraform/gcp/autoscale-into-new-vpc/locals.tf b/terraform/gcp/autoscale-into-new-vpc/locals.tf new file mode 100755 index 00000000..451bbd93 --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/locals.tf @@ -0,0 +1,48 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + management_nic_allowed_values = [ + "Ephemeral Public IP (eth0)", + "Private IP (eth1)"] + // will fail if [var.management_nic] is invalid: + validate_management_nic = index(local.management_nic_allowed_values, var.management_nic) + + regex_valid_management_name = "^([ -~]+)$" + // Will fail if var.management_name is invalid + regex_management_name = regex(local.regex_valid_management_name, var.management_name) == var.management_name ? 0 : "Variable [management_name] must be a valid Security Management name including ascii characters only" + + regex_valid_configuration_template_name = "^([ -~]+)$" + // Will fail if var.configuration_template_name is invalid + regex_configuration_template_name = regex(local.regex_valid_configuration_template_name, var.configuration_template_name) == var.configuration_template_name ? 0 : "Variable [configuration_template_name] must be a valid autoprovisioing configuration template name including ascii characters only" + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + regions_allowed_values = data.google_compute_regions.available_regions.names + // Will fail if var.region is invalid + validate_region = index(local.regions_allowed_values, var.region) + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) +} \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-new-vpc/main.tf b/terraform/gcp/autoscale-into-new-vpc/main.tf new file mode 100755 index 00000000..16ec2197 --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/main.tf @@ -0,0 +1,73 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "mig_random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +resource "google_compute_network" "external_network" { + name = "${var.prefix}-ext-network-${random_string.mig_random_string.result}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "external_subnetwork" { + name = "${var.prefix}-ext-subnet-${random_string.mig_random_string.result}" + ip_cidr_range = var.external_subnetwork_ip_cidr_range + region = var.region + network = google_compute_network.external_network.id +} + +resource "google_compute_network" "internal_network" { + name = "${var.prefix}-int-network-${random_string.mig_random_string.result}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "internal_subnetwork" { + name = "${var.prefix}-int-subnet-${random_string.mig_random_string.result}" + ip_cidr_range = var.internal_subnetwork_ip_cidr_range + region = var.region + network = google_compute_network.internal_network.id +} + + +module "autoscale-into-existing-vpc" { + source = "../autoscale-into-existing-vpc" + + service_account_path = var.service_account_path + project = var.project + + # --- Check Point--- + prefix = var.prefix + image_name = var.image_name + management_nic = var.management_nic + management_name = var.management_name + configuration_template_name = var.configuration_template_name + admin_SSH_key = var.admin_SSH_key + network_defined_by_routes = var.network_defined_by_routes + admin_shell = var.admin_shell + allow_upload_download = var.allow_upload_download + + # --- Networking --- + region = var.region + external_network_name = google_compute_network.external_network.name + external_subnetwork_name = google_compute_subnetwork.external_subnetwork.name + internal_network_name = google_compute_network.internal_network.name + internal_subnetwork_name = google_compute_subnetwork.internal_subnetwork.name + ICMP_traffic = var.ICMP_traffic + TCP_traffic = var.TCP_traffic + UDP_traffic = var.UDP_traffic + SCTP_traffic = var.SCTP_traffic + ESP_traffic = var.ESP_traffic + + # --- Instance Configuration --- + machine_type = var.machine_type + cpu_usage = var.cpu_usage + instances_min_grop_size = var.instances_min_grop_size + instances_max_grop_size = var.instances_max_grop_size + disk_type = var.disk_type + disk_size = var.disk_size + enable_monitoring = var.enable_monitoring +} \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-new-vpc/output.tf b/terraform/gcp/autoscale-into-new-vpc/output.tf new file mode 100755 index 00000000..ef020e27 --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/output.tf @@ -0,0 +1,46 @@ +output "external_network_name" { + value = google_compute_network.external_network.name +} +output "external_subnetwork_name" { + value = google_compute_subnetwork.external_subnetwork.name +} +output "internal_network_name" { + value = google_compute_network.internal_network.name +} +output "internal_subnetwork_name" { + value = google_compute_subnetwork.internal_subnetwork.name +} + +output "SIC_key" { + value = module.autoscale-into-existing-vpc.SIC_key +} +output "management_name" { + value = var.management_name +} +output "configuration_template_name" { + value = var.configuration_template_name +} +output "instance_template_name" { + value = module.autoscale-into-existing-vpc.instance_template_name +} +output "instance_group_manager_name" { + value = module.autoscale-into-existing-vpc.instance_group_manager_name +} +output "autoscaler_name" { + value = module.autoscale-into-existing-vpc.autoscaler_name +} +output "ICMP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.ICMP_firewall_rules_name +} +output "TCP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.TCP_firewall_rules_name +} +output "UDP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.UDP_firewall_rules_name +} +output "SCTP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.SCTP_firewall_rules_name +} +output "ESP_firewall_rules_name" { + value = module.autoscale-into-existing-vpc.ESP_firewall_rules_name +} diff --git a/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars b/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars new file mode 100755 index 00000000..48fe765a --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars @@ -0,0 +1,34 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point--- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" +management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" +management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +network_defined_by_routes = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +allow_upload_download = "PLEASE ENTER true OR false" # true + +# --- Networking --- +region = "PLEASE ENTER REGION" # "us-central1" +external_subnetwork_ip_cidr_range = "PLEASE ENTER EXTERNAL SUBNETWORK CIDR" # "10.0.1.0/24" +internal_subnetwork_ip_cidr_range = "PLEASE ENTER INTERNAL SUBNETWORK CIDR" # "10.0.2.0/24" +ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] + +# --- Instance Configuration --- +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +cpu_usage = "PLEASE ENTER CPU USAGE" # 60 +instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 +instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-new-vpc/variables.tf b/terraform/gcp/autoscale-into-new-vpc/variables.tf new file mode 100755 index 00000000..f19a77d2 --- /dev/null +++ b/terraform/gcp/autoscale-into-new-vpc/variables.tf @@ -0,0 +1,150 @@ +# Check Point CloudGuard IaaS Autoscaling - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point--- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-mig" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "management_nic" { + type = string + description = "Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "management_name" { + type = string + description = "The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including ascii characters only)" + default = "tf-checkpoint-management" +} +variable "configuration_template_name" { + type = string + description = "Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including ascii characters only)" + default = "tf-asg-autoprov-tmplt" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "network_defined_by_routes" { + type = bool + description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." + default = true +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "allow_upload_download" { + type = bool + description = "Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point" + default = true +} + +# --- Networking --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} + +variable "external_subnetwork_ip_cidr_range" { + type = string + description = "The range of external addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "internal_subnetwork_ip_cidr_range" { + type = string + description = "The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable TCP traffic." + default = [] +} +variable "UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} + +# --- Instance Configuration --- +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "cpu_usage" { + type = number + description = "Target CPU usage (%) - Autoscaling adds or removes instances in the group to maintain this level of CPU usage on each instance." + default = 60 +} +resource "null_resource" "cpu_usage_validation" { + // Will fail if var.cpu_usage is less than 10 or more than 90 + count = var.cpu_usage >= 10 && var.cpu_usage <= 90 ? 0 : "variable cpu_usage must be a number between 10 and 90" +} +variable "instances_min_grop_size" { + type = number + description = "The minimal number of instances" + default = 2 +} +variable "instances_max_grop_size" { + type = number + description = "The maximal number of instances" + default = 10 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +resource "null_resource" "disk_size_validation" { + // Will fail if var.disk_size is less than 100 or more than 4096 + count = var.disk_size >= 100 && var.disk_size <= 4096 ? 0 : "variable disk_size must be a number between 100 and 4096" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} \ No newline at end of file diff --git a/terraform/gcp/common/cluster-member/main.tf b/terraform/gcp/common/cluster-member/main.tf new file mode 100755 index 00000000..c740f8b3 --- /dev/null +++ b/terraform/gcp/common/cluster-member/main.tf @@ -0,0 +1,130 @@ +locals { + disk_type_condition = var.disk_type == "SSD Persistent Disk" ? "pd-ssd" : var.disk_type == "Standard Persistent Disk" ? "pd-standard" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false +} + +resource "google_compute_address" "member_ip_address" { + name = "${var.member_name}-address" + region = var.region +} + +resource "google_compute_instance" "cluster_member" { + name = var.member_name + description = "CloudGuard Highly Available Security Cluster" + zone = var.zone + tags = [ + "checkpoint-gateway"] + machine_type = var.machine_type + can_ip_forward = true + + boot_disk { + auto_delete = true + device_name = "${var.prefix}-boot" + + initialize_params { + size = var.disk_size + type = local.disk_type_condition + image = var.image_name + } + } + + network_interface { + network = var.cluster_network[0] + subnetwork = var.cluster_network_subnetwork[0] + } + network_interface { + network = var.mgmt_network[0] + subnetwork = var.mgmt_network_subnetwork[0] + access_config { + nat_ip = google_compute_address.member_ip_address.address + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 1 ? [ + 1] : [] + content { + network = var.internal_network1_network[0] + subnetwork = var.internal_network1_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 2 ? [ + 1] : [] + content { + network = var.internal_network2_network[0] + subnetwork = var.internal_network2_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 3 ? [ + 1] : [] + content { + network = var.internal_network3_network[0] + subnetwork = var.internal_network3_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 4 ? [ + 1] : [] + content { + network = var.internal_network4_network[0] + subnetwork = var.internal_network4_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks >= 5 ? [ + 1] : [] + content { + network = var.internal_network5_network[0] + subnetwork = var.internal_network5_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.num_internal_networks == 6 ? [ + 1] : [] + content { + network = var.internal_network6_network[0] + subnetwork = var.internal_network6_subnetwork[0] + } + } + + service_account { + + scopes = [ + "https://www.googleapis.com/auth/monitoring.write", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloudruntimeconfig"] + } + + metadata = local.admin_SSH_key_condition ? { + instanceSSHKey = var.admin_SSH_key + adminPasswordSourceMetadata = var.generate_password ? var.generated_admin_password : "" + } : { adminPasswordSourceMetadata = var.generate_password ? var.generated_admin_password : "" } + + metadata_startup_script = templatefile("${path.module}/../startup-script.sh", { + // script's arguments + generatePassword = var.generate_password + config_url = "https://runtimeconfig.googleapis.com/v1beta1/projects/${var.project}/configs/${var.prefix}-config" + config_path = "projects/${var.project}/configs/${var.prefix}-config" + sicKey = var.sic_key + allowUploadDownload = var.allow_upload_download + templateName = "cluster_tf" + templateVersion = "20230109" + templateType = "terraform" + mgmtNIC = "" + hasInternet = "true" + enableMonitoring = var.enable_monitoring + shell = var.admin_shell + installationType = "Cluster" + computed_sic_key = "" + managementGUIClientNetwork = "" + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + managementNetwork = var.management_network + numAdditionalNICs = var.num_internal_networks + smart_1_cloud_token = "${var.member_name}" == "${var.prefix}-member-a" ? var.smart_1_cloud_token_a : var.smart_1_cloud_token_b + name = var.member_name + zoneConfig = var.zone + region = var.region + }) +} \ No newline at end of file diff --git a/terraform/gcp/common/cluster-member/output.tf b/terraform/gcp/common/cluster-member/output.tf new file mode 100755 index 00000000..ab8ad2dc --- /dev/null +++ b/terraform/gcp/common/cluster-member/output.tf @@ -0,0 +1,6 @@ +output "cluster_member_name" { + value = google_compute_instance.cluster_member.name +} +output "cluster_member_ip_address" { + value = google_compute_address.member_ip_address.address +} diff --git a/terraform/gcp/common/cluster-member/variables.tf b/terraform/gcp/common/cluster-member/variables.tf new file mode 100755 index 00000000..51b0e1d9 --- /dev/null +++ b/terraform/gcp/common/cluster-member/variables.tf @@ -0,0 +1,174 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "member_name" { + type = string +} +variable "region" { + type = string + default = "us-central1" +} +variable "zone" { + type = string + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "cluster_network" { + type = list(string) + description = "Cluster external network ID in the chosen zone." +} +variable "cluster_network_subnetwork" { + type = list(string) + description = "Cluster subnet ID in the chosen network." +} +variable "mgmt_network" { + type = list(string) + description = "Management network ID in the chosen zone." +} +variable "mgmt_network_subnetwork" { + type = list(string) + description = "Management subnet ID in the chosen network." +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." +} +variable "generated_admin_password" { + type = string + description = "administrator password" +} +variable "primary_cluster_address_name" { + type = string +} +variable "secondary_cluster_address_name" { + type = string +} \ No newline at end of file diff --git a/terraform/gcp/common/firewall-rule/main.tf b/terraform/gcp/common/firewall-rule/main.tf new file mode 100755 index 00000000..9f440b4a --- /dev/null +++ b/terraform/gcp/common/firewall-rule/main.tf @@ -0,0 +1,10 @@ +resource "google_compute_firewall" "firewall_rules" { + name = var.rule_name + network = var.network[0] + allow { + protocol = var.protocol + } + source_ranges = var.source_ranges + target_tags = [ + "checkpoint-gateway"] +} \ No newline at end of file diff --git a/terraform/gcp/common/firewall-rule/output.tf b/terraform/gcp/common/firewall-rule/output.tf new file mode 100755 index 00000000..e6088959 --- /dev/null +++ b/terraform/gcp/common/firewall-rule/output.tf @@ -0,0 +1,3 @@ +output "firewall_rule_name" { + value = google_compute_firewall.firewall_rules.name +} \ No newline at end of file diff --git a/terraform/gcp/common/firewall-rule/variables.tf b/terraform/gcp/common/firewall-rule/variables.tf new file mode 100755 index 00000000..39ac095b --- /dev/null +++ b/terraform/gcp/common/firewall-rule/variables.tf @@ -0,0 +1,17 @@ +variable "protocol" { + type = string + description = "The IP protocol to which this rule applies." +} +variable "source_ranges" { + type = list(string) + description = "(Optional) Source IP ranges for the protocol traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable this protocol traffic." + default = [] +} +variable "rule_name" { + type = string + description = "Firewall rule name." +} +variable "network" { + type = list(string) + description = "The name or self_link of the network to attach this firewall to." +} \ No newline at end of file diff --git a/terraform/gcp/common/members-a-b/main.tf b/terraform/gcp/common/members-a-b/main.tf new file mode 100755 index 00000000..d40ae6d1 --- /dev/null +++ b/terraform/gcp/common/members-a-b/main.tf @@ -0,0 +1,85 @@ +module "member_a" { + source = "../cluster-member" + + prefix = var.prefix + member_name = "${var.prefix}-member-a" + region = var.region + zone = var.zoneA + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = var.image_name + cluster_network = var.cluster_network + cluster_network_subnetwork = var.cluster_network_subnetwork + mgmt_network = var.mgmt_network + mgmt_network_subnetwork = var.mgmt_network_subnetwork + num_internal_networks = var.num_internal_networks + internal_network1_network = var.internal_network1_network + internal_network1_subnetwork = var.internal_network1_subnetwork + internal_network2_network = var.internal_network2_network + internal_network2_subnetwork = var.internal_network2_subnetwork + internal_network3_network = var.internal_network3_network + internal_network3_subnetwork = var.internal_network3_subnetwork + internal_network4_network = var.internal_network4_network + internal_network4_subnetwork = var.internal_network4_subnetwork + internal_network5_network = var.internal_network5_network + internal_network5_subnetwork = var.internal_network5_subnetwork + internal_network6_network = var.internal_network6_network + internal_network6_subnetwork = var.internal_network6_subnetwork + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generated_admin_password + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} + +module "member_b" { + source = "../cluster-member" + + prefix = var.prefix + member_name = "${var.prefix}-member-b" + region = var.region + zone = var.zoneB + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = var.image_name + cluster_network = var.cluster_network + cluster_network_subnetwork = var.cluster_network_subnetwork + mgmt_network = var.mgmt_network + mgmt_network_subnetwork = var.mgmt_network_subnetwork + num_internal_networks = var.num_internal_networks + internal_network1_network = var.internal_network1_network + internal_network1_subnetwork = var.internal_network1_subnetwork + internal_network2_network = var.internal_network2_network + internal_network2_subnetwork = var.internal_network2_subnetwork + internal_network3_network = var.internal_network3_network + internal_network3_subnetwork = var.internal_network3_subnetwork + internal_network4_network = var.internal_network4_network + internal_network4_subnetwork = var.internal_network4_subnetwork + internal_network5_network = var.internal_network5_network + internal_network5_subnetwork = var.internal_network5_subnetwork + internal_network6_network = var.internal_network6_network + internal_network6_subnetwork = var.internal_network6_subnetwork + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generated_admin_password + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = var.primary_cluster_address_name + secondary_cluster_address_name = var.secondary_cluster_address_name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} diff --git a/terraform/gcp/common/members-a-b/output.tf b/terraform/gcp/common/members-a-b/output.tf new file mode 100755 index 00000000..2398e6f3 --- /dev/null +++ b/terraform/gcp/common/members-a-b/output.tf @@ -0,0 +1,13 @@ +output "member_a_name" { + value = module.member_a.cluster_member_name +} +output "member_a_external_ip" { + value = module.member_a.cluster_member_ip_address +} + +output "member_b_name" { + value = module.member_b.cluster_member_name +} +output "member_b_external_ip" { + value = module.member_b.cluster_member_ip_address +} \ No newline at end of file diff --git a/terraform/gcp/common/members-a-b/variables.tf b/terraform/gcp/common/members-a-b/variables.tf new file mode 100755 index 00000000..4a5b6e04 --- /dev/null +++ b/terraform/gcp/common/members-a-b/variables.tf @@ -0,0 +1,175 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "region" { + type = string + default = "us-central1" +} +variable "zoneA" { + type = string + default = "us-central1-a" +} +variable "zoneB" { + type = string + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "cluster_network" { + type = list(string) + description = "Cluster external network ID in the chosen zone." +} +variable "cluster_network_subnetwork" { + type = list(string) + description = "Cluster subnet ID in the chosen network." +} +variable "mgmt_network" { + type = list(string) + description = "Management network ID in the chosen zone." +} +variable "mgmt_network_subnetwork" { + type = list(string) + description = "Management subnet ID in the chosen network." +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." +} +variable "generated_admin_password" { + type = string + description = "administrator password" +} +variable "primary_cluster_address_name" { + type = string +} +variable "secondary_cluster_address_name" { + type = string +} \ No newline at end of file diff --git a/terraform/gcp/common/network-and-subnet/main.tf b/terraform/gcp/common/network-and-subnet/main.tf new file mode 100755 index 00000000..7665da7c --- /dev/null +++ b/terraform/gcp/common/network-and-subnet/main.tf @@ -0,0 +1,21 @@ +locals { + create_network_condition = var.network_cidr == "" ? false : true +} + +resource "google_compute_network" "network" { + count = local.create_network_condition ? 1 : 0 + name = "${var.prefix}-${var.type}" + auto_create_subnetworks = false +} +resource "google_compute_subnetwork" "subnetwork" { + count = local.create_network_condition ? 1 : 0 + name = "${var.prefix}-${var.type}-subnet" + ip_cidr_range = var.network_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.network[count.index].id +} +data "google_compute_network" "network_name" { + count = local.create_network_condition ? 0 : 1 + name = var.network_name +} \ No newline at end of file diff --git a/terraform/gcp/common/network-and-subnet/output.tf b/terraform/gcp/common/network-and-subnet/output.tf new file mode 100755 index 00000000..862f84e4 --- /dev/null +++ b/terraform/gcp/common/network-and-subnet/output.tf @@ -0,0 +1,18 @@ +output "new_created_network_link" { + value = google_compute_network.network[*].self_link +} +output "new_created_subnet_link" { + value = google_compute_subnetwork.subnetwork[*].self_link +} +output "existing_network_link" { + value = data.google_compute_network.network_name[*].self_link +} +output "new_created_network_name" { + value = google_compute_network.network[*].name +} +output "new_created_subnet_name" { + value = google_compute_subnetwork.subnetwork[*].name +} +output "existing_network_name" { + value = data.google_compute_network.network_name[*].name +} \ No newline at end of file diff --git a/terraform/gcp/common/network-and-subnet/variables.tf b/terraform/gcp/common/network-and-subnet/variables.tf new file mode 100755 index 00000000..333d4f35 --- /dev/null +++ b/terraform/gcp/common/network-and-subnet/variables.tf @@ -0,0 +1,27 @@ +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "type" { + type = string +} +variable "network_cidr" { + type = string + description = "External subnet CIDR. If the variable's value is not empty double quotes, a new network will be created." + default = "10.0.0.0/24" +} +variable "private_ip_google_access" { + type = bool + description = "When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access." + default = true +} +variable "region" { + type = string + default = "us-central1" +} +variable "network_name" { + type = string + description = "External network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.network_cidr, this network name will not be used." + default = "" +} \ No newline at end of file diff --git a/terraform/gcp/common/startup-script.sh b/terraform/gcp/common/startup-script.sh new file mode 100755 index 00000000..196a04e3 --- /dev/null +++ b/terraform/gcp/common/startup-script.sh @@ -0,0 +1,3 @@ +#cloud-config +runcmd: + - 'python3 /etc/cloud_config.py generatePassword=\"${generatePassword}\" allowUploadDownload=\"${allowUploadDownload}\" templateName=\"${templateName}\" templateVersion=\"${templateVersion}\" mgmtNIC="X${mgmtNIC}X" hasInternet=\"${hasInternet}\" config_url=\"${config_url}\" config_path=\"${config_path}\" installationType="X${installationType}X" enableMonitoring=\"${enableMonitoring}\" shell=\"${shell}\" computed_sic_key=\"${computed_sic_key}\" sicKey=\"${sicKey}\" managementGUIClientNetwork=\"${managementGUIClientNetwork}\" primary_cluster_address_name=\"${primary_cluster_address_name}\" secondary_cluster_address_name=\"${secondary_cluster_address_name}\" managementNetwork=\"${managementNetwork}\" numAdditionalNICs=\"${numAdditionalNICs}\" smart1CloudToken="X${smart_1_cloud_token}X" name=\"${name}\" zone=\"${zoneConfig}\" region=\"${region}\"' \ No newline at end of file diff --git a/terraform/gcp/high-availability/README.md b/terraform/gcp/high-availability/README.md new file mode 100755 index 00000000..03e9d97b --- /dev/null +++ b/terraform/gcp/high-availability/README.md @@ -0,0 +1,317 @@ +# Check Point Cluster High Availability (HA) Terraform module for GCP + +Terraform module which deploys Check Point CloudGuard IaaS High Availability solution on GCP. + +These types of Terraform resources are supported: +* [Network](https://www.terraform.io/docs/providers/google/d/compute_network.html) - conditional creation +* [Subnetwork](https://www.terraform.io/docs/providers/google/r/compute_subnetwork.html) - conditional creation +* [Instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) +* [IP address](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_address) +* [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + + +For additional information, +please see the [CloudGuard Network for GCP High Availability Cluster Deployment Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Network_for_GCP_HA_Cluster/Default.htm) + +This solution uses the following modules: +- \gcp\common\network-and-subnet +- \gcp\common\firewall-rule +- \gcp\common\cluster-member +- \gcp\common\members-a-b + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: **terraform**. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The **main.tf** file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} +... +``` +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.create + compute.addresses.delete + compute.addresses.get + compute.addresses.use + compute.disks.create + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setServiceAccount + compute.instances.setTags + compute.networks.create + compute.networks.delete + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.create + compute.subnetworks.delete + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/high-availability/**terraform.tfvars** file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + region = "us-central1" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + region = var.region + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` + ## Usage +- Fill all variables in the /gcp/high-availability/**terraform.tfvars** file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in high-availability/**terraform.tfvars** file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point Deployment --- +prefix = "chkp-tf-ha" +license = "BYOL" +image_name = "check-point-r8110-gw-byol-cluster-335-985-v20220126" + +# --- Instances Configuration --- +region = "us-central1" +zoneA = "us-central1-a" +zoneB = "us-central1-a" +machine_type = "n1-standard-4" +disk_type = "SSD Persistent Disk" +disk_size = 100 +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +enable_monitoring = false + +# --- Check Point --- +management_network = "209.87.209.100/32" +sic_key = "aaaaaaaa" +generate_password = false +allow_upload_download = false +admin_shell = "/bin/bash" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token_a = "xxxxxxxxxxxxxxxxxxxxxxxx" +smart_1_cloud_token_b = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +cluster_network_cidr = "10.0.1.0/24" +cluster_network_name = "cluster-network" +cluster_network_subnetwork_name = "cluster-subnetwork" +cluster_ICMP_traffic = ["0.0.0.0/0"] +cluster_TCP_traffic = ["0.0.0.0/0"] +cluster_UDP_traffic = [] +cluster_SCTP_traffic = [] +cluster_ESP_traffic = [] +mgmt_network_cidr = "" +mgmt_network_name = "mgmt-network" +mgmt_network_subnetwork_name = "mgmt-subnetwork" +mgmt_ICMP_traffic = [] +mgmt_TCP_traffic = [] +mgmt_UDP_traffic = [] +mgmt_SCTP_traffic = ["0.0.0.0/0"] +mgmt_ESP_traffic = ["0.0.0.0/0"] +num_internal_networks = 1 +internal_network1_cidr = "10.0.3.0/24" +internal_network1_name = "" +internal_network1_subnetwork_name = "" + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + + +## Conditional creation +
1. For each network and subnet variable, you can choose whether to create a new network with a new subnet or to use an existing one. +- If you want to create a new network and subnet, please input a subnet CIDR block for the desired new network - In this case, the network name and subnetwork name will not be used: +``` + cluster_network_cidr = "10.0.1.0/24" + cluster_network_name = "not-use" + cluster_network_subnetwork_name = "not-use" +``` +- Otherwise, if you want to use existing network and subnet, please leave empty double quotes in the CIDR variable for the desired network: +``` + cluster_network_cidr = "" + cluster_network_name = "cluster-network" + cluster_network_subnetwork_name = "cluster-subnetwork" +``` +
2. To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +
Please leave empty list for a protocol if you want to disable traffic for it. +- For cluster: +``` + cluster_ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] + cluster_TCP_traffic = ["0.0.0.0/0"] + cluster_UDP_traffic = [] + cluster_SCTP_traffic = [] + cluster_ESP_traffic = [] +``` +- For management: +``` + mgmt_ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] + mgmt_TCP_traffic = ["0.0.0.0/0"] + mgmt_UDP_traffic = [] + mgmt_SCTP_traffic = [] + mgmt_ESP_traffic = [] +``` +
3.The cluster members will each have a network interface in each internal network and create high priority routes that will route all outgoing traffic to the cluster member that is currently active. +
Using internal networks depends on the variable num_internal_networks, by selecting a number in range 1 - 6 that represents the number of internal networks: +``` + num_internal_networks = 3 + internal_network1_cidr = "" + internal_network1_name = "internal_network1" + internal_network1_subnetwork_name = "internal_subnetwork1" + internal_network2_cidr = "10.0.4.0/24" + internal_network2_name = "" + internal_network2_subnetwork_name = "" + internal_network3_cidr = "10.0.5.0/24" + internal_network3_name = "" + internal_network3_subnetwork_name = "" +``` + +## Inputs +| Name | Description | Type | Allowed values | Default | Required | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-ha" | no | +| license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | +| image_name | The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py). | string | N/A | N/A | yes | +| | | | | | +| region | GCP region | string | N/A | "us-central1" | no | +| zoneA | Member A Zone. The zone determines what computing resources are available and where your data is stored and used. | string | N/A | "us-central1-a" | no | +| zoneB | Member B Zone. | string | N/A | "us-central1-a" | no | +| machine_type | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have. | string | N/A | "n1-standard-4" | no | +| disk_type | Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency. | string | - SSD Persistent Disk
- Standard Persistent Disk | "SSD Persistent Disk" | no | +| disk_size | Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. | number | number between 100 and 4096 | 100 | no | +| enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | +| | | | | | +| management_network | Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address. | string | N/A | N/A | yes | +| sic_key | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated | string | N/A | N/A | yes | +| generate_password | Automatically generate an administrator password. | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| smart_1_cloud_token_a | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| smart_1_cloud_token_b | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| cluster_network_cidr | Cluster external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | N/A | "10.0.0.0/24" | no | +| cluster_network_name | Cluster external network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.cluster_network_cidr, this network name will not be used. | string | N/A | "" | no | +| cluster_network_subnetwork_name | Cluster subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.cluster_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | +| cluster_ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| cluster_TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| cluster_UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable UDP traffic. | list(string) | N/A | [] | no | +| cluster_SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| cluster_ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| mgmt_network_cidr | Management external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The public IP used to manage each member will be translated to a private address in this external network. | string | N/A | "10.0.1.0/24" | no | +| mgmt_network_name | Management network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.mgmt_network_cidr, this network name will not be used. | string | N/A | "" | no | +| mgmt_network_subnetwork_name | Management subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.mgmt_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | +| mgmt_ICMP_traffic | (Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ICMP traffic. | list(string) | N/A | [] | no | +| mgmt_TCP_traffic | (Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| mgmt_UDP_traffic | (Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable SCTP traffic. | list(string) | N/A | [] | no | +| mgmt_SCTP_traffic | (Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic. | list(string) | N/A | [] | no | +| mgmt_ESP_traffic | (Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ESP traffic. | list(string) | N/A | [] | no | +| num_internal_networks | A number in the range 1 - 6 of internal network interfaces. | number | 1 - 6 | 1 | no | +| internal_network1_cidr | 1st internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network. | string | N/A | "10.0.2.0/24" | no | +| internal_network1_name | 1st internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network1_cidr, this network name will not be used. | string | N/A | "" | no | +| internal_network1_subnetwork_name | 1st internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network1_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | string | N/A | "" | no | + + + +## Outputs +| Name | Description | +| ------------- | ------------- | +| cluster_new_created_network | If a new cluster network creation is selected - the cluster network name, otherwise, an empty list. | +| cluster_new_created_subnet | If a new cluster network creation is selected - the cluster subnetwork name, otherwise, an empty list. | +| mgmt_new_created_network | If a new management network creation is selected - the management network name, otherwise, an empty list. | +| mgmt_new_created_subnet | If a new management network creation is selected - the management subnetwork name, otherwise, an empty list. | +| int_network1_new_created_network | If a new internal network 1 creation is selected - the internal network 1 network name, otherwise, an empty list. | +| int_network1_new_created_subnet | If a new internal network 1 creation is selected - the internal network 1 subnetwork name, otherwise, an empty list. | +| cluster_ICMP_firewall_rule | If enable - the cluster ICMP firewall rules name, otherwise, an empty list. | +| cluster_TCP_firewall_rule | If enable - the cluster TCP firewall rules name, otherwise, an empty list. | +| cluster_UDP_firewall_rule | If enable - the cluster UDP firewall rules name, otherwise, an empty list. | +| cluster_SCTP_firewall_rule | If enable - the cluster SCTP firewall rules name, otherwise, an empty list. | +| cluster_ESP_firewall_rule | If enable - the cluster ESP firewall rules name, otherwise, an empty list. | +| mgmt_ICMP_firewall_rule | If enable - the mgmt ICMP firewall rules name, otherwise, an empty list. | +| mgmt_TCP_firewall_rule | If enable - the mgmt TCP firewall rules name, otherwise, an empty list. | +| mgmt_UDP_firewall_rule | If enable - the mgmt UDP firewall rules name, otherwise, an empty list. | +| mgmt_SCTP_firewall_rule | If enable - the mgmt SCTP firewall rules name, otherwise, an empty list. | +| mgmt_ESP_firewall_rule | If enable - the mgmt ESP firewall rules name, otherwise, an empty list. | +| cluster_ip_external_address | Primary public IP address. | +| admin_password | If enable generate_password - the administrator password, otherwise, an empty list. | +| sic_key | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. | +| member_a_name | Member A name. | +| member_a_external_ip | Member A external ip. | +| member_a_zone | Member A Zone. | +| member_b_name | Member B name. | +| member_b_external_ip | Member B external ip. | +| member_b_zone | Member B Zone. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230209 | Added Smart-1 Cloud support. | +| | | | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point Check Point CloudGuard IaaS High Availability Terraform solution on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/terraform/gcp/high-availability/locals.tf b/terraform/gcp/high-availability/locals.tf new file mode 100755 index 00000000..e764ccaf --- /dev/null +++ b/terraform/gcp/high-availability/locals.tf @@ -0,0 +1,106 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-cluster-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + // will fail if the image name is not in the right syntax + validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + + split_zoneA = split("-", var.zoneA) + split_zoneB = split("-", var.zoneB) + // will fail if the var.zoneA and var.zoneB are not at the same region: + validate_zones = index(local.split_zoneA, local.split_zoneB[0]) == local.split_zoneA[0] && index(local.split_zoneA, local.split_zoneB[1]) == local.split_zoneA[0] ? 0 : "var.zoneA and var.zoneB are not at the same region" + + regex_valid_management_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|(S1C)$" + // Will fail if var.management_network is invalid + regex_management_network = regex(local.regex_valid_management_network, var.management_network) == var.management_network ? 0 : "Variable [management_network] must be a valid address in CIDR notation or 'S1C'." + + regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" + + // Will fail if var.cluster_network_cidr is invalid + regex_cluster_network_cidr = regex(local.regex_valid_network_cidr, var.cluster_network_cidr) == var.cluster_network_cidr ? 0 : "Variable [cluster_network_cidr] must be a valid address in CIDR notation." + // Will fail if var.mgmt_network_cidr is invalid + regex_mgmt_network_cidr = regex(local.regex_valid_network_cidr, var.mgmt_network_cidr) == var.mgmt_network_cidr ? 0 : "Variable [mgmt_network_cidr] must be a valid address in CIDR notation." + // Will fail if var.internal_network1_cidr is invalid + regex_internal_network1_cidr = regex(local.regex_valid_network_cidr, var.internal_network1_cidr) == var.internal_network1_cidr ? 0 : "Variable [internal_network1_cidr] must be a valid address in CIDR notation." + + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.disk_type) + + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + + // Will fail if var.cluster_network_name or var.cluster_network_subnetwork_name are empty double quotes in case of use existing network. + validate_cluster_network = var.cluster_network_cidr == "" && var.cluster_network_name == "" ? index("error:", "using existing cluster network - cluster network name is missing") : 0 + validate_cluster_subnet = var.cluster_network_cidr == "" && var.cluster_network_subnetwork_name == "" ? index("error:", "using existing cluster network - cluster subnetwork name is missing") : 0 + + // Will fail if var.mgmt_network_name or var.mgmt_network_subnetwork_name are empty double quotes in case of use existing network. + validate_mgmt_network = var.mgmt_network_cidr == "" && var.mgmt_network_name == "" ? index("error:", "using existing mgmt network - mgmt network name is missing") : 0 + validate_mgmt_subnet = var.mgmt_network_cidr == "" && var.mgmt_network_subnetwork_name == "" ? index("error:", "using existing mgmt network - mgmt subnetwork name is missing") : 0 + + // Will fail if var.internal_network1_name or var.internal_network1_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network1 = var.internal_network1_cidr == "" && var.internal_network1_name == "" ? index("error:", "using existing network1 - internal network1 name is missing") : 0 + validate_internal_network1_subnet = var.internal_network1_cidr == "" && var.internal_network1_subnetwork_name == "" ? ("using existing network1 - internal network1 subnet name is missing") : 0 + + // Will fail if var.internal_network2_name or var.internal_network2_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network2 = var.num_internal_networks >= 2 && var.internal_network2_cidr == "" && var.internal_network2_name == "" ? index("error:", "using existing network2 - internal network2 name is missing") : 0 + validate_internal_network2_subnet = var.num_internal_networks >= 2 && var.internal_network2_cidr == "" && var.internal_network2_subnetwork_name == "" ? index("error:", "using existing network2 - internal network2 subnet name is missing") : 0 + + // Will fail if var.internal_network3_name or var.internal_network3_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network3 = var.num_internal_networks >= 3 && var.internal_network3_cidr == "" && var.internal_network3_name == "" ? index("error:", "using existing network3 - internal network3 name is missing") : 0 + validate_internal_network3_subnet = var.num_internal_networks >= 3 && var.internal_network3_cidr == "" && var.internal_network3_subnetwork_name == "" ? index("error:", "using existing network3 - internal network3 subnet name is missing") : 0 + + // Will fail if var.internal_network4_name or var.internal_network4_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network4 = var.num_internal_networks >= 4 && var.internal_network4_cidr == "" && var.internal_network4_name == "" ? index("error:", "using existing network4 - internal network4 name is missing") : 0 + validate_internal_network4_subnet = var.num_internal_networks >= 4 && var.internal_network4_cidr == "" && var.internal_network4_subnetwork_name == "" ? index("error:", "using existing network4 - internal network4 subnet name is missing") : 0 + + // Will fail if var.internal_network5_name or var.internal_network5_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network5 = var.num_internal_networks >= 5 && var.internal_network5_cidr == "" && var.internal_network5_name == "" ? index("error:", "using existing network5 - internal network5 name is missing") : 0 + validate_internal_network5_subnet = var.num_internal_networks >= 5 && var.internal_network5_cidr == "" && var.internal_network5_subnetwork_name == "" ? index("error:", "using existing network5 - internal network5 subnet name is missing") : 0 + + // Will fail if var.internal_network6_name or var.internal_network6_subnetwork_name are empty double quotes in case of use existing network. + validate_internal_network6 = var.num_internal_networks >= 6 && var.internal_network6_cidr == "" && var.internal_network6_name == "" ? index("error:", "using existing network6 - internal network6 name is missing") : 0 + validate_internal_network6_subnet = var.num_internal_networks >= 6 && var.internal_network6_cidr == "" && var.internal_network6_subnetwork_name == "" ? index("error:", "using existing network6 - internal network6 subnet name is missing") : 0 + + + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + + regex_valid_sic_key = "^([a-z0-9A-Z]{8,30})$" + // Will fail if var.sic_key is invalid + regex_sic_key = regex(local.regex_valid_sic_key, var.sic_key) == var.sic_key ? 0 : "Variable [sic_key] must be at least 8 alpha numeric characters." + + + + + create_cluster_network_condition = var.cluster_network_cidr == "" ? false : true + create_mgmt_network_condition = var.mgmt_network_cidr == "" ? false : true + create_internal_network1_condition = var.internal_network1_cidr == "" ? false : true + create_internal_network2_condition = var.internal_network2_cidr == "" && var.num_internal_networks >= 2 ? false : true + create_internal_network3_condition = var.internal_network3_cidr == "" && var.num_internal_networks >= 3 ? false : true + create_internal_network4_condition = var.internal_network4_cidr == "" && var.num_internal_networks >= 4 ? false : true + create_internal_network5_condition = var.internal_network5_cidr == "" && var.num_internal_networks >= 5 ? false : true + create_internal_network6_condition = var.internal_network6_cidr == "" && var.num_internal_networks == 6 ? false : true + cluster_ICMP_traffic_condition = length(var.cluster_ICMP_traffic) == 0 ? 0 : 1 + cluster_TCP_traffic_condition = length(var.cluster_TCP_traffic) == 0 ? 0 : 1 + cluster_UDP_traffic_condition = length(var.cluster_UDP_traffic) == 0 ? 0 : 1 + cluster_SCTP_traffic_condition = length(var.cluster_SCTP_traffic) == 0 ? 0 : 1 + cluster_ESP_traffic_condition = length(var.cluster_ESP_traffic) == 0 ? 0 : 1 + mgmt_ICMP_traffic_condition = length(var.mgmt_ICMP_traffic) == 0 ? 0 : 1 + mgmt_TCP_traffic_condition = length(var.mgmt_TCP_traffic) == 0 ? 0 : 1 + mgmt_UDP_traffic_condition = length(var.mgmt_UDP_traffic) == 0 ? 0 : 1 + mgmt_SCTP_traffic_condition = length(var.mgmt_SCTP_traffic) == 0 ? 0 : 1 + mgmt_ESP_traffic_condition = length(var.mgmt_ESP_traffic) == 0 ? 0 : 1 +} \ No newline at end of file diff --git a/terraform/gcp/high-availability/main.tf b/terraform/gcp/high-availability/main.tf new file mode 100755 index 00000000..821d3542 --- /dev/null +++ b/terraform/gcp/high-availability/main.tf @@ -0,0 +1,250 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} + +module "cluster_network_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "cluster" + network_cidr = var.cluster_network_cidr + private_ip_google_access = true + region = var.region + network_name = var.cluster_network_name +} +module "cluster_ICMP_firewall_rules" { + count = local.cluster_ICMP_traffic_condition + source = "../common/firewall-rule" + + protocol = "icmp" + source_ranges = var.cluster_ICMP_traffic + rule_name = "${var.prefix}-cluster-icmp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_TCP_firewall_rules" { + count = local.cluster_TCP_traffic_condition + source = "../common/firewall-rule" + + protocol = "tcp" + source_ranges = var.cluster_TCP_traffic + rule_name = "${var.prefix}-cluster-tcp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_UDP_firewall_rules" { + count = local.cluster_UDP_traffic_condition + source = "../common/firewall-rule" + + protocol = "udp" + source_ranges = var.cluster_UDP_traffic + rule_name = "${var.prefix}-cluster-udp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_SCTP_firewall_rules" { + count = local.cluster_SCTP_traffic_condition + source = "../common/firewall-rule" + + protocol = "sctp" + source_ranges = var.cluster_SCTP_traffic + rule_name = "${var.prefix}-cluster-sctp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} +module "cluster_ESP_firewall_rules" { + count = local.cluster_ESP_traffic_condition + source = "../common/firewall-rule" + + protocol = "esp" + source_ranges = var.cluster_ESP_traffic + rule_name = "${var.prefix}-cluster-esp-${random_string.random_string.result}" + network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link +} + +module "mgmt_network_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "mgmt" + network_cidr = var.mgmt_network_cidr + private_ip_google_access = false + region = var.region + network_name = var.mgmt_network_name +} +module "mgmt_ICMP_firewall_rules" { + count = local.mgmt_ICMP_traffic_condition + source = "../common/firewall-rule" + + protocol = "icmp" + source_ranges = var.mgmt_ICMP_traffic + rule_name = "${var.prefix}-mgmt-icmp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_TCP_firewall_rules" { + count = local.mgmt_TCP_traffic_condition + source = "../common/firewall-rule" + + protocol = "tcp" + source_ranges = var.mgmt_TCP_traffic + rule_name = "${var.prefix}-mgmt-tcp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_UDP_firewall_rules" { + count = local.mgmt_UDP_traffic_condition + source = "../common/firewall-rule" + + protocol = "udp" + source_ranges = var.mgmt_UDP_traffic + rule_name = "${var.prefix}-mgmt-udp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_SCTP_firewall_rules" { + count = local.mgmt_SCTP_traffic_condition + source = "../common/firewall-rule" + + protocol = "sctp" + source_ranges = var.mgmt_SCTP_traffic + rule_name = "${var.prefix}-mgmt-sctp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} +module "mgmt_ESP_firewall_rules" { + count = local.mgmt_ESP_traffic_condition + source = "../common/firewall-rule" + + protocol = "esp" + source_ranges = var.mgmt_ESP_traffic + rule_name = "${var.prefix}-mgmt-esp-${random_string.random_string.result}" + network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link +} + +module "internal_network1_and_subnet" { + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network1" + network_cidr = var.internal_network1_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network1_name +} + +module "internal_network2_and_subnet" { + count = var.num_internal_networks < 2 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network2" + network_cidr = var.internal_network2_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network2_name +} + +module "internal_network3_and_subnet" { + count = var.num_internal_networks < 3 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network3" + network_cidr = var.internal_network3_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network3_name +} + +module "internal_network4_and_subnet" { + count = var.num_internal_networks < 4 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network4" + network_cidr = var.internal_network4_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network4_name +} + +module "internal_network5_and_subnet" { + count = var.num_internal_networks < 5 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network5" + network_cidr = var.internal_network5_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network5_name +} + +module "internal_network6_and_subnet" { + count = var.num_internal_networks < 6 ? 0 : 1 + source = "../common/network-and-subnet" + + prefix = "${var.prefix}-${random_string.random_string.result}" + type = "internal-network6" + network_cidr = var.internal_network6_cidr + private_ip_google_access = false + region = var.region + network_name = var.internal_network6_name +} +resource "google_compute_address" "primary_cluster_ip_ext_address" { + name = "${var.prefix}-primary-cluster-address-${random_string.random_string.result}" + region = var.region +} +resource "google_compute_address" "secondary_cluster_ip_ext_address" { + name = "${var.prefix}-secondary-cluster-address-${random_string.random_string.result}" + region = var.region +} +resource "random_string" "generated_password" { + length = 12 + special = false +} + +module "members_a_b" { + source = "../common/members-a-b" + + prefix = "${var.prefix}-${random_string.random_string.result}" + region = var.region + zoneA = var.zoneA + zoneB = var.zoneB + machine_type = var.machine_type + disk_size = var.disk_size + disk_type = var.disk_type + image_name = "checkpoint-public/${var.image_name}" + cluster_network = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_network_link : module.cluster_network_and_subnet.existing_network_link + cluster_network_subnetwork = local.create_cluster_network_condition ? module.cluster_network_and_subnet.new_created_subnet_link : [var.cluster_network_subnetwork_name] + mgmt_network = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_network_link : module.mgmt_network_and_subnet.existing_network_link + mgmt_network_subnetwork = local.create_mgmt_network_condition ? module.mgmt_network_and_subnet.new_created_subnet_link : [var.mgmt_network_subnetwork_name] + num_internal_networks = var.num_internal_networks + internal_network1_network = local.create_internal_network1_condition ? module.internal_network1_and_subnet.new_created_network_link : [var.internal_network1_name] + internal_network1_subnetwork = local.create_internal_network1_condition ? module.internal_network1_and_subnet.new_created_subnet_link : [var.internal_network1_subnetwork_name] + internal_network2_network = var.num_internal_networks < 2 ? [] : local.create_internal_network2_condition ? module.internal_network2_and_subnet[0].new_created_network_link : [var.internal_network2_name] + internal_network2_subnetwork = var.num_internal_networks < 2 ? [] : local.create_internal_network2_condition ? module.internal_network2_and_subnet[0].new_created_subnet_link : [var.internal_network2_subnetwork_name] + internal_network3_network = var.num_internal_networks < 3 ? [] : local.create_internal_network3_condition ? module.internal_network3_and_subnet[0].new_created_network_link : [var.internal_network3_name] + internal_network3_subnetwork = var.num_internal_networks < 3 ? [] : local.create_internal_network3_condition ? module.internal_network3_and_subnet[0].new_created_subnet_link : [var.internal_network3_subnetwork_name] + internal_network4_network = var.num_internal_networks < 4 ? [] : local.create_internal_network4_condition ? module.internal_network4_and_subnet[0].new_created_network_link : [var.internal_network4_name] + internal_network4_subnetwork = var.num_internal_networks < 4 ? [] : local.create_internal_network4_condition ? module.internal_network4_and_subnet[0].new_created_subnet_link : [var.internal_network4_subnetwork_name] + internal_network5_network = var.num_internal_networks < 5 ? [] : local.create_internal_network5_condition ? module.internal_network5_and_subnet[0].new_created_network_link : [var.internal_network5_name] + internal_network5_subnetwork = var.num_internal_networks < 5 ? [] : local.create_internal_network5_condition ? module.internal_network5_and_subnet[0].new_created_subnet_link : [var.internal_network5_subnetwork_name] + internal_network6_network = var.num_internal_networks < 6 ? [] : local.create_internal_network6_condition ? module.internal_network6_and_subnet[0].new_created_network_link : [var.internal_network6_name] + internal_network6_subnetwork = var.num_internal_networks < 6 ? [] : local.create_internal_network6_condition ? module.internal_network6_and_subnet[0].new_created_subnet_link : [var.internal_network6_subnetwork_name] + admin_SSH_key = var.admin_SSH_key + generated_admin_password = var.generate_password ? random_string.generated_password.result : "" + project = var.project + generate_password = var.generate_password + sic_key = var.sic_key + allow_upload_download = var.allow_upload_download + enable_monitoring = var.enable_monitoring + admin_shell = var.admin_shell + management_network = var.management_network + primary_cluster_address_name = google_compute_address.primary_cluster_ip_ext_address.name + secondary_cluster_address_name = google_compute_address.secondary_cluster_ip_ext_address.name + smart_1_cloud_token_a = var.smart_1_cloud_token_a + smart_1_cloud_token_b = var.smart_1_cloud_token_b +} \ No newline at end of file diff --git a/terraform/gcp/high-availability/output.tf b/terraform/gcp/high-availability/output.tf new file mode 100755 index 00000000..12009d32 --- /dev/null +++ b/terraform/gcp/high-availability/output.tf @@ -0,0 +1,117 @@ +output "cluster_new_created_network" { + value = module.cluster_network_and_subnet.new_created_network_name +} +output "cluster_new_created_subnet" { + value = module.cluster_network_and_subnet.new_created_subnet_name +} + +output "mgmt_new_created_network" { + value = module.mgmt_network_and_subnet.new_created_network_name +} +output "mgmt_new_created_subnet" { + value = module.mgmt_network_and_subnet.new_created_subnet_name +} + +output "int_network1_new_created_network" { + value = module.internal_network1_and_subnet.new_created_network_name +} +output "int_network1_new_created_subnet" { + value = module.internal_network1_and_subnet.new_created_subnet_name +} + +output "int_network2_new_created_network" { + value = module.internal_network2_and_subnet[*].new_created_network_name +} +output "int_network2_new_created_subnet" { + value = module.internal_network2_and_subnet[*].new_created_subnet_name +} + +output "int_network3_new_created_network" { + value = module.internal_network3_and_subnet[*].new_created_network_name +} +output "int_network3_new_created_subnet" { + value = module.internal_network3_and_subnet[*].new_created_subnet_name +} + +output "int_network4_new_created_network" { + value = module.internal_network4_and_subnet[*].new_created_network_name +} +output "int_network4_new_created_subnet" { + value = module.internal_network4_and_subnet[*].new_created_subnet_name +} + +output "int_network5_new_created_network" { + value = module.internal_network5_and_subnet[*].new_created_network_name +} +output "int_network5_new_created_subnet" { + value = module.internal_network5_and_subnet[*].new_created_subnet_name +} + +output "int_network6_new_created_network" { + value = module.internal_network6_and_subnet[*].new_created_network_name +} +output "int_network6_new_created_subnet" { + value = module.internal_network6_and_subnet[*].new_created_subnet_name +} + +output "cluster_ICMP_firewall_rule" { + value = module.cluster_ICMP_firewall_rules[*].firewall_rule_name +} +output "cluster_TCP_firewall_rule" { + value = module.cluster_TCP_firewall_rules[*].firewall_rule_name +} +output "cluster_UDP_firewall_rule" { + value = module.cluster_UDP_firewall_rules[*].firewall_rule_name +} +output "cluster_SCTP_firewall_rule" { + value = module.cluster_SCTP_firewall_rules[*].firewall_rule_name +} +output "cluster_ESP_firewall_rule" { + value = module.cluster_ESP_firewall_rules[*].firewall_rule_name +} + +output "mgmt_ICMP_firewall_rule" { + value = module.mgmt_ICMP_firewall_rules[*].firewall_rule_name +} +output "mgmt_TCP_firewall_rule" { + value = module.mgmt_TCP_firewall_rules[*].firewall_rule_name +} +output "mgmt_UDP_firewall_rule" { + value = module.mgmt_UDP_firewall_rules[*].firewall_rule_name +} +output "mgmt_SCTP_firewall_rule" { + value = module.mgmt_SCTP_firewall_rules[*].firewall_rule_name +} +output "mgmt_ESP_firewall_rule" { + value = module.mgmt_ESP_firewall_rules[*].firewall_rule_name +} + +output "cluster_ip_external_address" { + value = google_compute_address.primary_cluster_ip_ext_address.address +} +output "admin_password" { + value = var.generate_password ? [random_string.generated_password.result] : [] +} +output "sic_key" { + value = var.sic_key +} + +output "member_a_name" { + value = module.members_a_b.member_a_name +} +output "member_a_external_ip" { + value = module.members_a_b.member_a_external_ip +} +output "member_a_zone" { + value = var.zoneA +} + +output "member_b_name" { + value = module.members_a_b.member_b_name +} +output "member_b_external_ip" { + value = module.members_a_b.member_b_external_ip +} +output "member_b_zone" { + value = var.zoneB +} \ No newline at end of file diff --git a/terraform/gcp/high-availability/terraform.tfvars b/terraform/gcp/high-availability/terraform.tfvars new file mode 100755 index 00000000..f888479f --- /dev/null +++ b/terraform/gcp/high-availability/terraform.tfvars @@ -0,0 +1,53 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment --- +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-ha" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-cluster-335-985-v20220126" + +# --- Instances Configuration --- +region = "PLEASE ENTER REGION" # "us-central1" +zoneA = "PLEASE ENTER ZONE A" # "us-central1-a" +zoneB = "PLEASE ENTER ZONE B" # "us-central1-a" +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +enable_monitoring = "PLEASE ENTER true OR false" # false + +# --- Check Point --- +management_network = "PLEASE ENTER MANAGEMENT IP OR S1C IF USING SMART-1 CLOUD MANAGEMENT" # "209.87.209.100/32" +sic_key = "PLEASE ENTER A SIC KEY" # "aaaaaaaa" +generate_password = "PLEASE ENTER true or false" # false +allow_upload_download = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" +smart_1_cloud_token_b = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking --- +cluster_network_cidr = "PLEASE ENTER CLUSTER NETWORK CIDR" # "10.0.1.0/24" +cluster_network_name = "PLEASE ENTER CLUSTER NETWORK ID" # "cluster-network" +cluster_network_subnetwork_name = "PLEASE ENTER CLUSTER SUBNETWORK ID" # "cluster-subnetwork" +cluster_ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +cluster_TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +cluster_UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +cluster_SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +cluster_ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] +mgmt_network_cidr = "PLEASE ENTER MANAGEMENT NETWORK CIDR" # "" +mgmt_network_name = "PLEASE ENTER MANAGEMENT NETWORK ID" # "mgmt-network" +mgmt_network_subnetwork_name = "PLEASE ENTER MANAGEMENT SUBNETWORK ID" # "mgmt-subnetwork" +mgmt_ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +mgmt_TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +mgmt_UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +mgmt_SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +mgmt_ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] +num_internal_networks = "PLEASE ENTER A NUMBER OF ADDITIONAL NICS" # 1 +internal_network1_cidr = "PLEASE ENTER 1ST INTERNAL NETWORK CIDR" # "10.0.3.0/24" +internal_network1_name = "PLEASE ENTER 1ST INTERNAL NETWORK ID" # "" +internal_network1_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK ID" # "" + +#Define internal NICs networks and subnetworks according the defined num_internal_networks value diff --git a/terraform/gcp/high-availability/variables.tf b/terraform/gcp/high-availability/variables.tf new file mode 100755 index 00000000..a7bede31 --- /dev/null +++ b/terraform/gcp/high-availability/variables.tf @@ -0,0 +1,302 @@ +# Check Point CloudGuard IaaS High Availability - Terraform Template + +# --- Google Provider --- +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} + +# --- Check Point Deployment --- +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-tf-ha" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "image_name" { + type = string + description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} + +# --- Instances Configuration --- +data "google_compute_regions" "available_regions" { +} +variable "region" { + type = string + default = "us-central1" +} +variable "zoneA" { + type = string + description = "Member A Zone. The zone determines what computing resources are available and where your data is stored and used." + default = "us-central1-a" +} +variable "zoneB" { + type = string + description = "Member B Zone." + default = "us-central1-a" +} +variable "machine_type" { + type = string + description = "Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have." + default = "n1-standard-4" +} +variable "disk_type" { + type = string + description = "Storage space is much less expensive for a standard Persistent Disk. An SSD Persistent Disk is better for random IOPS or streaming throughput with low latency." + default = "SSD Persistent Disk" +} +variable "disk_size" { + type = number + description = "Disk size in GB - Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space." + default = 100 +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "enable_monitoring" { + type = bool + description = "Enable Stackdriver monitoring" + default = false +} + +# --- Check Point --- +variable "management_network" { + type = string + description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." + validation { + condition = var.management_network != "0.0.0.0/0" + error_message = "Var.management_network value cannot be the zero-address." + } +} +resource "null_resource" "validate_mgmt_network_if_required" { + count = var.smart_1_cloud_token_a == "" && var.management_network == "S1C" ? "Public address of the Security Management Server is required" : 0 +} +variable "sic_key" { + type = string + description = "The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server. At least 8 alpha numeric characters. If SIC is not provided and needed, a key will be automatically generated" +} +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password." + default = false +} +variable "allow_upload_download" { + type = bool + description = "Allow download from/upload to Check Point." + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +# --- Quick connect to Smart-1 Cloud --- +variable "smart_1_cloud_token_a" { + type = string + description ="(Optional) Smart-1 cloud token for member A to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "smart_1_cloud_token_b" { + type = string + description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} + +resource "null_resource" "validate_both_tokens" { + count = (var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_b != "") || (var.smart_1_cloud_token_a == "" && var.smart_1_cloud_token_b == "") ? 0 : "To connect to Smart-1 Cloud, you must provide two tokens (one per member)" +} +resource "null_resource" "validate_different_tokens" { + count = var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_a == var.smart_1_cloud_token_b ? "To connect to Smart-1 Cloud, you must provide two different tokens" : 0 +} +# --- Networking --- +variable "cluster_network_cidr" { + type = string + description = "Cluster external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The Cluster public IP will be translated to a private address assigned to the active member in this external network." + default = "10.0.0.0/24" +} +variable "cluster_network_name" { + type = string + description = "Cluster external network ID in the chosen zone. The network determines what network traffic the instance can access.If you have specified a CIDR block at var.cluster_network_cidr, this network name will not be used." + default = "" +} +variable "cluster_network_subnetwork_name" { + type = string + description = "Cluster subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.cluster_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "cluster_ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "cluster_TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable TCP traffic." + default = [] +} +variable "cluster_UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable UDP traffic." + default = [] +} +variable "cluster_SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "cluster_ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. Please leave empty list to unable ESP traffic." + default = [] +} +variable "mgmt_network_cidr" { + type = string + description = "Management external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The public IP used to manage each member will be translated to a private address in this external network" + default = "10.0.1.0/24" +} +variable "mgmt_network_name" { + type = string + description = "Management network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.mgmt_network_cidr, this network name will not be used. " + default = "" +} +variable "mgmt_network_subnetwork_name" { + type = string + description = "Management subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.mgmt_network_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "mgmt_ICMP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ICMP traffic." + default = [] +} +variable "mgmt_TCP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for TCP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable TCP traffic." + default = [] +} +variable "mgmt_UDP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable UDP traffic." + default = [] +} +variable "mgmt_SCTP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable SCTP traffic." + default = [] +} +variable "mgmt_ESP_traffic" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009. Please leave empty list to unable ESP traffic." + default = [] +} +variable "num_internal_networks" { + type = number + description = "A number in the range 1 - 6 of internal network interfaces." + default = 1 +} +resource "null_resource" "num_internal_networks_validation" { + // Will fail if var.num_internal_networks is less than 1 or more than 6 + count = var.num_internal_networks >= 1 && var.num_internal_networks <= 6 ? 0 : "variable num_internal_networks must be a number between 1 and 6. Multiple network interfaces deployment is described in: https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637" +} +variable "internal_network1_cidr" { + type = string + description = "1st internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "10.0.2.0/24" +} +variable "internal_network1_name" { + type = string + description = "1st internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network1_cidr, this network name will not be used. " + default = "" +} +variable "internal_network1_subnetwork_name" { + type = string + description = "1st internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network1_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network2_cidr" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network2_name" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network2_cidr, this network name will not be used. " + default = "" +} +variable "internal_network2_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 2 or and above - 2nd internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network2_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network3_cidr" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network3_name" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network3_cidr, this network name will not be used. " + default = "" +} +variable "internal_network3_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 3 or and above - 3rd internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network3_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network4_cidr" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network4_name" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network4_cidr, this network name will not be used. " + default = "" +} +variable "internal_network4_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 4 or and above - 4th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network4_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network5_cidr" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network5_name" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network5_cidr, this network name will not be used. " + default = "" +} +variable "internal_network5_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks is 5 or and above - 5th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network5_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} +variable "internal_network6_cidr" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal subnet CIDR. If the variable's value is not empty double quotes, a new subnet will be created. Assigns the cluster members an IPv4 address in this internal network." + default = "" +} +variable "internal_network6_name" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal network ID in the chosen zone. The network determines what network traffic the instance can access. If you have specified a CIDR block at var.internal_network6_cidr, this network name will not be used. " + default = "" +} +variable "internal_network6_subnetwork_name" { + type = string + description = "Used only if var.num_internal_networks equals 6 - 6th internal subnet ID in the chosen network. Assigns the instance an IPv4 address from the subnetwork’s range. If you have specified a CIDR block at var.internal_network6_cidr, this subnetwork will not be used. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = "" +} \ No newline at end of file diff --git a/terraform/gcp/single-into-existing-vpc/README.md b/terraform/gcp/single-into-existing-vpc/README.md new file mode 100755 index 00000000..a3213acb --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/README.md @@ -0,0 +1,275 @@ +# Check Point single gateway and management Terraform module for GCP + +Terraform module which deploys a single gateway and management of Check Point Security Gateways. + +These types of Terraform resources are supported: + [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) + [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) + [Compute instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) + + +See Check Point's documentation for Single [here](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk114577) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The main.tf file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.get + compute.addresses.use + compute.addresses.create + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.images.getFromFamily + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.addAccessConfig + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setTags + compute.instances.setLabels + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + iam.serviceAccounts.set + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/single/terraform.tfvars file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/single/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in single/terraform.tfvars file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +image_name = "check-point-r8110-gw-byol-single-335-985-v20220126" +installationType = "Gateway only" +license = "BYOL" +prefix = "chkp-single-tf-" +management_nic = "Ephemeral Public IP (eth0)" +admin_shell = "/etc/cli.sh" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = false +allow_upload_download = true +sicKey = "" +managementGUIClientNetwork = "0.0.0.0/0" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +zone = "us-central1-a +network = ["default"] +subnetwork = ["default"] +network_enableTcp= true +network_tcpSourceRanges= ["0.0.0.0/0"] +network_enableGwNetwork= false +network_gwNetworkSourceRanges= [""] +network_enableIcmp= false +network_icmpSourceRanges = [""] +network_enableUdp= false +network_udpSourceRanges= [""] +network_enableSctp= false +network_sctpSourceRanges= [""] +network_enableEsp= false +network_espSourceRanges= [""] +numAdditionalNICs= 1 +externalIP= "static" +internal_network1_network= [""] +internal_network1_subnetwork = [""] + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +diskType = "SSD Persistent Disk" +bootDiskSizeGb = 100 +enableMonitoring = false + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = ["0.0.0.0/0"] +SCTP_traffic = ["0.0.0.0/0"] +ESP_traffic = ["0.0.0.0/0"] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values |Default| Required | +| ------------- | ------------- | ------------- | ------------- |-------|---------------| +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| | | | | | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| zone | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) |us-central1-a|yes| +| | | | | | +| image_name |The single gateway or management image name (e.g. check-point-r8110-gw-byol-single-335-985-v20220126 for gateway or check-point-r8110-byol-335-883-v20210706 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| | | | | | +| installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| +| | | | | | +| license | Checkpoint license (BYOL or PAYG).|string|BYOL;
PAYG;|BYOL|yes| +| | | | | | +| prefix | (Optional) Resources name prefix|string|N\A|chkp-single-tf-|no| +| | | | | | +| machineType | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | n1-standard-4|no| +| | | | | | +| network | The network determines what network traffic the instance can access | list(string) | Available network in the chosen zone |N/A|yes| +| | | | | | +| Subnetwork | Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network. | list(string) | Available subnetwork in the chosen network |N/A|yes| +| | | | | | +| network_enableTcp | Allow TCP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_tcpSourceRanges | Allow TCP traffic from the Internet | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableGwNetwork | This is relevant for Management only. The network in which managed gateways reside | boolean | true;
false; |false|no| +| | | | | | +| network_gwNetworkSourceRanges | Allow TCP traffic from the Internet | list(string) | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) |N/A|no| +| | | | | | +| network_enableIcmp | Allow ICMP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_icmpSourceRanges | Source IP ranges for ICMP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableUdp | Allow UDP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_udpSourceRanges | Source IP ranges for UDP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableSctp | Allow SCTP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_sctpSourceRanges | Source IP ranges for SCTP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableEsp | Allow ESP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_espSourceRanges | Source IP ranges for ESP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| diskType | Disk type | string | SSD Persistent Disk;
standard-Persistent Disk;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)|SSD Persistent Disk|no| +| | | | | | +| bootDiskSizeGb | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)|100|no| +| | | | | | +| generatePassword | Automatically generate an administrator password | boolean | true;
false; |false|no| +| | | | | | +| allowUploadDownload | Allow download from/upload to Check Point | boolean | true;
false; |false|no| +| | | | | | +| enableMonitoring | Enable Stackdriver monitoring | boolean | true;
false; |false|no| +| | | | | | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
|/etc/cli.sh|no| +| | | | | | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| | | | | | +| sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| +| | | | | | +| managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| +| | | | | | +| smart_1_cloud_token | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| numAdditionalNICs | Number of additional network interfaces | number | A number in the range 0 - 8.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) |0|no| +| | | | | | +| externalIP | External IP address type | string | Static;
Ephemeral;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) |static|no| +| | | | | | +| management_nic | Management Interface - Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) |XEphemeral Public IP (eth0)|no| +| | | | | | + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +| ---------------- | ------------- | +| 20230209 | Added Smart-1 Cloud support. | +| | | | +| 20230109 | Updated startup script to use cloud-config. | +| | | | +| 20201208 | First release of Check Point Check Point CloudGuard IaaS High Availability Terraform solution on GCP. | +| | | | +| | Addition of "template_type" parameter to "cloud-version" files. | +| | | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/terraform/gcp/single-into-existing-vpc/locals.tf b/terraform/gcp/single-into-existing-vpc/locals.tf new file mode 100755 index 00000000..39527714 --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/locals.tf @@ -0,0 +1,55 @@ +locals { + license_allowed_values = [ + "BYOL", + "PAYG"] + // will fail if [var.license] is invalid: + validate_license = index(local.license_allowed_values, upper(var.license)) + + installation_type_allowed_values = [ + "Gateway only", + "Management only", + "Standalone", + "Manual Configuration" + ] + // 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 alphanumeric 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 + validate_image_name = var.installationType != "Gateway only" && length(regexall(local.regex_validate_mgmt_image_name, var.image_name)) > 0 ? 0 : (var.installationType == "Gateway only" && length(regexall(local.regex_validate_single_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME")) + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" + // Will fail if var.admin_SSH_key is invalid + regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" + admin_shell_allowed_values = [ + "/etc/cli.sh", + "/bin/bash", + "/bin/csh", + "/bin/tcsh"] + // Will fail if var.admin_shell is invalid + validate_admin_shell = index(local.admin_shell_allowed_values, var.admin_shell) + disk_type_allowed_values = [ + "SSD Persistent Disk", + "Balanced Persistent Disk", + "Standard Persistent Disk"] + // Will fail if var.disk_type is invalid + validate_disk_type = index(local.disk_type_allowed_values, var.diskType) + adminPasswordSourceMetadata = var.generatePassword ?random_string.generated_password.result : "" + disk_type_condition = var.diskType == "SSD Persistent Disk" ? "pd-ssd" : var.diskType == "Balanced Persistent Disk" ? "pd-balanced" : var.diskType == "Standard Persistent Disk" ? "pd-standard" : "" + admin_SSH_key_condition = var.admin_SSH_key != "" ? true : false + ICMP_traffic_condition = length(var.network_icmpSourceRanges ) == 0 ? 0 : 1 + TCP_traffic_condition = length(var.network_tcpSourceRanges) == 0 ? 0 : 1 + UDP_traffic_condition = length(var.network_udpSourceRanges ) == 0 ? 0 : 1 + SCTP_traffic_condition = length(var.network_sctpSourceRanges) == 0 ? 0 : 1 + ESP_traffic_condition = length(var.network_espSourceRanges) == 0 ? 0 : 1 + // Will fail if management_only and payg + is_management_only = var.installationType == "Management only" + is_license_payg = var.license == "PAYG" + validation_message = "Cannot use 'Management only' installation type with 'PAYG' license." + _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_message : "") + +} diff --git a/terraform/gcp/single-into-existing-vpc/main.tf b/terraform/gcp/single-into-existing-vpc/main.tf new file mode 100755 index 00000000..aeab8b93 --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/main.tf @@ -0,0 +1,218 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + zone = var.zone +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} +data "google_compute_network" "external_network" { + name = var.network[0] +} +resource "random_string" "random_sic_key" { + length = 12 + special = false +} + +resource "google_compute_firewall" "ICMP_firewall_rules" { + count = local.ICMP_traffic_condition + name = "${var.prefix}-icmp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "icmp" + } + source_ranges = var.network_icmpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "TCP_firewall_rules" { + count = local.TCP_traffic_condition + name = "${var.prefix}-tcp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "tcp" + } + source_ranges = var.network_tcpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "UDP_firewall_rules" { + count = local.UDP_traffic_condition + name = "${var.prefix}-udp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "udp" + } + source_ranges = var.network_udpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "random_string" "generated_password" { + length = 12 + special = false +} +resource "google_compute_firewall" "SCTP_firewall_rules" { + count = local.SCTP_traffic_condition + name = "${var.prefix}-sctp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "sctp" + } + source_ranges = var.network_sctpSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} +resource "google_compute_firewall" "ESP_firewall_rules" { + count = local.ESP_traffic_condition + name = "${var.prefix}-esp-${random_string.random_string.result}" + network = data.google_compute_network.external_network.self_link + allow { + protocol = "esp" + } + source_ranges = var.network_espSourceRanges + target_tags = [ + "checkpoint-${replace(replace(lower(var.installationType)," ","-"),"(standalone)","standalone")}"] +} + +resource "google_compute_instance" "gateway" { + name = "${var.prefix}-${random_string.random_string.result}" + description = "Check Point Security ${replace(var.installationType,"(Standalone)","--")==var.installationType?split(" ",var.installationType)[0]:" Gateway and Management"}" + zone = var.zone + labels = {goog-dm = "${var.prefix}-${random_string.random_string.result}"} + tags =replace(var.installationType,"(Standalone)","--")==var.installationType?[ + "checkpoint-${split(" ",lower(var.installationType))[0]}","${var.prefix}${random_string.random_string.result}" + ]:["checkpoint-gateway","checkpoint-management","${var.prefix}${random_string.random_string.result}"] + machine_type = var.machine_type + can_ip_forward = var.installationType == "Management only"? false:true + boot_disk { + auto_delete = true + device_name = "chkp-single-boot-${random_string.random_string.result}" + initialize_params { + size = var.bootDiskSizeGb + type = local.disk_type_condition + image = "checkpoint-public/${var.image_name}" + } + } + network_interface { + network = var.network[0] + subnetwork = var.subnetwork[0] + dynamic "access_config" { + for_each = var.externalIP == "None"? []:[1] + content { + nat_ip = var.externalIP=="static" ? google_compute_address.static.address : null + } + } + + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 1 ? [ + 1] : [] + content { + network = var.internal_network1_network[0] + subnetwork = var.internal_network1_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 2 ? [ + 1] : [] + content { + network = var.internal_network2_network[0] + subnetwork = var.internal_network2_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 3 ? [ + 1] : [] + content { + network = var.internal_network3_network[0] + subnetwork = var.internal_network3_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 4 ? [ + 1] : [] + content { + network = var.internal_network4_network[0] + subnetwork = var.internal_network4_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs >= 5 ? [ + 1] : [] + content { + network = var.internal_network5_network[0] + subnetwork = var.internal_network5_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 6 ? [ + 1] : [] + content { + network = var.internal_network6_network[0] + subnetwork = var.internal_network6_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 7 ? [ + 1] : [] + content { + network = var.internal_network7_network[0] + subnetwork = var.internal_network7_subnetwork[0] + } + } + dynamic "network_interface" { + for_each = var.numAdditionalNICs == 8 ? [ + 1] : [] + content { + network = var.internal_network8_network[0] + subnetwork = var.internal_network8_subnetwork[0] + } + } + + service_account { + scopes = [ + "https://www.googleapis.com/auth/cloudruntimeconfig", + "https://www.googleapis.com/auth/monitoring.write"] + } + + metadata = local.admin_SSH_key_condition ? { + instanceSSHKey = var.admin_SSH_key + adminPasswordSourceMetadata = var.generatePassword ?random_string.generated_password.result : "" + } : {adminPasswordSourceMetadata = var.generatePassword?random_string.generated_password.result : ""} + + metadata_startup_script = templatefile("${path.module}/../common/startup-script.sh", { + // script's arguments + generatePassword = var.generatePassword + config_url = "https://runtimeconfig.googleapis.com/v1beta1/projects/${var.project}/configs/-config" + config_path = "projects/${var.project}/configs/-config" + sicKey = "" + allowUploadDownload = var.allowUploadDownload + templateName = "single_tf" + templateVersion = "20230109" + templateType = "terraform" + hasInternet = "true" + enableMonitoring = var.enableMonitoring + shell = var.admin_shell + installationType = var.installationType + computed_sic_key = var.sicKey + managementGUIClientNetwork = var.managementGUIClientNetwork + installSecurityManagement = true + primary_cluster_address_name = "" + secondary_cluster_address_name = "" + subnet_router_meta_path = "" + mgmtNIC = var.management_nic + managementNetwork = "" + numAdditionalNICs = "" + smart_1_cloud_token = var.smart_1_cloud_token + name = "" + zoneConfig = "" + region = "" + }) +} +resource "google_compute_address" "static" { + name = "ipv4-address-${random_string.random_string.result}" +} \ No newline at end of file diff --git a/terraform/gcp/single-into-existing-vpc/output.tf b/terraform/gcp/single-into-existing-vpc/output.tf new file mode 100755 index 00000000..0f0882d0 --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/output.tf @@ -0,0 +1,18 @@ +output "SIC_key" { + value = random_string.random_sic_key.result +} +output "ICMP_firewall_rules_name" { + value = google_compute_firewall.ICMP_firewall_rules[*].name +} +output "TCP_firewall_rules_name" { + value = google_compute_firewall.TCP_firewall_rules[*].name +} +output "UDP_firewall_rules_name" { + value = google_compute_firewall.UDP_firewall_rules[*].name +} +output "SCTP_firewall_rules_name" { + value = google_compute_firewall.SCTP_firewall_rules[*].name +} +output "ESP_firewall_rules_name" { + value = google_compute_firewall.ESP_firewall_rules[*].name +} \ No newline at end of file diff --git a/terraform/gcp/single-into-existing-vpc/terraform.tfvars b/terraform/gcp/single-into-existing-vpc/terraform.tfvars new file mode 100755 index 00000000..8ac21504 --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/terraform.tfvars @@ -0,0 +1,46 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE_ACCOUNT_PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment--- +image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8110-gw-byol-single-335-985-v20220126" +installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" +license = "PLEASE ENTER LICENSE" # "BYOL" +prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" +management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" +admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" +admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false +allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false +sicKey = "PLEASE ENTER SIC KEY" # "" +managementGUIClientNetwork = "PLEASE ENTER MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking--- +zone = "PLEASE ENTER ZONE" # "us-central1-a" +network = "PLEASE ENTER NETWORK" # ["default"] +subnetwork = "PLEASE ENTER SUBNETWORK" # ["default"] +network_enableTcp = "PLEASE ENTER NETWORK ENABLE TCP" # false +network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [""] +network_enableGwNetwork = "PLEASE ENTER NETWORK ENABLE GW NETWORK" # false +network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [""] +network_enableIcmp = "PLEASE ENTER NETWORK ENABLE ICMP" # false +network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [""] +network_enableUdp = "PLEASE ENTER NETWORK ENABLE UDP" # false +network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [""] +network_enableSctp = "PLEASE ENTER NETWORK ENABLE SCTP" # false +network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [""] +network_enableEsp = "PLEASE ENTER NETWORK ENABLE ESP" # false +network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [""] +numAdditionalNICs = "PLEASE ENTER NUM ADDITIONAL NICS" # 1 +externalIP = "PLEASE ENTER EXTERNAL IP" # "static" +internal_network1_network = "PLEASE ENTER INTERNAL_NETWORK1_NETWORK" # [""] +internal_network1_subnetwork = "PLEASE ENTER INTERNAL_NETWORK1_SUBNETWORK" # [""] + +# --- Instances configuration--- +machine_type = "PLEASE ENTER MACHINE_TYPE" # "n1-standard-4" +diskType = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +bootDiskSizeGb = "PLEASE ENTER BOOT DISK SIZE GB" # 100 +enableMonitoring = "PLEASE ENTER ENABLE MONITORING" # false diff --git a/terraform/gcp/single-into-existing-vpc/variables.tf b/terraform/gcp/single-into-existing-vpc/variables.tf new file mode 100755 index 00000000..cc620851 --- /dev/null +++ b/terraform/gcp/single-into-existing-vpc/variables.tf @@ -0,0 +1,254 @@ +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "zone" { + type = string + description = "The zone determines what computing resources are available and where your data is stored and used" + default = "us-central1-a" +} +variable "image_name" { + type = string + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" +} +variable "installationType" { + type = string + description = "Installation type and version" + default = "Gateway only" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-single-tf-" +} +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "network" { + type = list(string) + description = "The network determines what network traffic the instance can access" + default = ["default"] +} +variable "subnetwork" { + type = list(string) + description = "Assigns the instance an IPv4 address from the subnetwork’s range. Instances in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network." + default = ["default"] +} +variable "network_enableTcp" { + type = bool + description = "Allow TCP traffic from the Internet" + default = false +} +variable "network_tcpSourceRanges" { + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableGwNetwork" { + type = bool + description = "This is relevant for Management only. The network in which managed gateways reside" + default = false +} +variable network_gwNetworkSourceRanges{ + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableIcmp" { + type = bool + description ="Allow ICMP traffic from the Internet" + default = false +} +variable "network_icmpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable network_enableUdp{ + type = bool + description ="Allow UDP traffic from the Internet" + default = false +} +variable "network_udpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "network_enableSctp" { + type = bool + description ="Allow SCTP traffic from the Internet" + default = false +} +variable "network_sctpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} + +variable "network_enableEsp" { + type = bool + description ="Allow ESP traffic from the Internet " + default = false +} +variable "network_espSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} +variable "diskType" { + type = string + description ="Disk type" + default = "SSD Persistent Disk" +} +variable "bootDiskSizeGb" { + type = number + description ="Disk size in GB" + default = 100 +} +variable "generatePassword" { + type = bool + description ="Automatically generate an administrator password " + default = false +} +variable "management_nic" { + type = string + description = "Management Interface - Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "allowUploadDownload" { + type = string + description ="Allow download from/upload to Check Point" + default = true +} +variable "enableMonitoring" { + type = bool + description ="Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "sicKey" { + type = string + description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" + default = "" +} +variable "managementGUIClientNetwork" { + type = string + description ="Allowed GUI clients " + default = "0.0.0.0/0" +} +variable "smart_1_cloud_token" { + type = string + description ="(Optional) Smart-1 cloud token to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "numAdditionalNICs" { + type = number + description ="Number of additional network interfaces" + default = 0 +} +variable "externalIP" { + type = string + description = "External IP address type" + default = "static" +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network7_network" { + type = list(string) + description = "7th internal network ID in the chosen zone." + default = [] +} +variable "internal_network7_subnetwork" { + type = list(string) + description = "7th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network8_network" { + type = list(string) + description = "8th internal network ID in the chosen zone." + default = [] +} +variable "internal_network8_subnetwork" { + type = list(string) + description = "8th internal subnet ID in the chosen network." + default = [] +} diff --git a/terraform/gcp/single-into-new-vpc/README.md b/terraform/gcp/single-into-new-vpc/README.md new file mode 100644 index 00000000..857b7c75 --- /dev/null +++ b/terraform/gcp/single-into-new-vpc/README.md @@ -0,0 +1,270 @@ +# Check Point single gateway and management Terraform module for GCP + +Terraform module which deploys a single gateway and management of Check Point Security Gateways. + +These types of Terraform resources are supported: + [Instance Template](https://www.terraform.io/docs/providers/google/r/compute_instance_template.html) + [Firewall](https://www.terraform.io/docs/providers/google/r/compute_firewall.html) - conditional creation + [Instance Group Manager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) + [Compute instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) + + +See Check Point's documentation for Single [here](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk114577) + +Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. + +## Before you begin +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) and set up billing on that project. +2. [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) and read the Terraform getting started guide that follows. This guide will assume basic proficiency with Terraform - it is an introduction to the Google provider. + +## Configuring the Provider +The main.tf file includes the following provider configuration block used to configure the credentials you use to authenticate with GCP, as well as a default project and location for your resources: +``` +provider "google" { + credentials = file(var.service_account_path) + project = var.project +} +... +``` + +1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
+2. Select "Editor" Role or verify you have the following permissions: + ``` + compute.addresses.get + compute.addresses.use + compute.addresses.create + compute.disks.create + compute.disks.delete + compute.firewalls.create + compute.firewalls.delete + compute.firewalls.get + compute.images.get + compute.images.useReadOnly + compute.images.getFromFamily + compute.instanceTemplates.create + compute.instanceTemplates.delete + compute.instanceTemplates.get + compute.instanceTemplates.useReadOnly + compute.instances.addAccessConfig + compute.instances.create + compute.instances.delete + compute.instances.get + compute.instances.setMetadata + compute.instances.setTags + compute.instances.setLabels + compute.networks.get + compute.networks.updatePolicy + compute.regions.list + compute.subnetworks.get + compute.subnetworks.use + compute.subnetworks.useExternalIp + compute.zones.get + iam.serviceAccountKeys.get + iam.serviceAccountKeys.list + iam.serviceAccounts.actAs + iam.serviceAccounts.get + iam.serviceAccounts.list + iam.serviceAccounts.set + ``` +3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
+The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). + - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/single/terraform.tfvars file as follows: + ``` + service_account_path = "service-accounts/service-account-file-name.json" + project = "project-id" + ``` + - In case the Environment Variables are used, perform modifications described below:
+ a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: + ``` + provider "google" { + // credentials = file(var.service_account_path) + // project = var.project + + } + ``` + b.In the terraform.tfvars file leave empty double quotes for credentials and project variables: + ``` + service_account_path = "" + project = "" + ``` +## Usage +- Fill all variables in the /gcp/single/terraform.tfvars file with proper values (see below for variables descriptions). +- From a command line initialize the Terraform configuration directory: + ``` + terraform init + ``` +- Create an execution plan: + ``` + terraform plan + ``` +- Create or modify the deployment: + ``` + terraform apply + ``` + +#### Variables are configured in single/terraform.tfvars file as follows: +``` +# --- Google Provider --- +service_account_path = "service-accounts/service-account-file-name.json" +project = "project-id" + +# --- Check Point--- +image_name = "check-point-r8120-gw-byol-single-631-991001335-v20230622" +installationType = "Gateway only" +license = "BYOL" +prefix = "chkp-single-tf-" +management_nic = "Ephemeral Public IP (eth0)" +admin_shell = "/etc/cli.sh" +admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = false +allow_upload_download = true +sicKey = "" +managementGUIClientNetwork = "0.0.0.0/0" + +#--- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "xxxxxxxxxxxxxxxxxxxxxxxx" + +# --- Networking --- +region = "us-central1" +zone = "us-central1-a" +subnetwork_cidr = "10.0.0.0/24" +network_enableTcp= true +network_tcpSourceRanges= ["0.0.0.0/0"] +network_enableGwNetwork= false +network_gwNetworkSourceRanges= [] +network_enableIcmp= false +network_icmpSourceRanges = [] +network_enableUdp= false +network_udpSourceRanges= [] +network_enableSctp= false +network_sctpSourceRanges= [] +network_enableEsp= false +network_espSourceRanges= [] +numAdditionalNICs= 1 +externalIP= "static" +internal_subnetwork_cidr = "10.0.1.0/24" + +# --- Instance Configuration --- +machine_type = "n1-standard-4" +diskType = "SSD Persistent Disk" +bootDiskSizeGb = 100 +enableMonitoring = false + +``` + +- To tear down your resources: + ``` + terraform destroy + ``` + +## Conditional creation +To create Firewall and allow traffic for ICMP, TCP, UDP, SCTP or/and ESP - enter list of Source IP ranges. +``` +ICMP_traffic = ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = ["0.0.0.0/0"] +UDP_traffic = ["0.0.0.0/0"] +SCTP_traffic = ["0.0.0.0/0"] +ESP_traffic = ["0.0.0.0/0"] +``` +Please leave empty list for a protocol if you want to disable traffic for it. + +## Inputs +| Name | Description | Type | Allowed values |Default| Required | +| ------------- | ------------- | ------------- | ------------- |-------|---------------| +| service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | +| | | | | | +| project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | +| | | | | | +| region | GCP region | string | N/A | N/A | yes | +| | | | | | +| zone | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) |us-central1-a|yes| +| | | | | | +| image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| | | | | | +| installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| +| | | | | | +| license | Checkpoint license (BYOL or PAYG).|string|BYOL;
PAYG;|BYOL|yes| +| | | | | | +| prefix | (Optional) Resources name prefix|string|N\A|chkp-single-tf-|no| +| | | | | | +| machineType | Machine types determine the specifications of your machines, such as the amount of memory, virtual cores, and persistent disk limits an instance will have | string | [Learn more about Machine Types](https://cloud.google.com/compute/docs/machine-types?hl=en_US&_ga=2.267871494.-962483654.1585043745) | n1-standard-4|no| +| | | | | | +| subnetwork_cidr | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| | | | | | +| network_enableTcp | Allow TCP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_tcpSourceRanges | Allow TCP traffic from the Internet | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway all ports are allowed. For management allowed ports are: 257,18191,18210,18264,22,443,18190,19009 [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableGwNetwork | This is relevant for Management only. The network in which managed gateways reside | boolean | true;
false; |false|no| +| | | | | | +| network_gwNetworkSourceRanges | Allow TCP traffic from the Internet | list(string) | Enter a valid IPv4 network CIDR (e.g. 0.0.0.0/0) |N/A|no| +| | | | | | +| network_enableIcmp | Allow ICMP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_icmpSourceRanges | Source IP ranges for ICMP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableUdp | Allow UDP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_udpSourceRanges | Source IP ranges for UDP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableSctp | Allow SCTP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_sctpSourceRanges | Source IP ranges for SCTP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only - all ports are allowed. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| network_enableEsp | Allow ESP traffic from the Internet | boolean | true;
false; |false|no| +| | | | | | +| network_espSourceRanges | Source IP ranges for ESP traffic | list(string) | Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. For gateway only. [Learn more](https://cloud.google.com/vpc/docs/vpc?_ga=2.36703144.-962483654.1585043745#firewalls) |N/A|no| +| | | | | | +| diskType | Disk type | string | SSD Persistent Disk;
standard-Persistent Disk;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)|SSD Persistent Disk|no| +| | | | | | +| bootDiskSizeGb | Disk size in GB | number | Persistent disk performance is tied to the size of the persistent disk volume. You are charged for the actual amount of provisioned disk space. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.232680471.-962483654.1585043745#pdperformance)|100|no| +| | | | | | +| generatePassword | Automatically generate an administrator password | boolean | true;
false; |false|no| +| | | | | | +| allowUploadDownload | Allow download from/upload to Check Point | boolean | true;
false; |false|no| +| | | | | | +| enableMonitoring | Enable Stackdriver monitoring | boolean | true;
false; |false|no| +| | | | | | +| admin_shell | Change the admin shell to enable advanced command line configuration. | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh;
|/etc/cli.sh|no| +| | | | | | +| admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| | | | | | +| sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| +| | | | | | +| managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| +| | | | | | +| smart_1_cloud_token | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| +| | | | | | +| numAdditionalNICs | Number of additional network interfaces | number | A number in the range 0 - 8.
Multiple network interfaces deployment is described in [sk121637 - Deploy a CloudGuard for GCP with Multiple Network Interfaces](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk121637) |0|no| +| | | | | | +| externalIP | External IP address type | string | Static;
Ephemeral;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) |static|no| +| | | | | | +| internal_subnetwork_cidr | The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. "10.0.0.0/8" or "192.168.0.0/16"). | string | N/A | N/A | yes | +| | | | | | +| management_nic | Management Interface - Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) |XEphemeral Public IP (eth0)|no| +| | | | | | + +## Outputs +| Name | Description | +| ------------- | ------------- | +| SIC_key | Secure Internal Communication (SIC) initiation key. | +| ICMP_firewall_rules_name | If enable - the ICMP firewall rules name, otherwise, an empty list. | +| TCP_firewall_rules_name | If enable - the TCP firewall rules name, otherwise, an empty list. | +| UDP_firewall_rules_name | If enable - the UDP firewall rules name, otherwise, an empty list. | +| SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | +| ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + +## Revision History +In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + +| Template Version | Description | +|------------------|-------------------------------------| +| 20230921 | Added single-into-new-vpc template. | +| | | + +## Authors + + +## License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details diff --git a/terraform/gcp/single-into-new-vpc/main.tf b/terraform/gcp/single-into-new-vpc/main.tf new file mode 100644 index 00000000..1597ae33 --- /dev/null +++ b/terraform/gcp/single-into-new-vpc/main.tf @@ -0,0 +1,90 @@ +provider "google" { + credentials = file(var.service_account_path) + project = var.project + region = var.region +} + +resource "random_string" "random_string" { + length = 5 + special = false + upper = false + keepers = {} +} + +resource "google_compute_network" "network" { + name = "${var.prefix}-network-${random_string.random_string.result}" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "subnetwork" { + name = "${var.prefix}-subnetwork-${random_string.random_string.result}" + ip_cidr_range = var.subnetwork_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.network.id +} + +resource "google_compute_network" "internal_network" { + name = "${var.prefix}-internal-network-${random_string.random_string.result}" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "internal_subnetwork" { + name = "${var.prefix}-internal-subnetwork-${random_string.random_string.result}" + ip_cidr_range = var.internal_subnetwork_cidr + private_ip_google_access = true + region = var.region + network = google_compute_network.internal_network.id +} + + +module "single-into-existing-vpc" { + source = "../single-into-existing-vpc" + + service_account_path = var.service_account_path + project = var.project + + + # --- Check Point Deployment--- + image_name = var.image_name + installationType = var.installationType + license = var.license + prefix = var.prefix + management_nic = var.management_nic + admin_shell = var.admin_shell + admin_SSH_key = var.admin_SSH_key + generatePassword = var.generatePassword + allowUploadDownload = var.allowUploadDownload + sicKey = var.sicKey + managementGUIClientNetwork = var.managementGUIClientNetwork + + # --- Quick connect to Smart-1 Cloud --- + smart_1_cloud_token = var.smart_1_cloud_token + + # --- Networking --- + zone = var.zone + network = [google_compute_network.network.name] + subnetwork = [google_compute_subnetwork.subnetwork.name] + network_enableTcp = var.network_enableTcp + network_tcpSourceRanges = var.network_tcpSourceRanges + network_enableGwNetwork = var.network_enableGwNetwork + network_gwNetworkSourceRanges = var.network_gwNetworkSourceRanges + network_enableIcmp = var.network_enableIcmp + network_icmpSourceRanges = var.network_icmpSourceRanges + network_enableUdp = var.network_enableUdp + network_udpSourceRanges = var.network_udpSourceRanges + network_enableSctp = var.network_enableSctp + network_sctpSourceRanges = var.network_sctpSourceRanges + network_enableEsp = var.network_enableEsp + network_espSourceRanges = var.network_espSourceRanges + numAdditionalNICs = var.numAdditionalNICs + externalIP = var.externalIP + internal_network1_network = [google_compute_network.internal_network.name] + internal_network1_subnetwork = [google_compute_subnetwork.internal_subnetwork.name] + + # --- Instances configuration--- + machine_type = var.machine_type + diskType = var.diskType + bootDiskSizeGb = var.bootDiskSizeGb + enableMonitoring = var.enableMonitoring +} \ No newline at end of file diff --git a/terraform/gcp/single-into-new-vpc/output.tf b/terraform/gcp/single-into-new-vpc/output.tf new file mode 100644 index 00000000..f1ba99cf --- /dev/null +++ b/terraform/gcp/single-into-new-vpc/output.tf @@ -0,0 +1,30 @@ +output "network" { + value = google_compute_network.network.name +} +output "subnetwork" { + value = google_compute_subnetwork.subnetwork.name +} +output "internal_network" { + value = google_compute_network.internal_network.name +} +output "internal_subnetwork" { + value = google_compute_subnetwork.internal_subnetwork.name +} +output "SIC_key" { + value = module.single-into-existing-vpc.SIC_key +} +output "ICMP_firewall_rules_name" { + value = module.single-into-existing-vpc.ICMP_firewall_rules_name +} +output "TCP_firewall_rules_name" { + value = module.single-into-existing-vpc.TCP_firewall_rules_name +} +output "UDP_firewall_rules_name" { + value = module.single-into-existing-vpc.UDP_firewall_rules_name +} +output "SCTP_firewall_rules_name" { + value = module.single-into-existing-vpc.SCTP_firewall_rules_name +} +output "ESP_firewall_rules_name" { + value = module.single-into-existing-vpc.ESP_firewall_rules_name +} diff --git a/terraform/gcp/single-into-new-vpc/terraform.tfvars b/terraform/gcp/single-into-new-vpc/terraform.tfvars new file mode 100644 index 00000000..b387fa3d --- /dev/null +++ b/terraform/gcp/single-into-new-vpc/terraform.tfvars @@ -0,0 +1,45 @@ +# --- Google Provider --- +service_account_path = "PLEASE ENTER SERVICE_ACCOUNT_PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" + +# --- Check Point Deployment--- +image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8120-gw-byol-single-631-991001335-v20230622" +installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" +license = "PLEASE ENTER LICENSE" # "BYOL" +prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" +management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" +admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" +admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false +allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false +sicKey = "PLEASE ENTER SIC KEY" # "" +managementGUIClientNetwork = "PLEASE ENTER MANAGEMENT GUI CLIENT NETWORK" # "0.0.0.0/0" + +# --- Quick connect to Smart-1 Cloud --- +smart_1_cloud_token = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" + +# --- Networking--- +region = "PLEASE ENTER REGION" # "us-central1" +zone = "PLEASE ENTER ZONE" # "us-central1-a" +subnetwork_cidr = "PLEASE ENTER SUBNETWORK CIDR" # "10.0.1.0/24" +network_enableTcp = "PLEASE ENTER NETWORK ENABLE TCP" # false +network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [] +network_enableGwNetwork = "PLEASE ENTER NETWORK ENABLE GW NETWORK" # false +network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [] +network_enableIcmp = "PLEASE ENTER NETWORK ENABLE ICMP" # false +network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [] +network_enableUdp = "PLEASE ENTER NETWORK ENABLE UDP" # false +network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [] +network_enableSctp = "PLEASE ENTER NETWORK ENABLE SCTP" # false +network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [] +network_enableEsp = "PLEASE ENTER NETWORK ENABLE ESP" # false +network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [] +numAdditionalNICs = "PLEASE ENTER NUM ADDITIONAL NICS" # 1 +externalIP = "PLEASE ENTER EXTERNAL IP" # "static" +internal_subnetwork_cidr = "PLEASE ENTER INTERNAL SUBNETWORK CIDR" # "10.0.2.0/24" + +# --- Instances configuration--- +machine_type = "PLEASE ENTER MACHINE_TYPE" # "n1-standard-4" +diskType = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +bootDiskSizeGb = "PLEASE ENTER BOOT DISK SIZE GB" # 100 +enableMonitoring = "PLEASE ENTER ENABLE MONITORING" # false \ No newline at end of file diff --git a/terraform/gcp/single-into-new-vpc/variables.tf b/terraform/gcp/single-into-new-vpc/variables.tf new file mode 100644 index 00000000..3d6454cf --- /dev/null +++ b/terraform/gcp/single-into-new-vpc/variables.tf @@ -0,0 +1,256 @@ +variable "service_account_path" { + type = string + description = "User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored." + default = "" +} +variable "project" { + type = string + description = "Personal project id. The project indicates the default GCP project all of your resources will be created in." + default = "" +} +variable "region" { + type = string + default = "us-central1" +} +variable "zone" { + type = string + description = "The zone determines what computing resources are available and where your data is stored and used" + default = "us-central1-a" +} +variable "image_name" { + type = string + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" +} +variable "installationType" { + type = string + description = "Installation type and version" + default = "Gateway only" +} +variable "license" { + type = string + description = "Checkpoint license (BYOL or PAYG)." + default = "BYOL" +} +variable "prefix" { + type = string + description = "(Optional) Resources name prefix" + default = "chkp-single-tf-" +} +variable "machine_type" { + type = string + default = "n1-standard-4" +} +variable "subnetwork_cidr" { + type = string + description = "The range of external addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "internal_subnetwork_cidr" { + type = string + description = "The range of internal addresses that are owned by this subnetwork, only IPv4 is supported (e.g. \"10.0.0.0/8\" or \"192.168.0.0/16\")." +} +variable "network_enableTcp" { + type = bool + description = "Allow TCP traffic from the Internet" + default = false +} +variable "network_tcpSourceRanges" { + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableGwNetwork" { + type = bool + description = "This is relevant for Management only. The network in which managed gateways reside" + default = false +} +variable network_gwNetworkSourceRanges{ + type = list(string) + description = "Allow TCP traffic from the Internet" + default = [] +} +variable "network_enableIcmp" { + type = bool + description ="Allow ICMP traffic from the Internet" + default = false +} +variable "network_icmpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ICMP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ICMP traffic." + default = [] +} +variable network_enableUdp{ + type = bool + description ="Allow UDP traffic from the Internet" + default = false +} +variable "network_udpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for UDP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable UDP traffic." + default = [] +} +variable "network_enableSctp" { + type = bool + description ="Allow SCTP traffic from the Internet" + default = false +} +variable "network_sctpSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for SCTP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable SCTP traffic." + default = [] +} + +variable "network_enableEsp" { + type = bool + description ="Allow ESP traffic from the Internet " + default = false +} +variable "network_espSourceRanges" { + type = list(string) + description = "(Optional) Source IP ranges for ESP traffic - Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges. Please leave empty list to unable ESP traffic." + default = [] +} +variable "diskType" { + type = string + description ="Disk type" + default = "SSD Persistent Disk" +} +variable "bootDiskSizeGb" { + type = number + description ="Disk size in GB" + default = 100 +} +variable "generatePassword" { + type = bool + description ="Automatically generate an administrator password " + default = false +} +variable "management_nic" { + type = string + description = "Management Interface - Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1)." + default = "Ephemeral Public IP (eth0)" +} +variable "allowUploadDownload" { + type = string + description ="Allow download from/upload to Check Point" + default = true +} +variable "enableMonitoring" { + type = bool + description ="Enable Stackdriver monitoring" + default = false +} +variable "admin_shell" { + type = string + description = "Change the admin shell to enable advanced command line configuration." + default = "/etc/cli.sh" +} +variable "admin_SSH_key" { + type = string + description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." + default = "" +} +variable "sicKey" { + type = string + description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" + default = "" +} +variable "managementGUIClientNetwork" { + type = string + description ="Allowed GUI clients " + default = "0.0.0.0/0" +} +variable "smart_1_cloud_token" { + type = string + description ="(Optional) Smart-1 cloud token to connect this Gateway to Check Point's Security Management as a Service" + default = "" +} +variable "numAdditionalNICs" { + type = number + description ="Number of additional network interfaces" + default = 0 +} +variable "externalIP" { + type = string + description = "External IP address type" + default = "static" +} +variable "internal_network1_network" { + type = list(string) + description = "1st internal network ID in the chosen zone." + default = [] +} +variable "internal_network1_subnetwork" { + type = list(string) + description = "1st internal subnet ID in the chosen network." + default = [] +} +variable "internal_network2_network" { + type = list(string) + description = "2nd internal network ID in the chosen zone." + default = [] +} +variable "internal_network2_subnetwork" { + type = list(string) + description = "2nd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network3_network" { + type = list(string) + description = "3rd internal network ID in the chosen zone." + default = [] +} +variable "internal_network3_subnetwork" { + type = list(string) + description = "3rd internal subnet ID in the chosen network." + default = [] +} +variable "internal_network4_network" { + type = list(string) + description = "4th internal network ID in the chosen zone." + default = [] +} +variable "internal_network4_subnetwork" { + type = list(string) + description = "4th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network5_network" { + type = list(string) + description = "5th internal network ID in the chosen zone." + default = [] +} +variable "internal_network5_subnetwork" { + type = list(string) + description = "5th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network6_network" { + type = list(string) + description = "6th internal network ID in the chosen zone." + default = [] +} +variable "internal_network6_subnetwork" { + type = list(string) + description = "6th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network7_network" { + type = list(string) + description = "7th internal network ID in the chosen zone." + default = [] +} +variable "internal_network7_subnetwork" { + type = list(string) + description = "7th internal subnet ID in the chosen network." + default = [] +} +variable "internal_network8_network" { + type = list(string) + description = "8th internal network ID in the chosen zone." + default = [] +} +variable "internal_network8_subnetwork" { + type = list(string) + description = "8th internal subnet ID in the chosen network." + default = [] +} From db9e8dbc543e100492529ff8d3b56d8f7581a062 Mon Sep 17 00:00:00 2001 From: eddiek Date: Wed, 25 Sep 2024 14:16:35 +0000 Subject: [PATCH 02/12] Add new file .gitlab-ci.yml --- .gitlab-ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..e69de29b From 008dbe167a0ec90ea59ea38f3efc27518de4ff98 Mon Sep 17 00:00:00 2001 From: eddiek Date: Wed, 25 Sep 2024 16:59:01 +0300 Subject: [PATCH 03/12] resolve code analysis feedbacks --- aws/templates/asg/autoscale.yaml | 30 ++- aws/templates/cluster/cluster-master.yaml | 29 ++- aws/templates/cluster/cluster.yaml | 199 ++++++++++------- .../cross-az-cluster-master.yaml | 23 +- .../cross-az-cluster/cross-az-cluster.yaml | 209 ++++++++++-------- .../geo-cluster/geo-cluster-master.yaml | 29 ++- aws/templates/geo-cluster/geo-cluster.yaml | 198 ++++++++++------- aws/templates/gwlb-asg/gwlb-master.yaml | 39 ++-- aws/templates/gwlb-asg/gwlb.yaml | 36 ++- aws/templates/gwlb-asg/qs-gwlb-master.yaml | 23 +- aws/templates/gwlb-asg/qs-gwlb.yaml | 26 ++- aws/templates/gwlb-asg/tgw-gwlb-master.yaml | 39 ++-- aws/templates/gwlb-asg/tgw-gwlb.yaml | 37 +++- aws/templates/management/management.yaml | 94 ++++---- aws/templates/mds/mds.yaml | 90 +++++--- aws/templates/single-gw/gateway-master.yaml | 31 ++- aws/templates/single-gw/gateway.yaml | 105 +++++---- .../standalone/standalone-master.yaml | 27 ++- aws/templates/standalone/standalone.yaml | 99 +++++---- aws/templates/tgw-asg/tgw-asg-master.yaml | 35 +-- aws/templates/tgw-asg/tgw-asg.yaml | 36 +-- .../tgw-cross-az-cluster-master.yaml | 23 +- .../tgw-cross-az-cluster.yaml | 23 +- aws/templates/tgw-ha/tgw-ha-master.yaml | 30 ++- aws/templates/tgw-ha/tgw-ha.yaml | 27 ++- azure/misc/azure_ha_test.py | 16 -- .../README.md | 1 - .../createUiDefinition.json | 6 +- .../mainTemplate.json | 25 ++- .../marketplace-ha/createUiDefinition.json | 28 +-- .../marketplace-ha/mainTemplate.json | 4 +- .../createUiDefinition.json | 6 +- .../marketplace-management/mainTemplate.json | 4 +- .../marketplace-mds/createUiDefinition.json | 4 +- .../marketplace-mds/mainTemplate.json | 4 +- .../createUiDefinition.json | 4 +- .../marketplace-single-waap/mainTemplate.json | 7 +- .../createUiDefinition.json | 14 +- .../marketplace-single/mainTemplate.json | 4 +- .../createUiDefinition.json | 4 +- .../marketplace-vmss-waap/mainTemplate.json | 8 +- .../marketplace-vmss/createUiDefinition.json | 6 +- .../marketplace-vmss/mainTemplate.json | 4 +- .../nestedtemplates/storageAccount-new.json | 5 +- .../vnet-1-subnet-existing.json | 2 +- .../vnet-2-subnet-ha2-existing.json | 2 +- .../vnet-2-subnet-ha2-new.json | 2 +- .../vnet-existing-stack-ha.json | 2 +- .../nestedtemplates/vnet-existing.json | 2 +- .../nestedtemplates/vnet-new-stack-ha.json | 2 +- azure/templates/single-ipv6/README.md | 1 - azure/templates/single-ipv6/mainTemplate.json | 4 +- azure/templates/vmss-ipv6/mainTemplate.json | 4 +- azure/templates/vwan-managed-app/README.md | 4 +- .../vwan-managed-app/mainTemplate.json | 4 +- common/custom-management-script.py | 3 - .../terraform-azure-gwlb/cpcluster-main.tf | 5 + contrib/terraform-azure-gwlb/cpmgmt-main.tf | 5 + contrib/terraform-azure-gwlb/terraform.tfvars | 38 ++-- .../azure/vmss-new-vnet-with-peer/main.tf | 5 + .../vmss-new-vnet-with-peer/terraform.tfvars | 58 ++--- .../R8040-R81/autoscale-into-new-vpc/main.tf | 2 + terraform/alicloud/cluster-master/README.md | 7 +- terraform/alicloud/cluster/README.md | 7 +- .../cluster/cluster_member_a_userdata.yaml | 2 +- .../cluster/cluster_member_b_userdata.yaml | 2 +- terraform/alicloud/cluster/main.tf | 2 +- terraform/alicloud/gateway-master/README.md | 5 +- terraform/alicloud/gateway/README.md | 5 +- .../alicloud/management-master/README.md | 6 +- terraform/alicloud/management/README.md | 8 +- .../management/management_userdata.yaml | 2 +- .../gateway_instance/gateway_userdata.yaml | 2 +- .../modules/common/version_license/main.tf | 5 - terraform/alicloud/modules/images/images.yaml | 58 ----- terraform/aws/autoscale-gwlb/README.md | 84 +++---- terraform/aws/autoscale-gwlb/locals.tf | 1 - terraform/aws/autoscale-gwlb/main.tf | 28 +-- terraform/aws/autoscale-gwlb/terraform.tfvars | 2 +- terraform/aws/autoscale-gwlb/variables.tf | 2 +- terraform/aws/autoscale/README.md | 90 ++++---- terraform/aws/autoscale/asg_userdata.yaml | 2 +- terraform/aws/autoscale/main.tf | 14 +- terraform/aws/autoscale/terraform.tfvars | 2 +- terraform/aws/autoscale/variables.tf | 2 +- terraform/aws/cluster-master/README.md | 25 ++- terraform/aws/cluster-master/terraform.tfvars | 2 +- terraform/aws/cluster-master/variables.tf | 2 +- terraform/aws/cluster/README.md | 88 ++++---- .../cluster/cluster_member_a_userdata.yaml | 2 +- terraform/aws/cluster/terraform.tfvars | 2 +- terraform/aws/cluster/variables.tf | 2 +- terraform/aws/cme-iam-role-gwlb/README.md | 11 +- terraform/aws/cme-iam-role/README.md | 7 +- .../aws/cross-az-cluster-master/README.md | 20 +- .../cross-az-cluster-master/terraform.tfvars | 2 +- .../aws/cross-az-cluster-master/variables.tf | 2 +- terraform/aws/cross-az-cluster/README.md | 22 +- .../cluster_member_a_userdata.yaml | 2 +- .../cluster_member_b_userdata.yaml | 2 +- .../aws/cross-az-cluster/terraform.tfvars | 2 +- terraform/aws/cross-az-cluster/variables.tf | 2 +- terraform/aws/gateway-master/README.md | 25 ++- terraform/aws/gateway-master/terraform.tfvars | 2 +- terraform/aws/gateway-master/variables.tf | 2 +- terraform/aws/gateway/README.md | 87 ++++---- terraform/aws/gateway/terraform.tfvars | 2 +- terraform/aws/gateway/variables.tf | 2 +- terraform/aws/gwlb-master/README.md | 106 ++++----- terraform/aws/gwlb-master/terraform.tfvars | 2 +- terraform/aws/gwlb-master/variables.tf | 2 +- terraform/aws/gwlb/README.md | 32 +-- terraform/aws/gwlb/terraform.tfvars | 2 +- terraform/aws/gwlb/variables.tf | 2 +- terraform/aws/management/README.md | 25 ++- .../aws/management/management_userdata.yaml | 2 +- terraform/aws/mds/README.md | 22 +- terraform/aws/mds/mds_userdata.yaml | 2 +- terraform/aws/modules/amis/main.tf | 7 +- .../gateway_instance/gateway_userdata.yaml | 2 +- .../common/gateway_instance/variables.tf | 2 +- .../aws/modules/common/instance_type/main.tf | 2 +- .../modules/common/load_balancer/variables.tf | 2 +- .../modules/common/version_license/main.tf | 19 -- .../aws/modules/custom-autoscale/main.tf | 6 +- terraform/aws/qs-autoscale-master/README.md | 21 +- .../aws/qs-autoscale-master/terraform.tfvars | 2 +- .../aws/qs-autoscale-master/variables.tf | 2 +- terraform/aws/qs-autoscale/README.md | 109 +++++---- terraform/aws/qs-autoscale/terraform.tfvars | 2 +- terraform/aws/qs-autoscale/variables.tf | 2 +- terraform/aws/standalone-master/README.md | 21 +- terraform/aws/standalone-master/locals.tf | 1 + terraform/aws/standalone/README.md | 90 ++++---- .../aws/standalone/standalone_userdata.yaml | 2 +- terraform/aws/tgw-asg-master/README.md | 23 +- terraform/aws/tgw-asg-master/locals.tf | 2 + terraform/aws/tgw-asg-master/terraform.tfvars | 2 +- terraform/aws/tgw-asg-master/variables.tf | 2 +- terraform/aws/tgw-asg/README.md | 25 ++- terraform/aws/tgw-asg/terraform.tfvars | 2 +- terraform/aws/tgw-asg/variables.tf | 2 +- .../aws/tgw-cross-az-cluster-master/README.md | 90 ++++---- .../terraform.tfvars | 2 +- .../tgw-cross-az-cluster-master/variables.tf | 2 +- terraform/aws/tgw-cross-az-cluster/README.md | 92 ++++---- .../aws/tgw-cross-az-cluster/terraform.tfvars | 2 +- .../aws/tgw-cross-az-cluster/variables.tf | 2 +- terraform/aws/tgw-gwlb-master/README.md | 126 +++++------ .../aws/tgw-gwlb-master/terraform.tfvars | 2 +- terraform/aws/tgw-gwlb-master/variables.tf | 2 +- terraform/aws/tgw-gwlb/README.md | 132 +++++------ terraform/aws/tgw-gwlb/terraform.tfvars | 2 +- terraform/aws/tgw-gwlb/variables.tf | 2 +- .../high-availability-existing-vnet/README.md | 40 ++-- .../high-availability-existing-vnet/main.tf | 1 + .../variables.tf | 4 +- .../high-availability-new-vnet/README.md | 8 +- .../azure/high-availability-new-vnet/main.tf | 1 + .../high-availability-new-vnet/variables.tf | 4 +- .../azure/management-existing-vnet/README.md | 8 +- .../azure/management-existing-vnet/main.tf | 1 + .../management-existing-vnet/variables.tf | 4 +- terraform/azure/management-new-vnet/README.md | 8 +- terraform/azure/management-new-vnet/main.tf | 1 + .../azure/management-new-vnet/variables.tf | 4 +- terraform/azure/mds-existing-vnet/README.md | 8 +- terraform/azure/mds-existing-vnet/main.tf | 1 + .../azure/mds-existing-vnet/variables.tf | 4 +- terraform/azure/mds-new-vnet/README.md | 8 +- terraform/azure/mds-new-vnet/main.tf | 1 + terraform/azure/mds-new-vnet/variables.tf | 4 +- terraform/azure/modules/common/variables.tf | 8 +- .../azure/nva-into-existing-hub/README.md | 5 +- terraform/azure/nva-into-new-vwan/README.md | 9 +- .../single-gateway-existing-vnet/README.md | 8 +- .../single-gateway-existing-vnet/main.tf | 1 + .../single-gateway-existing-vnet/variables.tf | 4 +- .../azure/single-gateway-new-vnet/README.md | 8 +- .../azure/single-gateway-new-vnet/main.tf | 1 + .../single-gateway-new-vnet/variables.tf | 4 +- terraform/azure/vmss-existing-vnet/README.md | 176 ++++++++------- terraform/azure/vmss-existing-vnet/main.tf | 1 + .../azure/vmss-existing-vnet/terraform.tfvars | 3 +- .../azure/vmss-existing-vnet/variables.tf | 16 +- terraform/azure/vmss-new-vnet/README.md | 8 +- terraform/azure/vmss-new-vnet/main.tf | 1 + terraform/azure/vmss-new-vnet/variables.tf | 6 +- .../gcp/autoscale-into-existing-vpc/README.md | 28 ++- .../gcp/autoscale-into-existing-vpc/locals.tf | 9 + .../gcp/autoscale-into-existing-vpc/main.tf | 25 ++- .../terraform.tfvars | 61 ++--- .../autoscale-into-existing-vpc/variables.tf | 17 +- .../gcp/autoscale-into-new-vpc/README.md | 15 +- .../gcp/autoscale-into-new-vpc/locals.tf | 8 + terraform/gcp/autoscale-into-new-vpc/main.tf | 5 + .../autoscale-into-new-vpc/terraform.tfvars | 5 +- .../gcp/autoscale-into-new-vpc/variables.tf | 17 +- terraform/gcp/common/cluster-member/main.tf | 4 +- .../gcp/common/cluster-member/variables.tf | 12 +- terraform/gcp/common/members-a-b/main.tf | 4 + terraform/gcp/common/members-a-b/variables.tf | 10 + terraform/gcp/common/startup-script.sh | 2 +- terraform/gcp/high-availability/README.md | 24 +- terraform/gcp/high-availability/locals.tf | 12 +- terraform/gcp/high-availability/main.tf | 2 + .../gcp/high-availability/terraform.tfvars | 4 +- terraform/gcp/high-availability/variables.tf | 14 +- .../gcp/single-into-existing-vpc/README.md | 37 ++-- .../gcp/single-into-existing-vpc/locals.tf | 16 +- .../gcp/single-into-existing-vpc/main.tf | 4 +- .../single-into-existing-vpc/terraform.tfvars | 18 +- .../gcp/single-into-existing-vpc/variables.tf | 12 +- terraform/gcp/single-into-new-vpc/README.md | 42 ++-- terraform/gcp/single-into-new-vpc/main.tf | 2 + .../gcp/single-into-new-vpc/terraform.tfvars | 2 + .../gcp/single-into-new-vpc/variables.tf | 12 +- 217 files changed, 2342 insertions(+), 1942 deletions(-) diff --git a/aws/templates/asg/autoscale.yaml b/aws/templates/asg/autoscale.yaml index 15e36d55..97627bd8 100644 --- a/aws/templates/asg/autoscale.yaml +++ b/aws/templates/asg/autoscale.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Create an Auto Scaling group of Check Point gateways (20240417) +Description: Create an Auto Scaling group of Check Point gateways (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -18,6 +18,7 @@ Metadata: - VolumeType - EnableVolumeEncryption - EnableInstanceConnect + - MetaDataToken - Label: default: Auto Scaling Configuration Parameters: @@ -67,6 +68,8 @@ Metadata: default: Enable volume encryption EnableInstanceConnect: default: Enable AWS Instance Connect + MetaDataToken: + default: Metadata HTTP token GatewaysMinSize: default: Minimum Gateway group size GatewaysMaxSize: @@ -119,7 +122,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -262,6 +265,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewaysMinSize: Description: The minimal number of gateways in the Auto Scaling group. Type: Number @@ -287,12 +297,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -386,6 +390,7 @@ Conditions: ProvidedTargetGroups: !Not [!Equals [!Ref GatewaysTargetGroups, '']] EnableCloudWatch: !Equals [!Ref CloudWatch, true] CreateELB: !Not [!Equals [!Ref ELBType, none]] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ChkpGatewayRole: Type: AWS::IAM::Role @@ -405,7 +410,7 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: ChkpGatewayPolicy PolicyRole: !Ref ChkpGatewayRole @@ -419,7 +424,7 @@ Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] NotificationTopic: @@ -515,6 +520,8 @@ Resources: KeyName: !Ref KeyName ImageId: !GetAtt AMI.Outputs.ImageId InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] BlockDeviceMappings: - DeviceName: '/dev/xvda' Ebs: @@ -538,7 +545,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"autoscale\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"autoscale\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version GatewayScaleUpPolicy: Type: AWS::AutoScaling::ScalingPolicy @@ -605,3 +612,4 @@ Outputs: SecurityGroup: Description: The Security Group of the Auto Scaling group. Value: !GetAtt PermissiveSecurityGroup.GroupId + diff --git a/aws/templates/cluster/cluster-master.yaml b/aws/templates/cluster/cluster-master.yaml index 0f73a08c..6243e34c 100755 --- a/aws/templates/cluster/cluster-master.yaml +++ b/aws/templates/cluster/cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (20240204) +Description: Deploy a Check Point Cluster in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -23,6 +23,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -75,6 +76,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Version & license Shell: @@ -133,7 +136,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -290,16 +293,17 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -391,7 +395,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -410,7 +414,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cluster.yaml + TemplateURL: __URL__/cluster/cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -426,6 +430,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -494,12 +499,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/cluster/cluster.yaml b/aws/templates/cluster/cluster.yaml index f065f4f3..f1263257 100755 --- a/aws/templates/cluster/cluster.yaml +++ b/aws/templates/cluster/cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Description: Deploys a Check Point Cluster into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -23,6 +23,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -75,6 +76,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Version & license Shell: @@ -127,7 +130,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -285,16 +288,17 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -390,6 +394,7 @@ Conditions: ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] EmptyHostName: !Equals [!Ref GatewayHostname, ''] EnableCloudWatch: !Equals [!Ref CloudWatch, true] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ClusterReadyHandle: Type: AWS::CloudFormation::WaitConditionHandle @@ -407,7 +412,7 @@ Resources: Condition: CreateRole Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + TemplateURL: __URL__/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -417,14 +422,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join [-, [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -520,8 +525,12 @@ Resources: SubnetId: !Ref PrivateSubnet MemberAInstance: Type: AWS::EC2::Instance - DependsOn: [MemberAExternalInterface, MemberAInternalInterface] + DependsOn: [MemberAExternalInterface, MemberAInternalInterface, MemberAGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberAGatewayLaunchTemplate + Version: !GetAtt MemberAGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-A]] @@ -537,46 +546,14 @@ Resources: - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] - !Join [ '=', [ cluster-eth0-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] - !Join [ '=', [ cluster-eth1-private-ip, !Select [ 0, !GetAtt MemberAInternalInterface.SecondaryPrivateIpAddresses ] ] ] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberAExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberAInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ - - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' MemberBInstance: Type: AWS::EC2::Instance - DependsOn: [MemberBExternalInterface, MemberBInternalInterface] + DependsOn: [MemberBExternalInterface, MemberBInternalInterface, MemberBGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberBGatewayLaunchTemplate + Version: !GetAtt MemberBGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-B]] @@ -592,41 +569,92 @@ Resources: - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] - !Join [ '=', [ cluster-eth0-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] - !Join [ '=', [ cluster-eth1-private-ip, !Select [ 0, !GetAtt MemberAInternalInterface.SecondaryPrivateIpAddresses ] ] ] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberBExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberBInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ + MemberAGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: + 'Fn::Base64': + !Join + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['.', !Select [0, !Split ['-', !Ref GatewayVersion]]]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20230923\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version + MemberBGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version ClusterPublicAddress: Type: AWS::EC2::EIP Properties: @@ -719,12 +747,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [[!Ref MemberBToken], !Ref MemberAToken] @@ -734,3 +762,4 @@ Rules: - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" Assert: !Equals [ !Ref MemberBToken, '' ] + diff --git a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml index 65ed15aa..dcc61a70 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (20240204) +Description: Deploy a Check Point Cluster in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -24,6 +24,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -78,6 +79,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Version & license Shell: @@ -148,7 +151,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -298,6 +301,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL @@ -391,7 +401,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -412,7 +422,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml + TemplateURL: __URL__/cluster/cross-az-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -429,6 +439,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -497,12 +508,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/cross-az-cluster/cross-az-cluster.yaml b/aws/templates/cross-az-cluster/cross-az-cluster.yaml index 7f4a56ac..5d294579 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Description: Deploys a Check Point Cluster into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -25,6 +25,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -81,6 +82,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Version & license Shell: @@ -145,7 +148,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -303,6 +306,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL @@ -398,6 +408,7 @@ Conditions: ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] EmptyHostName: !Equals [!Ref GatewayHostname, ''] EnableCloudWatch: !Equals [!Ref CloudWatch, true] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ClusterReadyHandle: Type: AWS::CloudFormation::WaitConditionHandle @@ -415,7 +426,7 @@ Resources: Condition: CreateRole Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + TemplateURL: __URL__/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -425,14 +436,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -571,8 +582,12 @@ Resources: PrivateIpAddress: !GetAtt MemberBExternalInterface.PrimaryPrivateIpAddress MemberAInstance: Type: AWS::EC2::Instance - DependsOn: [MemberAExternalInterface, MemberAInternalInterface, ClusterPublicAddress, MemberBInternalInterface, MemberBExternalInterface] + DependsOn: [MemberAExternalInterface, MemberAInternalInterface, ClusterPublicAddress, MemberBInternalInterface, MemberBExternalInterface, MemberAGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberAGatewayLaunchTemplate + Version: !GetAtt MemberAGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-A]] @@ -587,50 +602,14 @@ Resources: - ':' - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] - !Join [ '=', [ secondary-external-private-ip, !Select [ 0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses ] ] ] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberAExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberAInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ - - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] - - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] - - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] - - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] - - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' MemberBInstance: Type: AWS::EC2::Instance - DependsOn: [MemberBExternalInterface, MemberBInternalInterface, ClusterPublicAddress, MemberAInternalInterface, MemberAExternalInterface] + DependsOn: [MemberBExternalInterface, MemberBInternalInterface, ClusterPublicAddress, MemberAInternalInterface, MemberBGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberBGatewayLaunchTemplate + Version: !GetAtt MemberBGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-B]] @@ -645,46 +624,100 @@ Resources: - ':' - - !Join [ '=', [ cluster-ip, !Ref ClusterPublicAddress ] ] - !Join [ '=', [ secondary-external-private-ip, !Select [ 0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses ] ] ] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberBExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberBInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ + MemberAGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: + 'Fn::Base64': + !Join + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version + MemberBGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: + 'Fn::Base64': + !Join + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] - - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] - - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] - - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] - - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join [ '', [ ' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' secondary_ip="', !Select [0, !GetAtt MemberBExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' remote_secondary_ip="', !Select [0, !GetAtt MemberAExternalInterface.SecondaryPrivateIpAddresses], '"']] + - !Join ['', [' cluster_ip="', !Ref ClusterPublicAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join [ '', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version Outputs: ClusterPublicAddress: Description: The public address of the cluster. @@ -739,12 +772,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/geo-cluster/geo-cluster-master.yaml b/aws/templates/geo-cluster/geo-cluster-master.yaml index d030832c..a07c6ed7 100644 --- a/aws/templates/geo-cluster/geo-cluster-master.yaml +++ b/aws/templates/geo-cluster/geo-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point cross AZ Cluster in a new VPC (20240204) +Description: Deploy a Check Point cross AZ Cluster in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -25,6 +25,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -81,6 +82,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -151,7 +154,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -309,17 +312,18 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Description: The license to install on the Security Gateways. Type: String Default: R81.10-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -409,7 +413,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -429,7 +433,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml + TemplateURL: __URL__/cluster/geo-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -447,6 +451,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -502,12 +507,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/geo-cluster/geo-cluster.yaml b/aws/templates/geo-cluster/geo-cluster.yaml index 86d9ea95..eee0a855 100644 --- a/aws/templates/geo-cluster/geo-cluster.yaml +++ b/aws/templates/geo-cluster/geo-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point cross AZ Cluster into an existing VPC (20240204) +Description: Deploys a Check Point cross AZ Cluster into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -25,6 +25,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -81,6 +82,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -145,7 +148,7 @@ Parameters: Default: Check-Point-Cluster GatewayInstanceType: Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -303,17 +306,18 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Description: The license to install on the Security Gateways. Type: String Default: R81.10-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -406,6 +410,7 @@ Conditions: ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] EmptyHostName: !Equals [!Ref GatewayHostname, ''] EnableCloudWatch: !Equals [!Ref CloudWatch, true] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ClusterReadyHandle: Type: AWS::CloudFormation::WaitConditionHandle @@ -422,7 +427,7 @@ Resources: ClusterRole: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml + TemplateURL: __URL__/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -432,14 +437,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -535,90 +540,111 @@ Resources: SubnetId: !Ref PrivateSubnetB MemberAInstance: Type: AWS::EC2::Instance - DependsOn: MemberAInternalInterface + DependsOn: [MemberAInternalInterface, MemberAGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberAGatewayLaunchTemplate + Version: !GetAtt MemberAGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-A]] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberAExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberAInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: !Base64 - 'Fn::Join': - - |+ - - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] - - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' MemberBInstance: Type: AWS::EC2::Instance - DependsOn: MemberBInternalInterface + DependsOn: [MemberBInternalInterface, MemberBGatewayLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MemberBGatewayLaunchTemplate + Version: !GetAtt MemberBGatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Join ['-', [!Ref GatewayName, Member-B]] - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref MemberBExternalInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref MemberBInternalInterface - IamInstanceProfile: !Ref ClusterInstanceProfile - DisableApiTermination: !Ref TerminationProtection - UserData: !Base64 - 'Fn::Join': - - |+ + MemberAGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberAExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberAInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: !Base64 + 'Fn::Join': + - |+ + + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenA=''${MemberAToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-a'] + - !Join ['', [' other_member_ip="', !GetAtt MemberBInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberAPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + MemberBGatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref MemberBExternalInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref MemberBInternalInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !Ref ClusterInstanceProfile + UserData: !Base64 + 'Fn::Join': + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] - - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] - - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; tokenB=''${MemberBToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ClusterReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [EmptyHostName, ' hostname=""',!Sub ' hostname=${GatewayHostname}-member-b'] + - !Join ['', [' other_member_ip="', !GetAtt MemberAInternalInterface.PrimaryPrivateIpAddress, '"']] + - !Join ['', [' eip="', !If [AllocateAddress, !Ref MemberBPublicAddress, ''], '"']] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join [ '', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version MemberAPublicAddress: Type: AWS::EC2::EIP Condition: AllocateAddress @@ -692,12 +718,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/gwlb-asg/gwlb-master.yaml b/aws/templates/gwlb-asg/gwlb-master.yaml index d10e85ad..6766a1b3 100644 --- a/aws/templates/gwlb-asg/gwlb-master.yaml +++ b/aws/templates/gwlb-asg/gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -22,6 +22,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -48,6 +49,7 @@ Metadata: - ControlGatewayOverPrivateOrPublicAddress - AllocatePublicAddress - CloudWatch + - GatewayBootstrapScript - Label: default: Check Point CloudGuard IaaS Security Management Server Configuration Parameters: @@ -87,6 +89,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -127,6 +131,8 @@ Metadata: default: Allocate Public IPs CloudWatch: default: CloudWatch metrics + GatewayBootstrapScript: + default: Gateways bootstrap script ManagementDeploy: default: Deploy Management Server ManagementInstanceType: @@ -223,6 +229,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -289,7 +302,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -417,9 +430,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX @@ -462,6 +472,11 @@ Parameters: AllowedValues: - true - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true ManagementDeploy: Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. Type: String @@ -588,10 +603,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -636,7 +647,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',' , !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -649,7 +660,7 @@ Resources: GWLBStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml + TemplateURL: __URL__/gwlb/gwlb.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID GatewaysSubnets: !Join @@ -664,6 +675,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken AllowUploadDownload: !Ref AllowUploadDownload ManagementServer: !Ref ManagementServer ConfigurationTemplate: !Ref ConfigurationTemplate @@ -684,6 +696,7 @@ Resources: ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress AllocatePublicAddress: !Ref AllocatePublicAddress CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript ManagementDeploy: !Ref ManagementDeploy ManagementInstanceType: !Ref ManagementInstanceType ManagementVersion: !Ref ManagementVersion @@ -715,7 +728,7 @@ Outputs: Value: !GetAtt GWLBStack.Outputs.GWLBServiceName Rules: GatewayAddressAllocationRule: - RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] - Assertions: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/gwlb.yaml b/aws/templates/gwlb-asg/gwlb.yaml index 8b2d8830..8d0340f7 100644 --- a/aws/templates/gwlb-asg/gwlb.yaml +++ b/aws/templates/gwlb-asg/gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -17,6 +17,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -43,6 +44,7 @@ Metadata: - ControlGatewayOverPrivateOrPublicAddress - AllocatePublicAddress - CloudWatch + - GatewayBootstrapScript - Label: default: Check Point CloudGuard IaaS Security Management Server Configuration Parameters: @@ -72,6 +74,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -112,6 +116,8 @@ Metadata: default: Allocate Public IPs CloudWatch: default: CloudWatch metrics + GatewayBootstrapScript: + default: Gateways bootstrap script ManagementDeploy: default: Deploy Management Server ManagementInstanceType: @@ -177,6 +183,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -239,7 +252,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -367,9 +380,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX @@ -412,6 +422,11 @@ Parameters: AllowedValues: - true - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true ManagementDeploy: Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. Type: String @@ -538,10 +553,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -631,7 +642,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml + TemplateURL: __URL__/gwlb/autoscale-gwlb.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -643,6 +654,7 @@ Resources: VolumeType: !Ref VolumeType VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect + MetaDataToken: !Ref MetaDataToken GatewaysMinSize: !Ref GatewaysMinSize GatewaysMaxSize: !Ref GatewaysMaxSize AdminEmail: !Ref AdminEmail @@ -655,13 +667,14 @@ Resources: ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress AllocatePublicAddress: !Ref AllocatePublicAddress CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript ManagementServer: !Ref ManagementServer ConfigurationTemplate: !Ref ConfigurationTemplate ManagementStack: Type: AWS::CloudFormation::Stack Condition: DeployManagement Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml + TemplateURL: __URL__/gwlb/management-gwlb.yaml Parameters: VPC: !Ref VPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] @@ -682,6 +695,7 @@ Resources: GatewayManagement: !Ref GatewayManagement GatewaysAddresses: !Ref GatewaysAddresses TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken ManagementBootstrapScript: !Join - ';' - - 'echo -e "\nStarting Bootstrap script\n"' diff --git a/aws/templates/gwlb-asg/qs-gwlb-master.yaml b/aws/templates/gwlb-asg/qs-gwlb-master.yaml index c95da46e..6979b470 100644 --- a/aws/templates/gwlb-asg/qs-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (05072024) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -37,6 +37,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -133,6 +134,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -335,6 +338,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -401,7 +411,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -697,8 +707,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -792,7 +800,7 @@ Resources: SecurityVPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',' , !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -805,7 +813,7 @@ Resources: ServersVPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-vpc.yaml + TemplateURL: __URL__/gwlb/qs-gwlb-servers-vpc.yaml Parameters: AvailabilityZones: !Join [ ',' , !Ref AvailabilityZones ] NumberOfAZs: !Ref NumberOfAZs @@ -824,7 +832,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: [SecurityVPCStack, ServersVPCStack] Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb.yaml + TemplateURL: __URL__/gwlb/qs-gwlb.yaml Parameters: SecurityVPC: !GetAtt SecurityVPCStack.Outputs.VPCID NumberOfAZs: !Ref NumberOfAZs @@ -843,6 +851,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken AllowUploadDownload: !Ref AllowUploadDownload ManagementServer: !Ref ManagementServer ConfigurationTemplate: !Ref ConfigurationTemplate diff --git a/aws/templates/gwlb-asg/qs-gwlb.yaml b/aws/templates/gwlb-asg/qs-gwlb.yaml index 1e560d67..70723206 100644 --- a/aws/templates/gwlb-asg/qs-gwlb.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (05072024)" +Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (__VERSION__)" Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -29,6 +29,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -105,6 +106,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -244,6 +247,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -306,7 +316,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -602,8 +612,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -741,7 +749,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml + TemplateURL: __URL__/gwlb/autoscale-gwlb.yaml Parameters: VPC: !Ref SecurityVPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -753,6 +761,7 @@ Resources: VolumeType: !Ref VolumeType VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect + MetaDataToken: !Ref MetaDataToken GatewaysMinSize: !Ref GatewaysMinSize GatewaysMaxSize: !Ref GatewaysMaxSize AdminEmail: !Ref AdminEmail @@ -783,7 +792,7 @@ Resources: Condition: DeployManagement DependsOn: GWLBeEndpointStack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml + TemplateURL: __URL__/gwlb/management-gwlb.yaml Parameters: VPC: !Ref SecurityVPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] @@ -804,6 +813,7 @@ Resources: GatewayManagement: !Ref GatewayManagement GatewaysAddresses: !Ref GatewaysAddresses TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken ManagementBootstrapScript: !Join - ';' - - 'echo -e "\nStarting Bootstrap script\n"' @@ -831,7 +841,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VpcEndpointService Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-endpoints.yaml + TemplateURL: __URL__/gwlb/qs-gwlb-endpoints.yaml Parameters: NumberOfAZs: !Ref NumberOfAZs GWLBeVPC: !Ref ServersVPC @@ -844,7 +854,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: GWLBeEndpointStack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-autoscale.yaml + TemplateURL: __URL__/gwlb/qs-gwlb-servers-autoscale.yaml Parameters: VPC: !Ref ServersVPC Subnets: !Join [',', !Ref ServersSubnets] diff --git a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml index f0284de3..cdf99b9c 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -34,6 +34,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -59,6 +60,7 @@ Metadata: - ControlGatewayOverPrivateOrPublicAddress - AllocatePublicAddress - CloudWatch + - GatewayBootstrapScript - Label: default: Check Point CloudGuard IaaS Security Management Server Configuration Parameters: @@ -122,6 +124,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -160,6 +164,8 @@ Metadata: default: Allocate Public IPs CloudWatch: default: CloudWatch metrics + GatewayBootstrapScript: + default: Gateways bootstrap script ManagementDeploy: default: Deploy Management Server ManagementInstanceType: @@ -322,6 +328,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -382,7 +395,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -510,9 +523,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX @@ -555,6 +565,11 @@ Parameters: AllowedValues: - true - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true ManagementDeploy: Description: Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section. Type: String @@ -681,10 +696,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -730,7 +741,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -748,7 +759,7 @@ Resources: TgwGwlbStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/tgw-gwlb.yaml + TemplateURL: __URL__/gwlb/tgw-gwlb.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID IGWID: !GetAtt VPCStack.Outputs.IGWID @@ -778,6 +789,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken AllowUploadDownload: !Ref AllowUploadDownload ManagementServer: !Ref ManagementServer ConfigurationTemplate: !Ref ConfigurationTemplate @@ -794,6 +806,7 @@ Resources: ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress AllocatePublicAddress: !Ref AllocatePublicAddress CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript GWLBName: !Ref GWLBName TargetGroupName: !Ref TargetGroupName CrossZoneLoadBalancing: !Ref CrossZoneLoadBalancing @@ -856,7 +869,7 @@ Outputs: Condition: 4AZs Rules: GatewayAddressAllocationRule: - RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] - Assertions: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/tgw-gwlb.yaml b/aws/templates/gwlb-asg/tgw-gwlb.yaml index 0801a10a..123d500a 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -32,6 +32,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - ManagementServer - ConfigurationTemplate @@ -51,6 +52,7 @@ Metadata: - ControlGatewayOverPrivateOrPublicAddress - AllocatePublicAddress - CloudWatch + - GatewayBootstrapScript - Label: default: Gateway Load Balancer Configuration Parameters: @@ -116,6 +118,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download ManagementServer: @@ -148,6 +152,8 @@ Metadata: default: Allocate Public IPs CloudWatch: default: CloudWatch metrics + GatewayBootstrapScript: + default: Gateways bootstrap script GWLBName: default: Gateway Load Balancer Name TargetGroupName: @@ -223,6 +229,7 @@ Parameters: Description: CIDR block for NAT subnet 2 located in the 2nd Availability Zone. Type: String Default: 10.0.23.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. NatGwSubnet3CIDR: Description: CIDR block for NAT subnet 3 located in the 3rd Availability Zone. @@ -234,6 +241,7 @@ Parameters: Description: CIDR block for NAT subnet 4 located in the 4th Availability Zone. Type: String Default: 10.0.43.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. GWLBeSubnet1CIDR: Description: CIDR block for GWLBe subnet 1 located in the 1st Availability Zone. @@ -245,6 +253,7 @@ Parameters: Description: CIDR block for GWLBe subnet 2 located in the 2nd Availability Zone. Type: String Default: 10.0.24.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. GWLBeSubnet3CIDR: Description: CIDR block for GWLBe subnet 3 located in the 3rd Availability Zone. @@ -256,6 +265,7 @@ Parameters: Description: CIDR block for GWLBe subnet 4 located in the 4th Availability Zone. Type: String Default: 10.0.44.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. KeyName: Description: The EC2 Key Pair to allow SSH access to the instances created by this stack. @@ -294,6 +304,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -333,7 +350,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -461,9 +478,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX @@ -506,6 +520,11 @@ Parameters: AllowedValues: - true - false + GatewayBootstrapScript: + Description: An optional script with semicolon (;) separated commands to run on the initial boot. (optional) + Type: String + Default: '' + NoEcho: true GWLBName: Description: Gateway Load Balancer name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name cannot begin or end with a hyphen. Type: String @@ -649,10 +668,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -962,7 +977,7 @@ Resources: GWLBStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml + TemplateURL: __URL__/gwlb/gwlb.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -972,6 +987,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken AllowUploadDownload: !Ref AllowUploadDownload ManagementServer: !Ref ManagementServer ConfigurationTemplate: !Ref ConfigurationTemplate @@ -992,6 +1008,7 @@ Resources: ControlGatewayOverPrivateOrPublicAddress: !Ref ControlGatewayOverPrivateOrPublicAddress AllocatePublicAddress: !Ref AllocatePublicAddress CloudWatch: !Ref CloudWatch + GatewayBootstrapScript: !Ref GatewayBootstrapScript ManagementDeploy: !Ref ManagementDeploy ManagementInstanceType: !Ref ManagementInstanceType ManagementVersion: !Ref ManagementVersion diff --git a/aws/templates/management/management.yaml b/aws/templates/management/management.yaml index 4ec20f7a..dd756635 100755 --- a/aws/templates/management/management.yaml +++ b/aws/templates/management/management.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Management Server (20240417) +Description: Deploys a Check Point Management Server (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -20,6 +20,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: IAM Permissions (ignored when the installation is not Primary Management Server) @@ -70,6 +71,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token ManagementPermissions: default: IAM role ManagementPredefinedRole: @@ -273,6 +276,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false ManagementPermissions: Description: IAM role to attach to the instance profile. Type: String @@ -299,10 +309,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -330,7 +336,7 @@ Parameters: AllowedPattern: '[\$\./a-zA-Z0-9]*' NoEcho: true ManagementHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: The name must not contain reserved words. For details, refer to sk40179. (optional) Type: String Default: mgmt-aws AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -406,11 +412,12 @@ Conditions: UseRole: !Not [!Equals [!Ref ManagementPermissions, None (configure later)]] NoSIC: !Equals [!Ref SICKey, ''] PreRole: !And [!Condition UseRole, !Not [!Condition CreateRole]] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref ManagementVersion, MGMT]] ManagementReadyHandle: @@ -486,7 +493,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: CreateRole Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml + TemplateURL: __URL__/iam/cme-iam-role.yaml Parameters: Permissions: !Ref ManagementPermissions STSRoles: !Join [',', !Ref ManagementSTSRoles] @@ -499,15 +506,15 @@ Resources: - !Ref ManagementPredefinedRole ManagementInstance: Type: AWS::EC2::Instance - DependsOn: ManagementSecurityGroup + DependsOn: ManagementLaunchTemplate Properties: + LaunchTemplate: + LaunchTemplateId: !Ref ManagementLaunchTemplate + Version: !GetAtt ManagementLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Ref ManagementName - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref ManagementInstanceType - IamInstanceProfile: !If [UseRole, !If [PreRole, !Ref InstanceProfile, !GetAtt ManagementRoleStack.Outputs.CMEIAMRole], !Ref 'AWS::NoValue'] - KeyName: !Ref KeyName NetworkInterfaces: - DeviceIndex: 0 AssociatePublicIpAddress: false @@ -516,32 +523,43 @@ Resources: - !Ref ManagementSecurityGroup DeleteOnTermination: true SubnetId: !Ref ManagementSubnet - BlockDeviceMappings: - - DeviceName: /dev/xvda - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ + ManagementLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref ManagementInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !If [ UseRole, !If [ PreRole, !Ref InstanceProfile, !GetAtt ManagementRoleStack.Outputs.CMEIAMRole ], !Ref 'AWS::NoValue' ] + UserData: + 'Fn::Base64': + !Join + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${ManagementHostname} ; eic=${EnableInstanceConnect} ; admin_subnet=${AdminCIDR} ; eip=${AllocatePublicAddress} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; mgmt_install_type=''${ManagementInstallationType}''' - - !If [EIP, !Sub ' wait_handle=''${ManagementReadyHandle}''',!Ref 'AWS::NoValue'] - - !If [NoSIC, ' sic=""', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref SICKey, ')"']]] - - !If [ManageOverInternetAndEIP, ' pub_mgmt=true', ' pub_mgmt=false'] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref ManagementBootstrapScript, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementMaintenancePasswordHash, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref ManagementVersion]]}] - - ' python3 /etc/cloud_config.py waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" installationType=\"management\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"management\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" "management_installation_type=\"${mgmt_install_type}\"" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" overTheInternet=\"${pub_mgmt}\" bootstrapScript64=\"${bootstrap}\"' + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${ManagementHostname} ; eic=${EnableInstanceConnect} ; admin_subnet=${AdminCIDR} ; eip=${AllocatePublicAddress} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; mgmt_install_type=''${ManagementInstallationType}''' + - !If [EIP, !Sub ' wait_handle=''${ManagementReadyHandle}''',!Ref 'AWS::NoValue'] + - !If [NoSIC, ' sic=""', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref SICKey, ')"']]] + - !If [ManageOverInternetAndEIP, ' pub_mgmt=true', ' pub_mgmt=false'] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref ManagementBootstrapScript, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementMaintenancePasswordHash, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref ManagementVersion]]}] + - ' python3 /etc/cloud_config.py waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" installationType=\"management\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"management\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" "management_installation_type=\"${mgmt_install_type}\"" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" overTheInternet=\"${pub_mgmt}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP Condition: EIP diff --git a/aws/templates/mds/mds.yaml b/aws/templates/mds/mds.yaml index 241bb981..1f5a9b41 100644 --- a/aws/templates/mds/mds.yaml +++ b/aws/templates/mds/mds.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploys a Check Point Multi-Domain Server (20240417) +Description: Deploys a Check Point Multi-Domain Server (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -19,6 +19,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: IAM Permissions (ignored when the installation type is not Primary Multi-Domain Server) @@ -66,6 +67,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token MDSPermissions: default: IAM role MDSPredefinedRole: @@ -260,6 +263,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false MDSPermissions: Description: IAM role to attach to the instance profile. Type: String @@ -286,8 +296,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R81-BYOL - R81.10-BYOL - R81.20-BYOL Shell: @@ -313,7 +321,7 @@ Parameters: AllowedPattern: '[\$\./a-zA-Z0-9]*' NoEcho: true MDSHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: The name must not contain reserved words. For details, refer to sk40179. (optional) Type: String Default: mds-aws AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -350,7 +358,7 @@ Parameters: with the Multi-Domain Server. The address should be either 0.0.0.0/0 (any address) or /32 (specific address) Type: String AllowedPattern: '^((0.0.0.0\/0)|)$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/32)$' - ConstraintDescription: Administrator address must be either 0.0.0.0/0 or /32 + ConstraintDescription: Administrator address must be either 0.0.0.0/0 or /32 GatewaysAddresses: Description: Allow gateways only from this network to communicate with the Multi-Domain. Server @@ -385,11 +393,12 @@ Conditions: PrimaryMDS: !Equals [!Ref MDSInstallationType, Primary Multi-Domain Server] SecondaryMDS: !Equals [!Ref MDSInstallationType, Secondary Multi-Domain Server] PreRole: !And [!Condition UseRole, !Not [!Condition CreateRole]] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref MDSVersion, MGMT]] MDSSecurityGroup: @@ -454,7 +463,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: CreateRole Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml + TemplateURL: __URL__/iam/cme-iam-role.yaml Parameters: Permissions: !Ref MDSPermissions STSRoles: !Join [',', !Ref MDSSTSRoles] @@ -467,15 +476,15 @@ Resources: - !Ref MDSPredefinedRole MDSInstance: Type: AWS::EC2::Instance - DependsOn: MDSSecurityGroup + DependsOn: [MDSSecurityGroup, MDSLaunchTemplate] Properties: + LaunchTemplate: + LaunchTemplateId: !Ref MDSLaunchTemplate + Version: !GetAtt MDSLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Ref MDSName - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref MDSInstanceType - IamInstanceProfile: !If [UseRole, !If [PreRole, !Ref InstanceProfile, !GetAtt MDSRoleStack.Outputs.CMEIAMRole], !Ref 'AWS::NoValue'] - KeyName: !Ref KeyName NetworkInterfaces: - DeviceIndex: 0 AssociatePublicIpAddress: false @@ -484,27 +493,38 @@ Resources: - !Ref MDSSecurityGroup DeleteOnTermination: true SubnetId: !Ref MDSSubnet - BlockDeviceMappings: - - DeviceName: /dev/xvda - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - DisableApiTermination: !Ref TerminationProtection - UserData: !Base64 - Fn::Join: - - |+ + MDSLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref MDSInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !If [ UseRole, !If [ PreRole, !Ref InstanceProfile, !GetAtt MDSRoleStack.Outputs.CMEIAMRole ], !Ref 'AWS::NoValue' ] + UserData: !Base64 + Fn::Join: + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${MDSHostname} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; admin_subnet=${AdminCIDR}' - - !If [PrimaryMDS, ' primary=true ; secondary=false', !If [SecondaryMDS, ' primary=false ; secondary=true', ' primary=false ; secondary=false']] - - !If [PrimaryMDS, ' sic=notused', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref MDSSICKey, ')"']]] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref MDSBootstrapScript, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSMaintenancePasswordHash, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref MDSVersion]]}] - - ' python3 /etc/cloud_config.py sicKey=\"${sic}\" installationType=\"mds\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"mds\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" primary=\"${primary}\" secondary=\"${secondary}\" adminSubnet=\"${admin_subnet}\" bootstrapScript64=\"${bootstrap}\"' \ No newline at end of file + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; allow_info=${AllowUploadDownload} ; hostname=${MDSHostname} ; eic=${EnableInstanceConnect} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; admin_subnet=${AdminCIDR}' + - !If [PrimaryMDS, ' primary=true ; secondary=false', !If [SecondaryMDS, ' primary=false ; secondary=true', ' primary=false ; secondary=false']] + - !If [PrimaryMDS, ' sic=notused', !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref MDSSICKey, ')"']]] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref MDSBootstrapScript, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSMaintenancePasswordHash, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref MDSVersion]]}] + - ' python3 /etc/cloud_config.py sicKey=\"${sic}\" installationType=\"mds\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"mds\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" primary=\"${primary}\" secondary=\"${secondary}\" adminSubnet=\"${admin_subnet}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version \ No newline at end of file diff --git a/aws/templates/single-gw/gateway-master.yaml b/aws/templates/single-gw/gateway-master.yaml index 3c34df22..c7c1d195 100644 --- a/aws/templates/single-gw/gateway-master.yaml +++ b/aws/templates/single-gw/gateway-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Security Gateway into a new VPC (20240204) +Description: Deploys a Check Point Security Gateway into a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -22,6 +22,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -77,6 +78,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateway Version & license Shell: @@ -124,17 +127,21 @@ Parameters: Description: The public subnet of the Security Gateway. Type: String Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. PrivateSubnetCIDR: Description: The private subnet of the Security Gateway. Type: String Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. GatewayName: Type: String Default: Check-Point-Gateway GatewayInstanceType: Description: The instance type of the Secutiry Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -287,16 +294,17 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -342,7 +350,7 @@ Parameters: Type: String Default: '' GatewayHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: The name must not contain reserved words. For details, refer to sk40179. (optional) Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -400,7 +408,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -428,7 +436,7 @@ Resources: GatewayStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/gateway.yaml + TemplateURL: __URL__/gateway/gateway.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -443,6 +451,7 @@ Resources: VolumeEncryption: !Ref VolumeEncryption EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewaySICKey: !Ref GatewaySICKey diff --git a/aws/templates/single-gw/gateway.yaml b/aws/templates/single-gw/gateway.yaml index 5c66f2fa..76c5cef6 100644 --- a/aws/templates/single-gw/gateway.yaml +++ b/aws/templates/single-gw/gateway.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Security Gateway into an existing VPC (20240204) +Description: Deploys a Check Point Security Gateway into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -22,6 +22,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -77,6 +78,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateway Version & license Shell: @@ -132,7 +135,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -285,16 +288,17 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -340,7 +344,7 @@ Parameters: Type: String Default: '' GatewayHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: The name must not contain reserved words. For details, refer to sk40179. (optional) Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -398,6 +402,7 @@ Conditions: ProvidedResourcesTag: !Not [!Equals [!Ref ResourcesTagName, '']] ProvidedManagementParameters: !And [!Not [!Equals [!Ref ManagementServer, '']], !Not [!Equals [!Ref ConfigurationTemplate, '']]] EnableCloudWatch: !Equals [!Ref CloudWatch, true] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ReadyHandle: Type: AWS::CloudFormation::WaitConditionHandle @@ -432,14 +437,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !Ref GatewayIAMRole AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion,GW]] ExternalNetworkInterface: @@ -496,7 +501,12 @@ Resources: RouteTableId: !Ref InternalRouteTable GatewayInstance: Type: AWS::EC2::Instance + DependsOn: GatewayLaunchTemplate Properties: + LaunchTemplate: + LaunchTemplateId: !Ref GatewayLaunchTemplate + Version: !GetAtt GatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Ref GatewayName @@ -510,40 +520,47 @@ Resources: - !Join ['=', [template,!Ref ConfigurationTemplate]] - !Join ['=',[ip-address, !Ref ControlGatewayOverPrivateOrPublicAddress]] - !Ref 'AWS::NoValue' - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref GatewayInstanceType - BlockDeviceMappings: - - DeviceName: '/dev/xvda' - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - IamInstanceProfile: !If [EnableCloudWatch, !Ref GatewayInstanceProfile, !Ref 'AWS::NoValue'] - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ + GatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref ExternalNetworkInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref InternalNetworkInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref GatewayInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !If [EnableCloudWatch, !Ref GatewayInstanceProfile, !Ref 'AWS::NoValue'] + UserData: + 'Fn::Base64': + !Join + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; hostname=${GatewayHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; token=''${GatewayToken}''' - - !If [AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue'] - - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${token}\"" installationType=\"gateway\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"gateway\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref ExternalNetworkInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref InternalNetworkInterface + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; hostname=${GatewayHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; token=''${GatewayToken}''' + - !If [AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue'] + - !Join ['', [' sic="$(echo ', 'Fn::Base64': !Ref GatewaySICKey, ')"']] + - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayPasswordHash, ')"']] + - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] + - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] + - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${token}\"" installationType=\"gateway\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"gateway\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP Condition: AllocateAddress diff --git a/aws/templates/standalone/standalone-master.yaml b/aws/templates/standalone/standalone-master.yaml index 4f598a3f..42832747 100644 --- a/aws/templates/standalone/standalone-master.yaml +++ b/aws/templates/standalone/standalone-master.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance in a new VPC (20240204) + Security Gateway & Management (Standalone) instance in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -23,6 +23,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -69,6 +70,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token StandaloneVersion: default: License Shell: @@ -110,10 +113,14 @@ Parameters: Description: The public subnet of the Security Gateway. Type: String Default: 10.0.10.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. PrivateSubnetCIDR: Description: The private subnet of the Security Gateway. Type: String Default: 10.0.11.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' + ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. StandaloneName: Type: String Default: Check-Point-Instance @@ -157,15 +164,18 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false StandaloneVersion: Description: Standalone Version & License. Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-PAYG-NGTP - - R80.40-BYOL - - R81-PAYG-NGTP - - R81-BYOL - R81.10-PAYG-NGTP - R81.10-BYOL - R81.20-PAYG-NGTP @@ -313,7 +323,7 @@ Parameters: Type: String Default: '' StandaloneHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: (optional) Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -364,7 +374,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -391,7 +401,7 @@ Resources: StandaloneStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/standalone.yaml + TemplateURL: __URL__/gateway/standalone.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -406,6 +416,7 @@ Resources: VolumeEncryption: !Ref VolumeEncryption EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken StandaloneVersion: !Ref StandaloneVersion Shell: !Ref Shell StandalonePasswordHash: !Ref StandalonePasswordHash diff --git a/aws/templates/standalone/standalone.yaml b/aws/templates/standalone/standalone.yaml index 78f36aba..cc565f6c 100644 --- a/aws/templates/standalone/standalone.yaml +++ b/aws/templates/standalone/standalone.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance into an existing VPC (20240204) + Security Gateway & Management (Standalone) instance into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -23,6 +23,7 @@ Metadata: - VolumeEncryption - EnableInstanceConnect - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -69,6 +70,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token StandaloneVersion: default: License Shell: @@ -270,15 +273,18 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false StandaloneVersion: Description: Standalone Version & License. Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-PAYG-NGTP - - R80.40-BYOL - - R81-PAYG-NGTP - - R81-BYOL - R81.10-PAYG-NGTP - R81.10-BYOL - R81.20-PAYG-NGTP @@ -310,7 +316,7 @@ Parameters: Type: String Default: '' StandaloneHostname: - Description: The name must not contain reserved words. For details, refer to sk40179 (optional). + Description: (optional) Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -361,6 +367,7 @@ Conditions: ProvidedRouteTable: !Not [!Equals [!Ref InternalRouteTable, '']] EnableCloudWatch: !Equals [!Ref CloudWatch, true] IsBYOL: !Equals [!Select [1, !Split ['-', !Ref StandaloneVersion]], 'BYOL'] + EnableMetaDataToken: !Equals [!Ref MetaDataToken, true] Resources: ReadyHandle: Type: AWS::CloudFormation::WaitConditionHandle @@ -395,14 +402,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml + TemplateURL: __URL__/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !Ref StandaloneIAMRole AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml + TemplateURL: __URL__/utils/amis.yaml Parameters: Version: !If [IsBYOL, !Join ['-', [!Ref StandaloneVersion,MGMT]], !Ref StandaloneVersion] ExternalNetworkInterface: @@ -456,43 +463,55 @@ Resources: RouteTableId: !Ref InternalRouteTable StandaloneInstance: Type: AWS::EC2::Instance + DependsOn: GatewayLaunchTemplate Properties: + LaunchTemplate: + LaunchTemplateId: !Ref GatewayLaunchTemplate + Version: !GetAtt GatewayLaunchTemplate.LatestVersionNumber + DisableApiTermination: !Ref TerminationProtection Tags: - Key: Name Value: !Ref StandaloneName - ImageId: !GetAtt AMI.Outputs.ImageId - InstanceType: !Ref StandaloneInstanceType - BlockDeviceMappings: - - DeviceName: /dev/xvda - Ebs: - Encrypted: !If [EncryptedVolume, true, false] - KmsKeyId: !If [EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue'] - VolumeType: !Ref VolumeType - VolumeSize: !Ref VolumeSize - IamInstanceProfile: !If [EnableCloudWatch, !Ref StandaloneInstanceProfile, !Ref 'AWS::NoValue'] - DisableApiTermination: !Ref TerminationProtection - UserData: - 'Fn::Base64': - !Join - - |+ + GatewayLaunchTemplate: + Type: AWS::EC2::LaunchTemplate + Properties: + LaunchTemplateData: + NetworkInterfaces: + - DeviceIndex: 0 + NetworkInterfaceId: !Ref ExternalNetworkInterface + - DeviceIndex: 1 + NetworkInterfaceId: !Ref InternalNetworkInterface + KeyName: !Ref KeyName + ImageId: !GetAtt AMI.Outputs.ImageId + InstanceType: !Ref StandaloneInstanceType + MetadataOptions: + HttpTokens: !If [EnableMetaDataToken, required, optional] + BlockDeviceMappings: + - DeviceName: '/dev/xvda' + Ebs: + Encrypted: !If [ EncryptedVolume, true, false ] + KmsKeyId: !If [ EncryptedVolume, !Ref VolumeEncryption, !Ref 'AWS::NoValue' ] + VolumeType: !Ref VolumeType + VolumeSize: !Ref VolumeSize + IamInstanceProfile: + Name: !If [ EnableCloudWatch, !Ref StandaloneInstanceProfile, !Ref 'AWS::NoValue' ] + UserData: + 'Fn::Base64': + !Join + - |+ - - - '#cloud-config' - - 'runcmd:' - - ' - |' - - ' set -e' - - !Sub ' admin_shell=${Shell} ; hostname=${StandaloneHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; admin_subnet=${AdminCIDR}' - - !If [AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue'] - - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref StandaloneBootstrapScript, ')"']] - - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref StandalonePasswordHash, ')"']] - - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref StandaloneMaintenancePasswordHash, ')"']] - - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref StandaloneVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" installationType=\"standalone\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"standalone\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' - KeyName: !Ref KeyName - NetworkInterfaces: - - DeviceIndex: 0 - NetworkInterfaceId: !Ref ExternalNetworkInterface - - DeviceIndex: 1 - NetworkInterfaceId: !Ref InternalNetworkInterface + - - '#cloud-config' + - 'runcmd:' + - ' - |' + - ' set -e' + - !Sub ' admin_shell=${Shell} ; hostname=${StandaloneHostname} ; allow_info=${AllowUploadDownload} ; cw=${CloudWatch} ; ntp1=${NTPPrimary} ; ntp2=${NTPSecondary} ; eic=${EnableInstanceConnect} ; eip=${AllocatePublicAddress} ; admin_subnet=${AdminCIDR}' + - !If [ AllocateAddress, !Sub ' wait_handle=''${ReadyHandle}''',!Ref 'AWS::NoValue' ] + - !Join [ '', [ ' bootstrap="$(echo ', 'Fn::Base64': !Ref StandaloneBootstrapScript, ')"' ] ] + - !Join [ '', [ ' pwd_hash="$(echo ', 'Fn::Base64': !Ref StandalonePasswordHash, ')"' ] ] + - !Join [ '', [ ' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref StandaloneMaintenancePasswordHash, ')"' ] ] + - !Sub [ ' version=${Version}', { Version: !Select [ 0, !Split [ '-', !Ref StandaloneVersion ] ] } ] + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" installationType=\"standalone\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"standalone\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP Condition: AllocateAddress diff --git a/aws/templates/tgw-asg/tgw-asg-master.yaml b/aws/templates/tgw-asg/tgw-asg-master.yaml index 076e24a7..bd72aa0e 100644 --- a/aws/templates/tgw-asg/tgw-asg-master.yaml +++ b/aws/templates/tgw-asg/tgw-asg-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20240204) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -22,6 +22,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - Label: default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration @@ -84,6 +85,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download GatewayName: @@ -214,6 +217,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -228,7 +238,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -356,12 +366,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -530,10 +534,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -612,7 +612,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -625,7 +625,7 @@ Resources: MainStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/tgw-asg.yaml + TemplateURL: __URL__/autoscale/tgw-asg.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID GatewaysSubnets: !Join @@ -640,6 +640,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken AllowUploadDownload: !Ref AllowUploadDownload GatewayName: !Ref GatewayName GatewayInstanceType: !Ref GatewayInstanceType @@ -682,7 +683,7 @@ Outputs: Condition: DeployManagement Rules: GatewayAddressRule: - RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] - Assertions: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" - Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] \ No newline at end of file + Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] diff --git a/aws/templates/tgw-asg/tgw-asg.yaml b/aws/templates/tgw-asg/tgw-asg.yaml index c63676e1..096570d1 100644 --- a/aws/templates/tgw-asg/tgw-asg.yaml +++ b/aws/templates/tgw-asg/tgw-asg.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20240204) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -17,6 +17,7 @@ Metadata: - VolumeType - EnableInstanceConnect - TerminationProtection + - MetaDataToken - AllowUploadDownload - Label: default: Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration @@ -69,6 +70,8 @@ Metadata: default: Enable AWS Instance Connect TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token AllowUploadDownload: default: Allow upload & download GatewayName: @@ -168,6 +171,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false AllowUploadDownload: Description: Automatically download updates and share statistical data for product improvement purpose. Type: String @@ -182,7 +192,7 @@ Parameters: GatewayInstanceType: Description: The EC2 instance type for the Security Gateways. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -310,12 +320,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -484,10 +488,6 @@ Parameters: Type: String Default: R81.20-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG - - R81-BYOL - - R81-PAYG - R81.10-BYOL - R81.10-PAYG - R81.20-BYOL @@ -566,7 +566,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: DeployManagement Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/management/management.yaml + TemplateURL: __URL__/management/management.yaml Parameters: VPC: !Ref VPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] @@ -579,6 +579,7 @@ Resources: VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken ManagementPermissions: !Ref ManagementPermissions ManagementPredefinedRole: !Ref ManagementPredefinedRole ManagementVersion: !Ref ManagementVersion @@ -619,7 +620,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/autoscale.yaml + TemplateURL: __URL__/autoscale/autoscale.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -630,6 +631,7 @@ Resources: VolumeType: !Ref VolumeType VolumeSize: !Ref VolumeSize EnableInstanceConnect: !Ref EnableInstanceConnect + MetaDataToken: !Ref MetaDataToken GatewaysMinSize: !Ref GatewaysMinSize GatewaysMaxSize: !Ref GatewaysMaxSize AdminEmail: !Ref AdminEmail @@ -673,7 +675,7 @@ Outputs: Condition: DeployManagement Rules: GatewayAddressRule: - RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] - Assertions: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" - Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] \ No newline at end of file + Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml index 076c1390..4c03ed53 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (20240204) +Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -27,6 +27,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -87,6 +88,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -168,7 +171,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -325,6 +328,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.20-BYOL @@ -417,7 +427,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -441,7 +451,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-cross-az-cluster.yaml + TemplateURL: __URL__/cluster/tgw-cross-az-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -461,6 +471,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -507,12 +518,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml index 651a4554..92cce90f 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml @@ -1,5 +1,7 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an existing VPC (20240204) +Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an + existing VPC + (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -27,6 +29,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -87,6 +90,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -162,7 +167,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -320,6 +325,13 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Description: The license to install on the Security Gateways. Type: String @@ -413,7 +425,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml + TemplateURL: __URL__/cluster/cross-az-cluster.yaml Parameters: VPC: !Ref VPC PublicSubnetA: !Ref PublicSubnetA @@ -431,6 +443,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -503,12 +516,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-ha/tgw-ha-master.yaml b/aws/templates/tgw-ha/tgw-ha-master.yaml index 7eb8db40..dcb860be 100644 --- a/aws/templates/tgw-ha/tgw-ha-master.yaml +++ b/aws/templates/tgw-ha/tgw-ha-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (20240204) +Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -27,6 +27,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -87,6 +88,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -160,6 +163,7 @@ Parameters: Description: CIDR block for TGW HA subnet 2 located in the 2nd Availability Zone. Type: String Default: 10.0.22.0/24 + AllowedPattern: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$' ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. GatewayName: Description: The name tag of the Security Gateway instances. (optional) @@ -168,7 +172,7 @@ Parameters: GatewayInstanceType: Description: The instance type of the Secutiry Gateway. Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -325,16 +329,17 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Type: String Default: R81.10-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -423,7 +428,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml + TemplateURL: __URL__/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -446,7 +451,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-ha.yaml + TemplateURL: __URL__/cluster/tgw-ha.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -466,6 +471,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -509,12 +515,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-ha/tgw-ha.yaml b/aws/templates/tgw-ha/tgw-ha.yaml index e02d8e5e..d05a2e2b 100644 --- a/aws/templates/tgw-ha/tgw-ha.yaml +++ b/aws/templates/tgw-ha/tgw-ha.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW HA Cluster into an existing VPC (20240204) +Description: Deploys a Check Point TGW HA Cluster into an existing VPC (__VERSION__) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -27,6 +27,7 @@ Metadata: - EnableInstanceConnect - GatewayPredefinedRole - TerminationProtection + - MetaDataToken - Label: default: Check Point Settings Parameters: @@ -87,6 +88,8 @@ Metadata: default: Existing IAM role name TerminationProtection: default: Termination Protection + MetaDataToken: + default: Metadata HTTP token GatewayVersion: default: Gateways version & license Shell: @@ -161,7 +164,7 @@ Parameters: Default: Check-Point-Cluster GatewayInstanceType: Type: String - Default: c5.xlarge + Default: c6in.xlarge AllowedValues: - c4.large - c4.xlarge @@ -319,17 +322,18 @@ Parameters: AllowedValues: - true - false + MetaDataToken: + Description: Set true to deploy the instance with metadata v2 token required. + Type: String + Default: true + AllowedValues: + - true + - false GatewayVersion: Description: The license to install on the Security Gateways. Type: String Default: R81.10-BYOL AllowedValues: - - R80.40-BYOL - - R80.40-PAYG-NGTP - - R80.40-PAYG-NGTX - - R81-BYOL - - R81-PAYG-NGTP - - R81-PAYG-NGTX - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX @@ -419,7 +423,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml + TemplateURL: __URL__/cluster/geo-cluster.yaml Parameters: VPC: !Ref VPC PublicSubnetA: !Ref PublicSubnetA @@ -437,6 +441,7 @@ Resources: EnableInstanceConnect: !Ref EnableInstanceConnect GatewayPredefinedRole: !Ref GatewayPredefinedRole TerminationProtection: !Ref TerminationProtection + MetaDataToken: !Ref MetaDataToken GatewayVersion: !Ref GatewayVersion Shell: !Ref Shell GatewayPasswordHash: !Ref GatewayPasswordHash @@ -506,12 +511,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/azure/misc/azure_ha_test.py b/azure/misc/azure_ha_test.py index 48fcac18..53601177 100755 --- a/azure/misc/azure_ha_test.py +++ b/azure/misc/azure_ha_test.py @@ -35,7 +35,6 @@ def set_arm_versions(): - """#TODO fixDocstring""" global ARM_VERSIONS log('Setting api versions for "%s" solution\n' % templateName) if templateName == 'stack-ha': @@ -48,17 +47,14 @@ def set_arm_versions(): def is_azure(): - """#TODO fixDocstring""" return os.path.isfile('/etc/in-azure') def log(msg): - """#TODO fixDocstring""" sys.stderr.write(msg) def test_rw(rid, allow_not_found=False, test_write=True): - """#TODO fixDocstring""" components = rid.split('/') log('Id : %s\n' % rid) log('Subscription : %s\n' % components[2]) @@ -85,7 +81,6 @@ def test_rw(rid, allow_not_found=False, test_write=True): def get_vm_primary_nic(vm): - """#TODO fixDocstring""" nis = vm['properties']['networkProfile']['networkInterfaces'] if len(nis) == 1: ni = nis[0] @@ -97,7 +92,6 @@ def get_vm_primary_nic(vm): def test_cluster_ip(): - """#TODO fixDocstring""" def test_vip(vip_resource): if '/' in vip_resource: cluster_ip_id = vip_resource @@ -116,7 +110,6 @@ def test_vip(vip_resource): def test_load_balancer(): - """#TODO fixDocstring""" load_balancer_nm = conf.get('lbName', '') if not load_balancer_nm: log('An external load balancer name is not configured.\n') @@ -129,7 +122,6 @@ def test_load_balancer(): def vnet_rg(): - """#TODO fixDocstring""" local_vm = azure.arm('GET', conf['baseId'] + 'microsoft.compute/virtualmachines/' + conf['hostname'])[1] @@ -140,7 +132,6 @@ def vnet_rg(): def get_route_table_ids_for_vnet(vnet): - """#TODO fixDocstring""" route_table_ids = set() for subnet in vnet['properties'].get('subnets', []): if subnet['properties'].get('routeTable'): @@ -149,7 +140,6 @@ def get_route_table_ids_for_vnet(vnet): def get_vnet_id(): - """#TODO fixDocstring""" vnet_id = conf.get('vnetId') if vnet_id: return vnet_id @@ -164,7 +154,6 @@ def get_vnet_id(): def get_route_table_ids_for_peering(vnet): - """#TODO fixDocstring""" route_table_ids = set() for peering in vnet['properties'].get('virtualNetworkPeerings', []): @@ -185,7 +174,6 @@ def get_route_table_ids_for_peering(vnet): def get_route_table_ids(): - """#TODO fixDocstring""" route_table_ids = set() vnet_id = get_vnet_id() @@ -198,7 +186,6 @@ def get_route_table_ids(): def interfaces_test_rw(interface_id): - """#TODO fixDocstring""" interface = test_rw(interface_id['id']) if not interface['properties'].get('enableIPForwarding'): raise Exception( @@ -207,7 +194,6 @@ def interfaces_test_rw(interface_id): def test_cluster_parameters(): - """#TODO fixDocstring""" path = "/var/opt/fw.boot/modules/fwkern.conf" text1 = "fwha_dead_timeout_multiplier=20" text2 = "fwha_if_problem_tolerance=200" @@ -248,7 +234,6 @@ def test_cluster_parameters(): def test(): - """#TODO fixDocstring""" global conf if not is_azure(): @@ -412,7 +397,6 @@ def test(): def main(): - """#TODO fixDocstring""" try: test() except Exception: diff --git a/azure/templates/marketplace-gateway-load-balancer/README.md b/azure/templates/marketplace-gateway-load-balancer/README.md index a970e1a3..4b5df7cc 100644 --- a/azure/templates/marketplace-gateway-load-balancer/README.md +++ b/azure/templates/marketplace-gateway-load-balancer/README.md @@ -19,4 +19,3 @@ Benefits: To deploy with full control over all the template options use: [Full Control Deployment](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCheckPointSW%2FCloudGuardIaaS%2Fmaster%2Fazure%2Ftemplates%2Fmarketplace-gateway-load-balancer%2FmainTemplate.json) - diff --git a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json index 54fd25cc..1de1c662 100644 --- a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json +++ b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json @@ -1120,7 +1120,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -1508,9 +1508,9 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } } -} \ No newline at end of file +} diff --git a/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json index f9db5e37..12d29edc 100644 --- a/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json +++ b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json @@ -414,7 +414,7 @@ "variables": { "resourceGroup": "[resourceGroup()]", "templateName": "gwlb", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", @@ -639,7 +639,23 @@ "diskSize100GB": 100, "additionalDiskSizeGB": "[if(contains('R8110 R8120', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", - "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "vxlanParametersForR82": "kernel_parameters:\n sim:\n - sim_enable_vxlan=3\n - sim_enable_gre=3\n fw: \n - fw_enable_vxlan=1\n - fw_enable_gre=1", + "cloudConfigParams":[ + "[concat('installationType=\\\"', variables('installationType'), '\\\"')]", + "[concat('allowUploadDownload=\\\"', variables('allowUploadDownload'), '\\\"')]", + "[concat('osVersion=\\\"', variables('osVersion'), '\\\"')]", + "[concat('templateName=\\\"', variables('templateName'), '\\\"')]", + "[concat('isBlink=\\\"', variables('isBlink'), '\\\"')]", + "[concat('templateVersion=\\\"', variables('templateVersion'), '\\\"')]", + "[concat('bootstrapScript64=\\\"', variables('bootstrapScript64'), '\\\"')]", + "[concat('location=\\\"', variables('location'), '\\\"')]", + "[concat('sicKey=\\\"', variables('sicKey'), '\\\"')]", + "[concat('customMetrics=\\\"', variables('customMetrics'), '\\\"')]", + "[concat('adminShell=\\\"', parameters('adminShell'), '\\\"')]", + "[concat('MaintenanceModePassword=\\\"', parameters('MaintenanceModePasswordHash'), '\\\"')]", + "[concat('passwordHash=\\\"', parameters('SerialConsolePasswordHash'), '\\\"')]" + ], + "customData": "[concat('#cloud-config','\n', if(equals(variables('osVersion'),'R82'),variables('vxlanParametersForR82'), ''),'\n', 'runcmd:\n - python3 /etc/cloud_config.py ', join(variables('cloudConfigParams'), ' '))]", "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", "imagePublisher": "checkpoint", "imageReferenceBYOL": { @@ -1032,7 +1048,7 @@ "mode": "Manual" }, "virtualMachineProfile": { - "UserData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", + "UserData": "[base64(concat(variables('customData'), '\n'))]", "storageProfile": { "osDisk": { "diskSizeGB": "[variables('diskSizeGB')]", @@ -1048,7 +1064,6 @@ "adminPassword": "[parameters('adminPassword')]", "adminUsername": "[concat('not','used')]", "computerNamePrefix": "[toLower(parameters('vmName'))]", - "customData": "[base64(concat(variables('customData'), '\n', 'vnet=\"', if(equals(parameters('vnetNewOrExisting'), 'new'), reference('networkNewSetup').outputs.vnetAddressPrefix.value, reference('networkExistingSetup').outputs.vnetAddressPrefix.value), '\"', '\n' ))]", "linuxConfiguration": "[variables('linuxConfiguration')]" }, "networkProfile": { @@ -1079,7 +1094,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(variables('storageAccountId'), '2019-06-01').primaryEndpoints.blob]" + "storageUri": "[reference(variables('storageAccountId'), '2023-01-01').primaryEndpoints.blob]" } } }, diff --git a/azure/templates/marketplace-ha/createUiDefinition.json b/azure/templates/marketplace-ha/createUiDefinition.json index a547363d..c770250c 100644 --- a/azure/templates/marketplace-ha/createUiDefinition.json +++ b/azure/templates/marketplace-ha/createUiDefinition.json @@ -836,7 +836,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -946,7 +946,7 @@ "label": "Availability options", "defaultValue": "Availability Set", "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", - "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth \\ ', concat(' ', location(), ' '))]", "constraints": { "allowedValues": [ { @@ -1199,7 +1199,7 @@ "label": "Quick connect to Smart-1 Cloud", "defaultValue": "Yes", "toolTip": "Automatically connect this Cluster to Smart-1 Cloud - Check Point's Security Management as a Service", - "constraints": { + "constraints": { "allowedValues": [ { "label": "Yes", @@ -1238,16 +1238,16 @@ "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" }, { - "name": "Smart1CloudTokenB", - "type": "Microsoft.Common.TextBox", - "label": "Smart-1 Cloud Token Member B", - "toolTip": "Paste here the token copied from the Connect Gateway (Member B) screen in Smart-1 Cloud portal", - "constraints": { - "required": true, - "regex": "[\\S\\s]{5,}", - "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" - }, - "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" + "name": "Smart1CloudTokenB", + "type": "Microsoft.Common.TextBox", + "label": "Smart-1 Cloud Token Member B", + "toolTip": "Paste here the token copied from the Connect Gateway (Member B) screen in Smart-1 Cloud portal", + "constraints": { + "required": true, + "regex": "[\\S\\s]{5,}", + "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" + }, + "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" } ] }, @@ -1640,7 +1640,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", "VipsNumber": "[int(steps('network').Vips_Number)]", "VipNames": "[concat(steps('network').VIP_Names.VIP2_Name, ',', steps('network').VIP_Names.VIP3_Name, ',', steps('network').VIP_Names.VIP4_Name, ',', steps('network').VIP_Names.VIP5_Name, ',', steps('network').VIP_Names.VIP6_Name, ',', steps('network').VIP_Names.VIP7_Name, ',', steps('network').VIP_Names.VIP8_Name, ',', steps('network').VIP_Names.VIP9_Name, ',', steps('network').VIP_Names.VIP10_Name)]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", diff --git a/azure/templates/marketplace-ha/mainTemplate.json b/azure/templates/marketplace-ha/mainTemplate.json index 77c7fbf3..92ebdc45 100644 --- a/azure/templates/marketplace-ha/mainTemplate.json +++ b/azure/templates/marketplace-ha/mainTemplate.json @@ -357,7 +357,7 @@ "VIPs_Number": "[int(parameters('VipsNumber'))]", "Vip_Names": "[split(parameters('VipNames'), ',')]", "templateName": "ha", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "elbPublicIPName": "frontend-lb-address", "haPublicIPName": "[parameters('vmName')]", @@ -1210,7 +1210,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2023-01-01').primaryEndpoints.blob]" } }, "hardwareProfile": { diff --git a/azure/templates/marketplace-management/createUiDefinition.json b/azure/templates/marketplace-management/createUiDefinition.json index 83dcc85d..7e945af8 100644 --- a/azure/templates/marketplace-management/createUiDefinition.json +++ b/azure/templates/marketplace-management/createUiDefinition.json @@ -225,7 +225,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -422,7 +422,7 @@ } ] } - }, + }, { "name": "enableApi", "type": "Microsoft.Common.DropDown", @@ -694,7 +694,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } diff --git a/azure/templates/marketplace-management/mainTemplate.json b/azure/templates/marketplace-management/mainTemplate.json index 409cb73f..eb3153c8 100644 --- a/azure/templates/marketplace-management/mainTemplate.json +++ b/azure/templates/marketplace-management/mainTemplate.json @@ -269,7 +269,7 @@ }, "variables": { "templateName": "management", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", @@ -868,7 +868,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2023-01-01').primaryEndpoints.blob]" } }, "hardwareProfile": { diff --git a/azure/templates/marketplace-mds/createUiDefinition.json b/azure/templates/marketplace-mds/createUiDefinition.json index 52056087..de11e136 100644 --- a/azure/templates/marketplace-mds/createUiDefinition.json +++ b/azure/templates/marketplace-mds/createUiDefinition.json @@ -186,7 +186,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -629,7 +629,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } diff --git a/azure/templates/marketplace-mds/mainTemplate.json b/azure/templates/marketplace-mds/mainTemplate.json index 91f313fc..98e056c2 100644 --- a/azure/templates/marketplace-mds/mainTemplate.json +++ b/azure/templates/marketplace-mds/mainTemplate.json @@ -262,7 +262,7 @@ }, "variables": { "templateName": "mds", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", @@ -851,7 +851,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2023-01-01').primaryEndpoints.blob]" } }, "hardwareProfile": { diff --git a/azure/templates/marketplace-single-waap/createUiDefinition.json b/azure/templates/marketplace-single-waap/createUiDefinition.json index 3ebd285b..42e2ebff 100755 --- a/azure/templates/marketplace-single-waap/createUiDefinition.json +++ b/azure/templates/marketplace-single-waap/createUiDefinition.json @@ -67,8 +67,8 @@ "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", "constraints": { "required": true, - "regex": "^cp-[a-z0-9A-Z-]{72,72}$", - "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" + "regex": "^cp-(([a-z0-9A-Z-]{72,72})|([a-z0-9A-Z-]{75,75}))$", + "validationMessage": "Token should begin with 'cp-' and must be 75 or 78 characters long" }, "options": { "hideConfirmation": false diff --git a/azure/templates/marketplace-single-waap/mainTemplate.json b/azure/templates/marketplace-single-waap/mainTemplate.json index 1d4f4b84..d7704b90 100755 --- a/azure/templates/marketplace-single-waap/mainTemplate.json +++ b/azure/templates/marketplace-single-waap/mainTemplate.json @@ -50,7 +50,7 @@ "waapAgentToken": { "type": "securestring", "minLength": 75, - "maxLength": 75, + "maxLength": 78, "metadata": { "description": "Infinity Next Agent Token" } @@ -203,7 +203,7 @@ }, "variables": { "templateName": "checkpoint_waap", - "templateVersion": "20210922", + "templateVersion": "20211028", "location": "[parameters('location')]", "osVersion": "R8040", "installationType": "waap", @@ -282,6 +282,9 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", + "properties": { + "minimalTlsVersion": "TLS1_2" + }, "apiVersion": "2021-04-01", "location": "[variables('location')]", "sku": { diff --git a/azure/templates/marketplace-single/createUiDefinition.json b/azure/templates/marketplace-single/createUiDefinition.json index b02e4ffd..4df2533a 100644 --- a/azure/templates/marketplace-single/createUiDefinition.json +++ b/azure/templates/marketplace-single/createUiDefinition.json @@ -785,7 +785,7 @@ "name": "installationType", "type": "Microsoft.Common.DropDown", "label": "Installation type", - "visible": "[or(equals(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'))]", + "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'))]", "defaultValue": "Gateway only", "toolTip": "Select the type of deployment", "constraints": { @@ -831,7 +831,7 @@ { "name": "standaloneValidation", "type": "Microsoft.Common.InfoBox", - "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')))))]", + "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')))))]", "options": { "icon": "Error", "text": "Standalone deployment is ONLY supported for CloudGuard versions R81.10 and R81.20 Bring Your Own License." @@ -877,7 +877,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -1120,7 +1120,7 @@ "label": "Quick connect to Smart-1 Cloud", "defaultValue": "Yes", "toolTip": "Automatically connect this single gateway to Smart-1 Cloud - Check Point's Security Management as a Service", - "constraints": { + "constraints": { "allowedValues": [ { "label": "Yes", @@ -1157,7 +1157,7 @@ "validationMessage": "Smart1Cloud Token Should contain at lease 5 characters" }, "visible": "[equals(steps('chkp').allowSmart1CloudConnection, 'yes')]" - } + } ] }, { @@ -1347,7 +1347,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]" + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]" } } -} \ No newline at end of file +} diff --git a/azure/templates/marketplace-single/mainTemplate.json b/azure/templates/marketplace-single/mainTemplate.json index 57fea308..6085d845 100644 --- a/azure/templates/marketplace-single/mainTemplate.json +++ b/azure/templates/marketplace-single/mainTemplate.json @@ -306,7 +306,7 @@ }, "variables": { "templateName": "single", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", @@ -869,7 +869,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2022-09-01').primaryEndpoints.blob]" + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2023-01-01').primaryEndpoints.blob]" } }, "hardwareProfile": { diff --git a/azure/templates/marketplace-vmss-waap/createUiDefinition.json b/azure/templates/marketplace-vmss-waap/createUiDefinition.json index 2ca24a11..51c05e9c 100755 --- a/azure/templates/marketplace-vmss-waap/createUiDefinition.json +++ b/azure/templates/marketplace-vmss-waap/createUiDefinition.json @@ -67,8 +67,8 @@ "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", "constraints": { "required": true, - "regex": "^cp-[a-z0-9A-Z-]{72,72}$", - "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" + "regex": "^cp-(([a-z0-9A-Z-]{72,72})|([a-z0-9A-Z-]{75,75}))$", + "validationMessage": "Token should begin with 'cp-' and must be 75 or 78 characters long" }, "options": { "hideConfirmation": false diff --git a/azure/templates/marketplace-vmss-waap/mainTemplate.json b/azure/templates/marketplace-vmss-waap/mainTemplate.json index bd80fffb..0b921194 100755 --- a/azure/templates/marketplace-vmss-waap/mainTemplate.json +++ b/azure/templates/marketplace-vmss-waap/mainTemplate.json @@ -51,7 +51,7 @@ "waapAgentToken": { "type": "securestring", "minLength": 75, - "maxLength": 75, + "maxLength": 78, "metadata": { "description": "Infinity Next Agent Token" } @@ -73,6 +73,7 @@ "availabilityZonesNum": { "type": "int", "allowedValues": [ + 0, 1, 2, 3 @@ -387,7 +388,7 @@ }, "variables": { "templateName": "waap_vmss", - "templateVersion": "20210922", + "templateVersion": "20211028", "location": "[parameters('location')]", "osVersion": "R8040", "isBlink": true, @@ -661,6 +662,9 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", + "properties": { + "minimalTlsVersion": "TLS1_2" + }, "apiVersion": "2021-04-01", "location": "[variables('location')]", "sku": { diff --git a/azure/templates/marketplace-vmss/createUiDefinition.json b/azure/templates/marketplace-vmss/createUiDefinition.json index 6b3ebbce..0f2cf56a 100644 --- a/azure/templates/marketplace-vmss/createUiDefinition.json +++ b/azure/templates/marketplace-vmss/createUiDefinition.json @@ -1331,7 +1331,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -1744,9 +1744,9 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } } -} \ No newline at end of file +} diff --git a/azure/templates/marketplace-vmss/mainTemplate.json b/azure/templates/marketplace-vmss/mainTemplate.json index 0dd69d8d..077e926c 100644 --- a/azure/templates/marketplace-vmss/mainTemplate.json +++ b/azure/templates/marketplace-vmss/mainTemplate.json @@ -502,7 +502,7 @@ "resourceGroup": "[resourceGroup()]", "resourceGroupName": "[resourceGroup().name]", "templateName": "vmss-v2", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", @@ -1229,7 +1229,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(variables('storageAccountId'), '2021-04-01').primaryEndpoints.blob]" + "storageUri": "[reference(variables('storageAccountId'), '2023-01-01').primaryEndpoints.blob]" } } }, diff --git a/azure/templates/nestedtemplates/storageAccount-new.json b/azure/templates/nestedtemplates/storageAccount-new.json index 51820aac..b08a25a7 100644 --- a/azure/templates/nestedtemplates/storageAccount-new.json +++ b/azure/templates/nestedtemplates/storageAccount-new.json @@ -30,6 +30,9 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageAccountName')]", + "properties": { + "minimalTlsVersion": "TLS1_2" + }, "apiVersion": "[parameters('apiVersion')]", "location": "[parameters('location')]", "sku": { @@ -39,4 +42,4 @@ "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Storage/storageAccounts'), parameters('tagsByResource')['Microsoft.Storage/storageAccounts'], json('{}')) ]" } ] -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-1-subnet-existing.json b/azure/templates/nestedtemplates/vnet-1-subnet-existing.json index 81fc0d5a..cb335d9a 100644 --- a/azure/templates/nestedtemplates/vnet-1-subnet-existing.json +++ b/azure/templates/nestedtemplates/vnet-1-subnet-existing.json @@ -84,4 +84,4 @@ "type": "object" } } -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json index 17781d8c..04e3694c 100644 --- a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-existing.json @@ -73,4 +73,4 @@ "type": "array" } } -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json index be5ae374..d9ca08ba 100644 --- a/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json +++ b/azure/templates/nestedtemplates/vnet-2-subnet-ha2-new.json @@ -189,4 +189,4 @@ "type": "array" } } -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-existing-stack-ha.json b/azure/templates/nestedtemplates/vnet-existing-stack-ha.json index 6d7eaf7f..2f99a6f4 100644 --- a/azure/templates/nestedtemplates/vnet-existing-stack-ha.json +++ b/azure/templates/nestedtemplates/vnet-existing-stack-ha.json @@ -90,4 +90,4 @@ "type": "string" } } -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-existing.json b/azure/templates/nestedtemplates/vnet-existing.json index 415f5361..64533665 100644 --- a/azure/templates/nestedtemplates/vnet-existing.json +++ b/azure/templates/nestedtemplates/vnet-existing.json @@ -73,4 +73,4 @@ "type": "string" } } -} +} \ No newline at end of file diff --git a/azure/templates/nestedtemplates/vnet-new-stack-ha.json b/azure/templates/nestedtemplates/vnet-new-stack-ha.json index f941bb4c..c7e9b1ad 100644 --- a/azure/templates/nestedtemplates/vnet-new-stack-ha.json +++ b/azure/templates/nestedtemplates/vnet-new-stack-ha.json @@ -138,4 +138,4 @@ "type": "string" } } -} +} \ No newline at end of file diff --git a/azure/templates/single-ipv6/README.md b/azure/templates/single-ipv6/README.md index 57e098d6..7021c048 100755 --- a/azure/templates/single-ipv6/README.md +++ b/azure/templates/single-ipv6/README.md @@ -7,4 +7,3 @@ Follow [sk170760](https://supportcenter.checkpoint.com/supportcenter/portal?even Deploy to Azure - diff --git a/azure/templates/single-ipv6/mainTemplate.json b/azure/templates/single-ipv6/mainTemplate.json index 3ef03349..ea4efc14 100755 --- a/azure/templates/single-ipv6/mainTemplate.json +++ b/azure/templates/single-ipv6/mainTemplate.json @@ -296,7 +296,7 @@ "subnetName": "[parameters('Subnet1Name')]", "subnet2Name": "[parameters('Subnet2Name')]", "templateName": "singleIpv6", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", @@ -990,7 +990,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2021-06-01').primaryEndpoints.blob]" + "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2023-01-01').primaryEndpoints.blob]" } }, "hardwareProfile": { diff --git a/azure/templates/vmss-ipv6/mainTemplate.json b/azure/templates/vmss-ipv6/mainTemplate.json index 4c0f3b0a..f137e829 100755 --- a/azure/templates/vmss-ipv6/mainTemplate.json +++ b/azure/templates/vmss-ipv6/mainTemplate.json @@ -374,7 +374,7 @@ "subnet2Name": "[parameters('Subnet2Name')]", "resourceGroup": "[resourceGroup()]", "templateName": "vmss-v2", - "templateVersion": "20240716", + "templateVersion": "20240904", "location": "[parameters('location')]", "subnet-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", "subnet2-id": "[resourceId(parameters('virtualNetworkExistingRGName'), 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnet2Name'))]", @@ -1283,7 +1283,7 @@ "diagnosticsProfile": { "bootDiagnostics": { "enabled": "true", - "storageUri": "[reference(variables('storageAccountId'), '2021-06-01').primaryEndpoints.blob]" + "storageUri": "[reference(variables('storageAccountId'), '2023-01-01').primaryEndpoints.blob]" } } }, diff --git a/azure/templates/vwan-managed-app/README.md b/azure/templates/vwan-managed-app/README.md index 293238e2..085e0620 100644 --- a/azure/templates/vwan-managed-app/README.md +++ b/azure/templates/vwan-managed-app/README.md @@ -64,8 +64,8 @@ https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft } ], "availableVersions": [ - "8110.900335.1522", - "8120.900631.1522", + "8110.900335.1435", + "8120.900631.1433", "latest" ], "marketPlaceLink": "https://aka.ms/Checkpointmarketplace", diff --git a/azure/templates/vwan-managed-app/mainTemplate.json b/azure/templates/vwan-managed-app/mainTemplate.json index 5b733a83..1856f822 100644 --- a/azure/templates/vwan-managed-app/mainTemplate.json +++ b/azure/templates/vwan-managed-app/mainTemplate.json @@ -25,7 +25,7 @@ } }, "imageVersion": { - "defaultValue": "8120.900631.1594", + "defaultValue": "8120.900634.1641", "type": "String", "metadata": { "description": "The image version that will be used to deploy the solution. To get the image version, make API call to https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Network/networkVirtualApplianceSkus/checkpoint?api-version=2023-05-01" @@ -281,4 +281,4 @@ } } ] - } + } \ No newline at end of file diff --git a/common/custom-management-script.py b/common/custom-management-script.py index 8b53028c..38264dd1 100755 --- a/common/custom-management-script.py +++ b/common/custom-management-script.py @@ -9,11 +9,8 @@ # and at the beginning of the deprovisioning process. # Important: This is a placeholder script, and you should implement __add and __delete functions. -import collections import os -import subprocess import sys -import traceback import logging from logging.handlers import RotatingFileHandler diff --git a/contrib/terraform-azure-gwlb/cpcluster-main.tf b/contrib/terraform-azure-gwlb/cpcluster-main.tf index dc622c82..1af9d1e4 100644 --- a/contrib/terraform-azure-gwlb/cpcluster-main.tf +++ b/contrib/terraform-azure-gwlb/cpcluster-main.tf @@ -233,6 +233,11 @@ resource "random_id" "clusterrandomId" { byte_length = 8 } resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + blob_properties { + delete_retention_policy { + days = 7 + } + } name = "bootdiag${random_id.clusterrandomId.hex}" resource_group_name = module.common.resource_group_name location = module.common.resource_group_location diff --git a/contrib/terraform-azure-gwlb/cpmgmt-main.tf b/contrib/terraform-azure-gwlb/cpmgmt-main.tf index 8dabd6ab..b009a3b4 100644 --- a/contrib/terraform-azure-gwlb/cpmgmt-main.tf +++ b/contrib/terraform-azure-gwlb/cpmgmt-main.tf @@ -124,6 +124,11 @@ resource "random_id" "randomId" { # Create storage account for boot diagnostics resource "azurerm_storage_account" "ckp-storageaccount" { + blob_properties { + delete_retention_policy { + days = 7 + } + } name = "diag${random_id.randomId.hex}" resource_group_name = azurerm_resource_group.rg-ckpmgmt.name location = azurerm_resource_group.rg-ckpmgmt.location diff --git a/contrib/terraform-azure-gwlb/terraform.tfvars b/contrib/terraform-azure-gwlb/terraform.tfvars index f35851c3..a3259c79 100644 --- a/contrib/terraform-azure-gwlb/terraform.tfvars +++ b/contrib/terraform-azure-gwlb/terraform.tfvars @@ -1,31 +1,31 @@ # Set in this file your deployment variables # Specify the Azure values -azure-client-id = "xxxxx-xxxxx-xxxxx-xxxxx" -azure-client-secret = "xxxxx-xxxxx-xxxxx-xxxxx" -azure-subscription = "xxxxx-xxxxx-xxxxx-xxxxx" -azure-tenant = "xxxxx-xxxxx-xxxxx-xxxxx" +azure-client-id = "PLEASE ENTER AZURE CLIENT ID" # "xxxxx-xxxxx-xxxxx-xxxxx" +azure-client-secret = "PLEASE ENTER AZURE CLIENT SECRET" # "xxxxx-xxxxx-xxxxx-xxxxx" +azure-subscription = "PLEASE ENTER AZURE SUBSCRIPTION" # "xxxxx-xxxxx-xxxxx-xxxxx" +azure-tenant = "PLEASE ENTER AZURE TENANT" # "xxxxx-xxxxx-xxxxx-xxxxx" # Specify where you want to deploy it and where you are coming from -location = "France Central" -my-pub-ip = "x.x.x.x/32" +location = "PLEASE ENTER LOCATION" # "France Central" +my-pub-ip = "PLEASE ENTER PUBLIC IP" # "x.x.x.x/32" # Management details -mgmt-sku-enabled = false # Have you ever deployed a R81.10 CKP management? Set to false if not -mgmt-dns-suffix = "xxxxx" -mgmt-admin-pwd = "xxxxx" +mgmt-sku-enabled = "PLEASE ENTER true or false" # false # Have you ever deployed a R81.10 CKP management? Set to false if not +mgmt-dns-suffix = "PLEASE ENTER MANAGEMENT DNS SUFFIX" # "xxxxx" +mgmt-admin-pwd = "PLEASE ENTER MANAGEMENT ADMIN PASSWORD" # "xxxxx" # VMspoke details -vmspoke-sku-enabled = false # Have you ever deployed a Nginx VM before? set to false if not -vmspoke-usr = "xxxxx" -vmspoke-pwd = "xxxxx" +vmspoke-sku-enabled = "PLEASE ENTER true or false" # false # Have you ever deployed a Nginx VM before? set to false if not +vmspoke-usr = "PLEASE ENTER VMSPOKE USER" # "xxxxx" +vmspoke-pwd = "PLEASE ENTER VMSPOKE PASSWORD" # "xxxxx" # Cluster Details -cpcluster-sku-enabled = false # Have you ever deployed a R80.40 CKP cluster? set to false if not" -admin_username = "xxxxx" -admin_password = "xxxxx" -sic_key = "xxxxx" +cpcluster-sku-enabled = "PLEASE ENTER true or false" # false # Have you ever deployed a R80.40 CKP cluster? set to false if not" +admin_username = "PLEASE ENTER ADMIN USERNAME" # "xxxxx" +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxx" # GWLB VMSS Details -gwlb-vmss-agreement = false # Have you ever deployed a GWLB VMSS? set to false if not -chkp-admin-pwd = "xxxxx" -chkp-sic = "xxxxx" +gwlb-vmss-agreement = "PLEASE ENTER true or false" # false # Have you ever deployed a GWLB VMSS? set to false if not +chkp-admin-pwd = "PLEASE ENTER CHKP ADMIN PASSWORD" # "xxxxx" +chkp-sic = "PLEASE ENTER CHKP SIC" # "xxxxx" diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/main.tf b/contrib/terraform/azure/vmss-new-vnet-with-peer/main.tf index f114b8ba..8b3cd410 100755 --- a/contrib/terraform/azure/vmss-new-vnet-with-peer/main.tf +++ b/contrib/terraform/azure/vmss-new-vnet-with-peer/main.tf @@ -176,6 +176,11 @@ resource "random_id" "randomId" { byte_length = 8 } resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { + blob_properties { + delete_retention_policy { + days = 7 + } + } name = "diag${random_id.randomId.hex}" resource_group_name = module.common.resource_group_name location = module.common.resource_group_location diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars b/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars index c227cb53..8fda9c83 100755 --- a/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars +++ b/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars @@ -1,29 +1,29 @@ -resource_group_name = "checkpoint-vmss-terraform" -location = "eastus" -vmss_name = "checkpoint-vmss-terraform" -vnet_name = "checkpoint-vmss-vnet" -address_space = "172.16.0.0/16" -subnet_prefixes = ["172.16.1.0/24","172.16.2.0/24"] -backend_lb_IP_address = 4 -admin_password = "xxxxxxxxxx" -sic_key = "xxxxxxxxxx" -vm_size = "Standard_D3_v2" -disk_size = "110" -vm_os_sku = "sg-byol" -vm_os_offer = "check-point-cg-r8040" -os_version = "R80.40" -bootstrap_script = "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" -allow_upload_download = true -disable_password_authentication = false -availability_zones_num = "1" -minimum_number_of_vm_instances = 2 -maximum_number_of_vm_instances = 10 -management_name = "mgmt" -management_IP = "192.168.100.4" -management_interface = "eth0" -configuration_template_name = "vmss_template" -notification_email = "name@company.com" -frontend_load_distribution = "Default" -backend_load_distribution = "Default" -mgmt_vnet_name = "mgmt-vnet" -mgmt_resource_group_name = "management" +resource_group_name = "PLEASE ENTER RESOURCE GROUP NAME" # "checkpoint-vmss-terraform" +location = "PLEASE ENTER LOCATION" # "eastus" +vmss_name = "PLEASE ENTER SCALE SET NAME" # "checkpoint-vmss-terraform" +vnet_name = "PLEASE ENTER VIRTUAL NETWORK NAME" # "checkpoint-vmss-vnet" +address_space = "PLEASE ENTER ADDRESS SPACE" # "172.16.0.0/16" +subnet_prefixes = "PLEASE ENTER SUBNET PREFIXES" # ["172.16.1.0/24","172.16.2.0/24"] +backend_lb_IP_address = "PLEASE ENTER BACKEND LB IP ADDRESS POSITIONAL NUMBER" # 4 +admin_password = "PLEASE ENTER ADMIN PASSWORD" # "xxxxxxxxxx" +sic_key = "PLEASE ENTER SIC KEY" # "xxxxxxxxxx" +vm_size = "PLEASE ENTER VM SIZE" # "Standard_D3_v2" +disk_size = "PLEASE ENTER DISK SIZE" # "110" +vm_os_sku = "PLEASE ENTER VM SKU" # "sg-byol" +vm_os_offer = "PLEASE ENTER VM OFFER" # "check-point-cg-r8040" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R80.40" +bootstrap_script = "PLEASE ENTER CUSTOM SCRIPT OR LEAVE EMPTY DOUBLE QUOTES" # "touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt" +allow_upload_download = "PLEASE ENTER true or false" # true +disable_password_authentication = "PLEASE ENTER true or false" # false +availability_zones_num = "PLEASE ENTER NUMBER OF AVAILABILITY ZONES" # "1" +minimum_number_of_vm_instances = "PLEASE ENTER MINIMUM NUMBER OF VM INSTANCES" # 2 +maximum_number_of_vm_instances = "PLEASE ENTER MAXIMUM NUMBER OF VM INSTANCES" # 10 +management_name = "PLEASE ENTER MANAGEMENT NAME" # "mgmt" +management_IP = "PLEASE ENTER MANAGEMENT IP" # "192.168.100.4" +management_interface = "PLEASE ENTER MANAGEMENT INTERFACE" # "eth0" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "vmss_template" +notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "name@company.com" +frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" +mgmt_vnet_name = "PLEASE ENTER MANAGEMENT VIRTUAL NETWORK NAME" # "mgmt-vnet" +mgmt_resource_group_name = "PLEASE ENTER MANAGEMENT RESOURCE GROUP NAME" # "management" diff --git a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf index 16ec2197..d6dda38a 100644 --- a/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf +++ b/deprecated/terraform/gcp/R8040-R81/autoscale-into-new-vpc/main.tf @@ -15,6 +15,7 @@ resource "google_compute_network" "external_network" { auto_create_subnetworks = false } resource "google_compute_subnetwork" "external_subnetwork" { + private_ip_google_access = true name = "${var.prefix}-ext-subnet-${random_string.mig_random_string.result}" ip_cidr_range = var.external_subnetwork_ip_cidr_range region = var.region @@ -26,6 +27,7 @@ resource "google_compute_network" "internal_network" { auto_create_subnetworks = false } resource "google_compute_subnetwork" "internal_subnetwork" { + private_ip_google_access = true name = "${var.prefix}-int-subnet-${random_string.mig_random_string.result}" ip_cidr_range = var.internal_subnetwork_ip_cidr_range region = var.region diff --git a/terraform/alicloud/cluster-master/README.md b/terraform/alicloud/cluster-master/README.md index 8c16dc10..010a8a35 100755 --- a/terraform/alicloud/cluster-master/README.md +++ b/terraform/alicloud/cluster-master/README.md @@ -63,8 +63,8 @@ Configure envrionment variables in Windows: | volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | | ram_role_name | A predefined RAM role name to attach to the cluster's security gateway instances | string | n/a | "" | no | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances | map(string) | n/a | {}} | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | | gateway_password_hash | (optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | @@ -161,7 +161,8 @@ ram_role_name = "" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/cluster/README.md b/terraform/alicloud/cluster/README.md index a703b75c..0df21dbd 100755 --- a/terraform/alicloud/cluster/README.md +++ b/terraform/alicloud/cluster/README.md @@ -56,7 +56,7 @@ Configure envrionment variables in Windows: | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | | ram_role_name | A predefined RAM role name to attach to the cluster's security gateway instances | string | n/a | "" | no | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway ECS Instances | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | | gateway_password_hash | (optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | @@ -145,7 +145,8 @@ ram_role_name = "" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | @@ -155,4 +156,4 @@ ram_role_name = "" ## License -This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details \ No newline at end of file +This project is licensed under the MIT License - see the [LICENSE](../../../LICENSE) file for details diff --git a/terraform/alicloud/cluster/cluster_member_a_userdata.yaml b/terraform/alicloud/cluster/cluster_member_a_userdata.yaml index 534d8e42..13d3d35d 100644 --- a/terraform/alicloud/cluster/cluster_member_a_userdata.yaml +++ b/terraform/alicloud/cluster/cluster_member_a_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenA}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenA}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/alicloud/cluster/cluster_member_b_userdata.yaml b/terraform/alicloud/cluster/cluster_member_b_userdata.yaml index 43c69a99..0a4c0633 100644 --- a/terraform/alicloud/cluster/cluster_member_b_userdata.yaml +++ b/terraform/alicloud/cluster/cluster_member_b_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"{OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenB}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py managementIpAddress=\"${ManagementIpAddress}\" sicKey=\"${SICKey}\" installationType=\"cluster\" osVersion=\"{OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" "smart1CloudToken=\"${TokenB}\"" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/alicloud/cluster/main.tf b/terraform/alicloud/cluster/main.tf index 5fa001d6..db2d9c93 100755 --- a/terraform/alicloud/cluster/main.tf +++ b/terraform/alicloud/cluster/main.tf @@ -79,7 +79,7 @@ resource "alicloud_instance" "member-b-instance" { resource "alicloud_network_interface" "member_a_mgmt_eni" { network_interface_name = format("%s-Member-A-management-eni", var.resources_tag_name != "" ? var.resources_tag_name : var.gateway_name) vswitch_id = var.mgmt_vswitch_id - security_group_ids = [ + security_group_ids = [ module.common_permissive_sg.permissive_sg_id] description = "eth2" } diff --git a/terraform/alicloud/gateway-master/README.md b/terraform/alicloud/gateway-master/README.md index 301c12a6..a90166fb 100755 --- a/terraform/alicloud/gateway-master/README.md +++ b/terraform/alicloud/gateway-master/README.md @@ -61,7 +61,7 @@ Configure envrionment variables in Windows: | volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | | ram_role_name | A predefined RAM role name to attach to the security gateway instance | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | | password_hash | Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) (optional) | string | n/a | "" | no | @@ -142,7 +142,8 @@ allocate_and_associate_eip = true | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/gateway/README.md b/terraform/alicloud/gateway/README.md index db7c32e2..32ba9dfc 100755 --- a/terraform/alicloud/gateway/README.md +++ b/terraform/alicloud/gateway/README.md @@ -53,7 +53,7 @@ Configure envrionment variables in Windows: | volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_efficiency" | no | | ram_role_name | A predefined RAM role name to attach to the security gateway instance | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | n/a | yes | | password_hash | Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) (optional) | string | n/a | "" | no | @@ -128,7 +128,8 @@ private_route_table = "rtb-12345678" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/management-master/README.md b/terraform/alicloud/management-master/README.md index ec200646..8e7ea6c2 100755 --- a/terraform/alicloud/management-master/README.md +++ b/terraform/alicloud/management-master/README.md @@ -49,7 +49,7 @@ Configure envrionment variables in Windows: | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_essd" | no | | ram_role_name | RAM role name to attach to the instance profile, leave it empty for automatic creation | string | n/a | "" | no | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance | map(string) | n/a | {} | no | -| version_license | Version and license of the Check Point Security Management | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| version_license | Version and license of the Check Point Security Management | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | password_hash | (Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | | hostname | (Optional) Management prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | n/a | no | @@ -121,10 +121,10 @@ bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230512 | New images with Jumbo Hotfix | | 20230420 | Change alicloud terraform provider version to 1.203.0 | | 20230330 | - Added support of ECS disk category.
- Stability fixes. | | 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | diff --git a/terraform/alicloud/management/README.md b/terraform/alicloud/management/README.md index ccff6e8f..0c07c661 100755 --- a/terraform/alicloud/management/README.md +++ b/terraform/alicloud/management/README.md @@ -49,7 +49,7 @@ Configure envrionment variables in Windows: | disk_category | The ECS disk category | string | - cloud
- cloud_efficiency
- cloud_ssd,
- cloud_essd | "cloud_essd" | no | | ram_role_name | RAM role name to attach to the instance profile, leave it empty for automatic creation | string | n/a | "" | no | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Management ECS Instance | map(string) | n/a | {} | no | -| version_license | Version and license of the Check Point Security Management | string | - R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | | +| version_license | Version and license of the Check Point Security Management | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | password_hash | (Optional) Admin user's password hash (use command \"openssl passwd -6 PASSWORD\" to get the PASSWORD's hash) | string | n/a | "" | no | | hostname | (Optional) Management prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | n/a | no | @@ -114,13 +114,13 @@ bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20230830 | Change default Check Point version to R81.20 | +| 20240704 | R81 version deprecation | +| 20230829 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230512 | New images with Jumbo Hotfix | | 20230420 | Change alicloud terraform provider version to 1.203.0 | | 20230330 | - Added support of ECS disk category.
- Stability fixes. | -| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | +| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | | | | | 20211011 | First release of Check Point CloudGaurd Management Terraform deployment into an existing VPC in Alibaba cloud. | ## License diff --git a/terraform/alicloud/management/management_userdata.yaml b/terraform/alicloud/management/management_userdata.yaml index 9d957968..46540bbd 100644 --- a/terraform/alicloud/management/management_userdata.yaml +++ b/terraform/alicloud/management/management_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" primary=\"${IsPrimary}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" "overTheInternet=\"${GatewayManagement}\"" bootstrapScript64=\"${BootstrapScript}\" + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" primary=\"${IsPrimary}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" "overTheInternet=\"${GatewayManagement}\"" bootstrapScript64=\"${BootstrapScript}\" diff --git a/terraform/alicloud/modules/common/gateway_instance/gateway_userdata.yaml b/terraform/alicloud/modules/common/gateway_instance/gateway_userdata.yaml index 312ca453..cd294845 100644 --- a/terraform/alicloud/modules/common/gateway_instance/gateway_userdata.yaml +++ b/terraform/alicloud/modules/common/gateway_instance/gateway_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenKey}\"" installationType=\"gateway\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20230830\" templateName=\"gateway\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenKey}\"" installationType=\"gateway\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"gateway\" templateType=\"terraform\" shell=\"${Shell}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/alicloud/modules/common/version_license/main.tf b/terraform/alicloud/modules/common/version_license/main.tf index 94d144cd..dfe4739e 100755 --- a/terraform/alicloud/modules/common/version_license/main.tf +++ b/terraform/alicloud/modules/common/version_license/main.tf @@ -1,14 +1,9 @@ locals { gw_versions = [ - //"R81-PAYG-NGTP", - // "R81-PAYG-NGTX", - "R81-BYOL", "R81.10-BYOL", "R81.20-BYOL" ] mgmt_versions = [ - //"R81-PAYG", - "R81-BYOL", "R81.10-BYOL", "R81.20-BYOL" ] diff --git a/terraform/alicloud/modules/images/images.yaml b/terraform/alicloud/modules/images/images.yaml index c2eb1d52..126c819f 100755 --- a/terraform/alicloud/modules/images/images.yaml +++ b/terraform/alicloud/modules/images/images.yaml @@ -5,18 +5,12 @@ Parameters: Type: String Default: R81.20-BYOL-GW AllowedValues: - - R81-BYOL-GW - - R81-BYOL-MGMT - R81.10-BYOL-GW - R81.10-BYOL-MGMT - R81.20-BYOL-GW - R81.20-BYOL-MGMT Mappings: ConverterMap: - R81-BYOL-GW: - Value: R81BYOLGW - R81-BYOL-MGMT: - Value: R81BYOLMGMT R81.10-BYOL-GW: Value: R8110BYOLGW R81.10-BYOL-MGMT: @@ -27,183 +21,131 @@ Mappings: Value: R8120BYOLMGMT RegionMap: cn-hongkong: - R81BYOLMGMT: m-j6c55b1lpz95colzzz1y - R81BYOLGW: m-j6c3gd3gcahojs40842v R8110BYOLMGMT: m-j6c5n6p0tkx8clx72qes R8110BYOLGW: m-j6c0x6ugw2012axbdmkn R8120BYOLMGMT: m-j6c2gv0tohwb5otjzbk4 R8120BYOLGW: m-j6cdnsm44k0csckg4cxa ap-southeast-1: - R81BYOLMGMT: m-t4ngdphpnhzw065e30jt - R81BYOLGW: m-t4n99ag8zbinnc7n7xmw R8110BYOLMGMT: m-t4n9x963l2fx13d4mzi8 R8110BYOLGW: m-t4ndsvficp1ukrcpt4as R8120BYOLMGMT: m-t4n3m9t1icbv1ptf8b67 R8120BYOLGW: m-t4nj16t8nnlp7a70214i us-west-1: - R81BYOLMGMT: m-rj95ffd9q3c8u7rpc7v5 - R81BYOLGW: m-rj9eblv5oe0ypm77no86 R8110BYOLMGMT: m-rj9ebcmy6gxp3lzkjnrp R8110BYOLGW: m-rj952h5pzgaecqhg9h6u R8120BYOLMGMT: m-rj92n7t0j5uvmss2dak5 R8120BYOLGW: m-rj99hmyezcyqa0in2us9 us-east-1: - R81BYOLMGMT: m-0xi064illsngi8q7ejln - R81BYOLGW: m-0xiiv7m3m3ex8zai0lq4 R8110BYOLMGMT: m-0xie3j6n8rxa26v6abni R8110BYOLGW: m-0xiebcmy6gxpiyg830vh R8120BYOLMGMT: m-0xihsclzmkgsxpsmfil2 R8120BYOLGW: m-0xickak3e8yimpt90lh9 ap-southeast-2: - R81BYOLMGMT: m-p0w0pl2rajygi6otl2mh - R81BYOLGW: m-p0w78ynl3rpgo1yq43qf R8110BYOLMGMT: m-p0w7z34zl8gl2nmgzo75 R8110BYOLGW: m-p0w2nhgtaqxil6bruwe2 R8120BYOLMGMT: m-p0w2mgbmrn1pq4973ncq R8120BYOLGW: m-p0wd45q8v82grbipwqkw ap-southeast-3: - R81BYOLMGMT: m-8psi42zrfpq57cibgu2b - R81BYOLGW: m-8ps8swns48itw97zsb2i R8110BYOLMGMT: m-8psc710cdd9x9guiajuk R8110BYOLGW: m-8ps6mel7llq3ffzc2txa R8120BYOLMGMT: m-8psc710cdd9x6k9vbn5m R8120BYOLGW: m-8psf1zkz08byz41qrt1r ap-southeast-5: - R81BYOLMGMT: m-k1aajdkea2t5oyxicbu8 - R81BYOLGW: m-k1afqua8zzbgdaosx7sf R8110BYOLMGMT: m-k1ahug645c79svl6tgbp R8110BYOLGW: m-k1a6n0hj1qidjiig80o0 R8120BYOLMGMT: m-k1ahgt585wlm71lmpmg1 R8120BYOLGW: m-k1a20f2u7nspfcja9mfc ap-southeast-6: - R81BYOLMGMT: m-5ts832hgbk52wwnxzjlx - R81BYOLGW: m-5tsf5buudxrwbijypr0v R8110BYOLMGMT: m-5tsa5qwchhf7q22qj685 R8110BYOLGW: m-5tsdw01mce246abvrnes R8120BYOLMGMT: m-5ts5ukwjgsl6t34hx7po R8120BYOLGW: m-5tsa5qwchhf7pw5n70as ap-northeast-1: - R81BYOLMGMT: m-6we8l9kvu9shqf3j5v4e - R81BYOLGW: m-6we42rtltap69nckfynw R8110BYOLMGMT: m-6we20qh4jffzabapyyle R8110BYOLGW: m-6wefezctjbied9npzp1n R8120BYOLMGMT: m-6weihbzpoyt5h6i2i42e R8120BYOLGW: m-6we215381e51fkneyv5v eu-central-1: - R81BYOLMGMT: m-gw81j322yjmx03hq26qt - R81BYOLGW: m-gw82fm7sbwj7x6fpj1mn R8110BYOLMGMT: m-gw89gvg18gk6nzo3gxe1 R8110BYOLGW: m-gw8divjg7azjl2ndt34v R8120BYOLMGMT: m-gw8csbodb1ntgbtu653c R8120BYOLGW: m-gw83wxmsb5524ke9f6m7 eu-west-1: - R81BYOLMGMT: m-d7ocob57ud2nqiv9fk8w - R81BYOLGW: m-d7oez9xgn0qg5g815tip R8110BYOLMGMT: m-d7o7nj4f81gs8cyo52jd R8110BYOLGW: m-d7o7nj4f81gsnpfbofnh R8120BYOLMGMT: m-d7o63e77fokjsv4aq4kt R8120BYOLGW: m-d7oj29ec4xx04sr8h61z me-east-1: - R81BYOLMGMT: m-eb35op3wyu89kabry2zw - R81BYOLGW: m-eb35op3wyu89iv0z0nmz R8110BYOLMGMT: m-eb33tyrfiy726a0xlw6g R8110BYOLGW: m-eb30m4ho9mkzfb3xi78i R8120BYOLMGMT: m-eb3bbb1nen46tqmcujmn R8120BYOLGW: m-eb3dphy5uzm33cduxr7i ap-south-1: - R81BYOLMGMT: m-a2d16a0v0ms9mg5xh1nm - R81BYOLGW: m-a2didx39bhgf547thni0 R8110BYOLMGMT: m-a2d4ffz0q8dflg62j0zq R8110BYOLGW: m-a2d9j14yemliag92m9d1 R8120BYOLMGMT: m-a2d1e5s7uy9vv5a6n9cn R8120BYOLGW: m-a2d1e5s7uy9vxvxqa04e ap-southeast-7: - R81BYOLMGMT: m-0jo742iyh0qbzg51b6fd - R81BYOLGW: m-0joian1mgt9qt2lpvfnk R8110BYOLMGMT: m-0jo3qwrwsdx3663is0b4 R8110BYOLGW: m-0jogq1yzljp8ziw4caci R8120BYOLMGMT: m-0jo67k42jvg301wis5ol R8120BYOLGW: m-0jo5t1ypg4zy4h12i9c5 ap-northeast-2: - R81BYOLMGMT: m-mj75cxsn1dhdiqhfc3a0 - R81BYOLGW: m-mj7bybnr5b9gebqrf3xt R8110BYOLMGMT: m-mj7h0j7db1ryrwczg9ef R8110BYOLGW: m-mj73osasl4gyi0zqscr5 R8120BYOLMGMT: m-mj7aktw6610pznjgb16z R8120BYOLGW: m-mj79jylrqomj0fv99s3b cn-qingdao: - R81BYOLMGMT: m-m5e1i33z6ohq98tllukn - R81BYOLGW: m-m5eb1zyo5cjbvte7ovay R8110BYOLMGMT: m-m5eftm32pjq4ghtwcn25 R8110BYOLGW: m-m5ef0hxxec3ws2c2y26b R8120BYOLMGMT: m-m5ebt96quorb2gj7dhku R8120BYOLGW: m-m5eftm32pjq4g9xrwf5o cn-beijing: - R81BYOLMGMT: m-2ze5d2jit72gotjw5d77 - R81BYOLGW: m-2zec8i2qli4cnqfw9e3o R8110BYOLMGMT: m-2zehvbpbae19t51owc0j R8110BYOLGW: m-2zeiwvllkl9jybavtmey R8120BYOLMGMT: m-2ze1781062lxfwe35d1p R8120BYOLGW: m-2ze347cq3f6fg3udyb1p cn-zhangjiakou: - R81BYOLMGMT: m-8vb1rjkshxdaynvqbexj - R81BYOLGW: m-8vb1rjkshxdax8kxdzkk R8110BYOLMGMT: m-8vb83tbc4hwpesbvte9d R8110BYOLGW: m-8vbblzj10mzvpnkzdint R8120BYOLMGMT: m-8vbeoj3rrq2tm6o5bhaa R8120BYOLGW: m-8vbd1bffbjhlxjkb0k4i cn-huhehaote: - R81BYOLMGMT: m-hp309790we62uhpo5eed - R81BYOLGW: m-hp3ab2tvfxuar5snxu2r R8110BYOLMGMT: m-hp3h3tzxij7kl9tdrqg2 R8110BYOLGW: m-hp325dwey9rn4tyiyuyu R8120BYOLMGMT: m-hp31ci7e1eeaj062wki0 R8120BYOLGW: m-hp31ci7e1eealqtmjb9n cn-wulanchabu: - R81BYOLMGMT: m-0jlhwuucdujv3wee7m96 - R81BYOLGW: m-0jle5qxpr97s1c64e72k R8110BYOLMGMT: m-0jl54w11sr4odheytky1 R8110BYOLGW: m-0jlbavg2r5fjc4jxypp7 R8120BYOLMGMT: m-0jl54w11sr4oakubuo94 R8120BYOLGW: m-0jlbavg2r5fiwm6736o3 cn-hangzhou: - R81BYOLMGMT: m-bp14kps2wrk6qquv5ok0 - R81BYOLGW: m-bp1aa9u6zcazi4o1hnjh R8110BYOLMGMT: m-bp1dz2nq9fqppcf8smpk R8110BYOLGW: m-bp1hamqhfny1smyl8ql7 R8120BYOLMGMT: m-bp149dep83kgo5p0dw3l R8120BYOLGW: m-bp1gvq0d0413vbnakoqj cn-shanghai: - R81BYOLMGMT: m-uf6cj9tqmxx1bsfmbu45 - R81BYOLGW: m-uf63qkdigbprn96zy3vm R8110BYOLMGMT: m-uf655j7a9r7otwa2xemv R8110BYOLGW: m-uf6idj2b3zt57omxvzbr R8120BYOLMGMT: m-uf62vrhc5bapfoy9lw7n R8120BYOLGW: m-uf6c9vxp1n58y56ep033 cn-shenzhen: - R81BYOLMGMT: m-wz9d9s75jsh11z089uuj - R81BYOLGW: m-wz9czejz43gyhdztsjnr R8110BYOLMGMT: m-wz95gswem9lea2z0d9se R8110BYOLGW: m-wz93e5pwshkmiv35y9ii R8120BYOLMGMT: m-wz9am290ax9js6dfdt5o R8120BYOLGW: m-wz94fs2enyvm6qhx3ged cn-heyuan: - R81BYOLMGMT: m-f8z61z784gwfm1fhxgre - R81BYOLGW: m-f8z7wvp6hhvsvevtpb0j R8110BYOLMGMT: m-f8z5o7741si10yq0piws R8110BYOLGW: m-f8z985hmyc9d8951pr76 R8120BYOLMGMT: m-f8zj0s3cyg3glnlz414g R8120BYOLGW: m-f8z5o7741si10ssxdczf cn-guangzhou: - R81BYOLMGMT: m-7xv95xjo0yd0lg4y1z9p - R81BYOLGW: m-7xv95xjo0yd0k0u54jwr R8110BYOLMGMT: m-7xv4bih29ge5i2je9amd R8110BYOLGW: m-7xv7i7fhzogppdgxa2cc R8120BYOLMGMT: m-7xv3lyr4gpzmp8ei0qgi R8120BYOLGW: m-7xv7i7fhzogp9v36ejbr cn-chengdu: - R81BYOLMGMT: m-2vcho1h20xnncjlroavq - R81BYOLGW: m-2vc0m9vq9oty74yz83d4 R8110BYOLMGMT: m-2vc13w2rjk7p9o285gtj R8110BYOLGW: m-2vc13w2rjk7pp0ivotxs R8120BYOLMGMT: m-2vc0nlbyccv29t5ql0oh diff --git a/terraform/aws/autoscale-gwlb/README.md b/terraform/aws/autoscale-gwlb/README.md index a156f3cc..1ca4b595 100755 --- a/terraform/aws/autoscale-gwlb/README.md +++ b/terraform/aws/autoscale-gwlb/README.md @@ -116,36 +116,36 @@ secret_key = "my-secret-key" ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| -| prefix | (Optional) Instances name prefix | string | n/a | "" | no | -| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | -| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | -| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | -| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | -| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|------------------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | +| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | +| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | +| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | ## Outputs | Name | Description | @@ -167,18 +167,20 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20220414 | First release of Check Point Auto Scaling GWLB Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240414 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240417 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20220414 | First release of Check Point Auto Scaling GWLB Terraform module for AWS | ## License diff --git a/terraform/aws/autoscale-gwlb/locals.tf b/terraform/aws/autoscale-gwlb/locals.tf index ef1abdf2..2c811532 100755 --- a/terraform/aws/autoscale-gwlb/locals.tf +++ b/terraform/aws/autoscale-gwlb/locals.tf @@ -42,7 +42,6 @@ locals { gateway_SICkey_base64 = base64encode(var.gateway_SICKey) gateway_password_hash_base64 = base64encode(var.gateway_password_hash) maintenance_mode_password_hash_base64 = base64encode(var.gateway_maintenance_mode_password_hash) - is_gwlb_ami = length(regexall(".*R80.40.*", var.gateway_version)) > 0 } resource "null_resource" "tags_as_list_of_maps" { diff --git a/terraform/aws/autoscale-gwlb/main.tf b/terraform/aws/autoscale-gwlb/main.tf index 3c7b7948..67691dca 100755 --- a/terraform/aws/autoscale-gwlb/main.tf +++ b/terraform/aws/autoscale-gwlb/main.tf @@ -7,7 +7,7 @@ provider "aws" { module "amis" { source = "../modules/amis" version_license = var.gateway_version - amis_url = local.is_gwlb_ami == true ? "https://cgi-cfts.s3.amazonaws.com/gwlb/amis-gwlb.yaml" : "https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml" + amis_url = "https://cgi-cfts-staging.s3.amazonaws.com/utils/amis.yaml" } @@ -91,28 +91,28 @@ resource "aws_autoscaling_group" "asg" { health_check_type = "ELB" tag { - key = "Name" - value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) - propagate_at_launch = true + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) + propagate_at_launch = true } tag { - key = "x-chkp-tags" - value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) - propagate_at_launch = true + key = "x-chkp-tags" + value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) + propagate_at_launch = true } tag { - key = "x-chkp-topology" - value = "internal" - propagate_at_launch = true + key = "x-chkp-topology" + value = "internal" + propagate_at_launch = true } tag { - key = "x-chkp-solution" - value = "autoscale_gwlb" - propagate_at_launch = true - } + key = "x-chkp-solution" + value = "autoscale_gwlb" + propagate_at_launch = true + } dynamic "tag" { for_each = var.instances_tags diff --git a/terraform/aws/autoscale-gwlb/terraform.tfvars b/terraform/aws/autoscale-gwlb/terraform.tfvars index 4cced958..4938ae44 100755 --- a/terraform/aws/autoscale-gwlb/terraform.tfvars +++ b/terraform/aws/autoscale-gwlb/terraform.tfvars @@ -16,7 +16,7 @@ configuration_template = "tmpl_env1" // --- EC2 Instances Configuration --- gateway_name = "asg_gateway" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" instances_tags = { key1 = "value1" diff --git a/terraform/aws/autoscale-gwlb/variables.tf b/terraform/aws/autoscale-gwlb/variables.tf index cb1a985c..82e7396a 100644 --- a/terraform/aws/autoscale-gwlb/variables.tf +++ b/terraform/aws/autoscale-gwlb/variables.tf @@ -78,7 +78,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/autoscale/README.md b/terraform/aws/autoscale/README.md index eb13ecd4..38d4d034 100755 --- a/terraform/aws/autoscale/README.md +++ b/terraform/aws/autoscale/README.md @@ -125,37 +125,37 @@ secret_key = "my-secret-key" ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| -| prefix | (Optional) Instances name prefix | string | n/a | "" | no | -| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | -| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | -| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | -| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | -| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| proxy_elb_type | Type of ELB to create as an HTTP/HTTPS outbound proxy | string | - none
- internal
- internet-facing | none | no | -| proxy_elb_port | The TCP port on which the proxy will be listening | number | n/a | 8080 | no | -| proxy_elb_clients | The CIDR range of the clients of the proxy | string | n/a | 0.0.0.0/0 | no | -| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | +| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | +| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | +| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| proxy_elb_type | Type of ELB to create as an HTTP/HTTPS outbound proxy | string | - none
- internal
- internet-facing | none | no | +| proxy_elb_port | The TCP port on which the proxy will be listening | number | n/a | 8080 | no | +| proxy_elb_clients | The CIDR range of the clients of the proxy | string | n/a | 0.0.0.0/0 | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | ## Outputs @@ -179,20 +179,22 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20200318 | First release of Check Point Auto Scaling Terraform module for AWS | -| 20210309 | AWS Terraform modules refactor | -| 20210329 | Stability fixes | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230521 | Change default shell for the admin user to /etc/cli.sh | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240414 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240417 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | +| 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | Stability fixes | +| 20210309 | AWS Terraform modules refactor | +| 20200318 | First release of Check Point Auto Scaling Terraform module for AWS | ## License diff --git a/terraform/aws/autoscale/asg_userdata.yaml b/terraform/aws/autoscale/asg_userdata.yaml index ea6de749..4c6633c3 100755 --- a/terraform/aws/autoscale/asg_userdata.yaml +++ b/terraform/aws/autoscale/asg_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"autoscale\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"autoscale\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" diff --git a/terraform/aws/autoscale/main.tf b/terraform/aws/autoscale/main.tf index dea10eca..68abbfe0 100755 --- a/terraform/aws/autoscale/main.tf +++ b/terraform/aws/autoscale/main.tf @@ -91,16 +91,16 @@ resource "aws_autoscaling_group" "asg" { health_check_type = "ELB" tag { - key = "Name" - value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) - propagate_at_launch = true + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.gateway_name) + propagate_at_launch = true } tag { - key = "x-chkp-tags" - value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) - propagate_at_launch = true - } + key = "x-chkp-tags" + value = format("management=%s:template=%s:ip-address=%s", var.management_server, var.configuration_template, var.gateways_provision_address_type) + propagate_at_launch = true + } dynamic "tag" { for_each = var.instances_tags diff --git a/terraform/aws/autoscale/terraform.tfvars b/terraform/aws/autoscale/terraform.tfvars index d513fcd5..d4716480 100755 --- a/terraform/aws/autoscale/terraform.tfvars +++ b/terraform/aws/autoscale/terraform.tfvars @@ -15,7 +15,7 @@ configuration_template = "tmpl_env1" // --- EC2 Instances Configuration --- gateway_name = "asg_gateway" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" instances_tags = { key1 = "value1" diff --git a/terraform/aws/autoscale/variables.tf b/terraform/aws/autoscale/variables.tf index 81d256ab..2244fcbb 100755 --- a/terraform/aws/autoscale/variables.tf +++ b/terraform/aws/autoscale/variables.tf @@ -66,7 +66,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/cluster-master/README.md b/terraform/aws/cluster-master/README.md index cfabfd18..7354af59 100755 --- a/terraform/aws/cluster-master/README.md +++ b/terraform/aws/cluster-master/README.md @@ -171,7 +171,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -203,18 +203,19 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Cluster Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Security Cluster Master Terraform module for AWS | ## License diff --git a/terraform/aws/cluster-master/terraform.tfvars b/terraform/aws/cluster-master/terraform.tfvars index 1e7b2c78..491c61dd 100755 --- a/terraform/aws/cluster-master/terraform.tfvars +++ b/terraform/aws/cluster-master/terraform.tfvars @@ -12,7 +12,7 @@ subnets_bit_length = 8 // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" allocate_and_associate_eip = true volume_size = 100 diff --git a/terraform/aws/cluster-master/variables.tf b/terraform/aws/cluster-master/variables.tf index d1faf72c..af1995e4 100755 --- a/terraform/aws/cluster-master/variables.tf +++ b/terraform/aws/cluster-master/variables.tf @@ -46,7 +46,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/cluster/README.md b/terraform/aws/cluster/README.md index 073c7fe7..ecb44584 100755 --- a/terraform/aws/cluster/README.md +++ b/terraform/aws/cluster/README.md @@ -132,37 +132,37 @@ secret_key = "my-secret-key" - In Smart Console: reset SIC with the re-deployed member and install policy ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | -| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | -| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | -| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | -| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | -| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|-----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | ## Outputs | Name | Description | @@ -181,20 +181,20 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Cluster Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | - +| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Security Cluster Terraform module for AWS | ## License diff --git a/terraform/aws/cluster/cluster_member_a_userdata.yaml b/terraform/aws/cluster/cluster_member_a_userdata.yaml index 6329e2cf..1fa105c0 100755 --- a/terraform/aws/cluster/cluster_member_a_userdata.yaml +++ b/terraform/aws/cluster/cluster_member_a_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberAPublicAddress}\" templateVersion=\"20231012\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberAPublicAddress}\" templateVersion=\"20240704\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cluster/terraform.tfvars b/terraform/aws/cluster/terraform.tfvars index 179fe10b..ea7aa4d9 100755 --- a/terraform/aws/cluster/terraform.tfvars +++ b/terraform/aws/cluster/terraform.tfvars @@ -8,7 +8,7 @@ private_route_table = "rtb-12345678" // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" allocate_and_associate_eip = true volume_size = 100 diff --git a/terraform/aws/cluster/variables.tf b/terraform/aws/cluster/variables.tf index 1b515744..af28f15c 100755 --- a/terraform/aws/cluster/variables.tf +++ b/terraform/aws/cluster/variables.tf @@ -44,7 +44,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/cme-iam-role-gwlb/README.md b/terraform/aws/cme-iam-role-gwlb/README.md index 2d6e639b..ae261614 100644 --- a/terraform/aws/cme-iam-role-gwlb/README.md +++ b/terraform/aws/cme-iam-role-gwlb/README.md @@ -89,12 +89,11 @@ secret_key = "my-secret-key" ## Revision History In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) -| Template Version | Description | -|------------------|-------------------------------------------------------------------| -| 20230926 | CME instance profile for IAM Role | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240507 | Add ec2:DescribeRegions read permission to the IAM role policy | - +| Template Version | Description | +|------------------|--------------------------------------------------------------------| +| 20240507 | Add ec2:DescribeRegions read permission to the IAM role policy | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230926 | CME instance profile for IAM Role | ## License diff --git a/terraform/aws/cme-iam-role/README.md b/terraform/aws/cme-iam-role/README.md index 203326cb..bc7f0f58 100755 --- a/terraform/aws/cme-iam-role/README.md +++ b/terraform/aws/cme-iam-role/README.md @@ -91,11 +91,10 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|--------------------------------------------------------------------| -| 20210309 | First release of Check Point CME IAM Role Terraform module for AWS | -| 20230514 | CME instance profile for IAM Role | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20240507 | Add ec2:DescribeRegions read permission to the IAM role policy | - +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230514 | CME instance profile for IAM Role | +| 20210309 | First release of Check Point CME IAM Role Terraform module for AWS | ## License diff --git a/terraform/aws/cross-az-cluster-master/README.md b/terraform/aws/cross-az-cluster-master/README.md index 9209ec51..ce475b0d 100755 --- a/terraform/aws/cross-az-cluster-master/README.md +++ b/terraform/aws/cross-az-cluster-master/README.md @@ -202,17 +202,17 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20221123 | First release of Check Point Security Cross AZ Cluster Master Terraform module for AWS | -| 20221123 | Changed default version and added instances types | -| 20221123 | R81.20 version support | -| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20221123 | R81.20 version support | +| 20221123 | Changed default version and added instances types | +| 20221123 | First release of Check Point Security Cross AZ Cluster Master Terraform module for AWS | ## License diff --git a/terraform/aws/cross-az-cluster-master/terraform.tfvars b/terraform/aws/cross-az-cluster-master/terraform.tfvars index 28cb64a3..a658cb8b 100755 --- a/terraform/aws/cross-az-cluster-master/terraform.tfvars +++ b/terraform/aws/cross-az-cluster-master/terraform.tfvars @@ -14,7 +14,7 @@ subnets_bit_length = 8 // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" volume_size = 100 volume_encryption = "alias/aws/ebs" diff --git a/terraform/aws/cross-az-cluster-master/variables.tf b/terraform/aws/cross-az-cluster-master/variables.tf index d49cf50c..783f77ff 100755 --- a/terraform/aws/cross-az-cluster-master/variables.tf +++ b/terraform/aws/cross-az-cluster-master/variables.tf @@ -46,7 +46,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/cross-az-cluster/README.md b/terraform/aws/cross-az-cluster/README.md index f473732d..ed0737da 100755 --- a/terraform/aws/cross-az-cluster/README.md +++ b/terraform/aws/cross-az-cluster/README.md @@ -178,18 +178,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20221123 | First release of Check Point Security Cross AZ Cluster Terraform module for AWS | -| 20221123 | Changed default version and added instances types | -| 20221123 | R81.20 version support | -| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20221123 | R81.20 version support | +| 20221123 | Changed default version and added instances types | +| 20221123 | First release of Check Point Security Cross AZ Cluster Terraform module for AWS | ## License diff --git a/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml index 1a3095e2..f9a926c5 100755 --- a/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml +++ b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberAPublicAddress}\" otherMemberIp=\"${MemberBPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberAPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberBPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240310\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberAPublicAddress}\" otherMemberIp=\"${MemberBPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberAPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberBPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml index 9ec9d23a..a374aaa6 100755 --- a/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml +++ b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberBPublicAddress}\" otherMemberIp=\"${MemberAPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberBPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberAPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240310\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberBPublicAddress}\" otherMemberIp=\"${MemberAPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberBPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberAPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/terraform.tfvars b/terraform/aws/cross-az-cluster/terraform.tfvars index 8c6aff9b..6823b86f 100755 --- a/terraform/aws/cross-az-cluster/terraform.tfvars +++ b/terraform/aws/cross-az-cluster/terraform.tfvars @@ -8,7 +8,7 @@ private_route_table = "rtb-12345678" // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" volume_size = 100 volume_encryption = "alias/aws/ebs" diff --git a/terraform/aws/cross-az-cluster/variables.tf b/terraform/aws/cross-az-cluster/variables.tf index c2d66839..e32d7e96 100755 --- a/terraform/aws/cross-az-cluster/variables.tf +++ b/terraform/aws/cross-az-cluster/variables.tf @@ -44,7 +44,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/gateway-master/README.md b/terraform/aws/gateway-master/README.md index e6f56bec..00594f44 100755 --- a/terraform/aws/gateway-master/README.md +++ b/terraform/aws/gateway-master/README.md @@ -161,7 +161,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -198,18 +198,19 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Gateway Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Security Gateway Master Terraform module for AWS | ## License diff --git a/terraform/aws/gateway-master/terraform.tfvars b/terraform/aws/gateway-master/terraform.tfvars index a8eb1d58..f42c018e 100755 --- a/terraform/aws/gateway-master/terraform.tfvars +++ b/terraform/aws/gateway-master/terraform.tfvars @@ -12,7 +12,7 @@ subnets_bit_length = 8 // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Gateway-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" allocate_and_associate_eip = true volume_size = 100 diff --git a/terraform/aws/gateway-master/variables.tf b/terraform/aws/gateway-master/variables.tf index 1c00c4f3..61e7389c 100755 --- a/terraform/aws/gateway-master/variables.tf +++ b/terraform/aws/gateway-master/variables.tf @@ -46,7 +46,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateway" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/gateway/README.md b/terraform/aws/gateway/README.md index 0ee957ff..fefc7512 100755 --- a/terraform/aws/gateway/README.md +++ b/terraform/aws/gateway/README.md @@ -123,38 +123,38 @@ secret_key = "my-secret-key" ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| public_subnet_id | The public subnet of the security gateway | string | n/a | n/a | yes | -| private_subnet_id | The private subnet of the security gateway | string | n/a | n/a | yes | -| private_route_table | Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | -| gateway_name | (Optional) The name tag of the Security Gateway instance | string | n/a | Check-Point-Gateway-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| resources_tag_name | (optional) | string | n/a | "" | no | -| gateway_hostname | (Optional) Security Gateway prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| control_gateway_over_public_or_private_address | Determines if the Security Gateway is provisioned using its private or public address | string | - public
- private | private | no | -| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | "" | no | -| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | "" | no | -| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the security gateway | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the security gateway | string | n/a | n/a | yes | +| private_route_table | Sets '0.0.0.0/0' route to the Gateway instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instance | string | n/a | Check-Point-Gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_TokenKey | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| gateway_hostname | (Optional) Security Gateway prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| control_gateway_over_public_or_private_address | Determines if the Security Gateway is provisioned using its private or public address | string | - public
- private | private | no | +| management_server | (Optional) The name that represents the Security Management Server in the automatic provisioning configuration | string | n/a | "" | no | +| configuration_template | (Optional) A name of a Security Gateway configuration template in the automatic provisioning configuration | string | n/a | "" | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | ## Outputs @@ -173,18 +173,19 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Gateway Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Security Gateway Terraform module for AWS | ## License diff --git a/terraform/aws/gateway/terraform.tfvars b/terraform/aws/gateway/terraform.tfvars index 02b1f781..a6414963 100755 --- a/terraform/aws/gateway/terraform.tfvars +++ b/terraform/aws/gateway/terraform.tfvars @@ -8,7 +8,7 @@ private_route_table = "rtb-12345678" // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Gateway-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" allocate_and_associate_eip = true volume_size = 100 diff --git a/terraform/aws/gateway/variables.tf b/terraform/aws/gateway/variables.tf index 7d32ab1a..f06d4b05 100755 --- a/terraform/aws/gateway/variables.tf +++ b/terraform/aws/gateway/variables.tf @@ -44,7 +44,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateway" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/gwlb-master/README.md b/terraform/aws/gwlb-master/README.md index 4fcdeaa2..c84a3ee7 100755 --- a/terraform/aws/gwlb-master/README.md +++ b/terraform/aws/gwlb-master/README.md @@ -157,48 +157,47 @@ secret_key = "my-secret-key" ``` ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| -| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | -| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | -| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| volume_size | Instances volume size | number | n/a | 100 | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | -| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | -| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | -| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | -| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | -| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | -| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/ a | "" | no | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | -| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG | R81.20-BYOL | no | -| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | -| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -217,18 +216,19 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| -| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer master module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221215 | Support ASG Launch Template instead of Launch Configuration | -| 20230521 | Change default shell for the admin user to /etc/cli.sh | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230910 | Add bootstrap script execution option for deployed gateways | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20221215 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer master module for AWS | ## License diff --git a/terraform/aws/gwlb-master/terraform.tfvars b/terraform/aws/gwlb-master/terraform.tfvars index f0f13c92..d5e1c853 100755 --- a/terraform/aws/gwlb-master/terraform.tfvars +++ b/terraform/aws/gwlb-master/terraform.tfvars @@ -28,7 +28,7 @@ enable_cross_zone_load_balancing = "true" // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-GW-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" minimum_group_size = 2 maximum_group_size = 10 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/gwlb-master/variables.tf b/terraform/aws/gwlb-master/variables.tf index fd72c46c..bf51e406 100755 --- a/terraform/aws/gwlb-master/variables.tf +++ b/terraform/aws/gwlb-master/variables.tf @@ -135,7 +135,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The EC2 instance type for the Security Gateways." - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/gwlb/README.md b/terraform/aws/gwlb/README.md index 4363e8c9..46a142c0 100755 --- a/terraform/aws/gwlb/README.md +++ b/terraform/aws/gwlb/README.md @@ -172,7 +172,7 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | @@ -181,7 +181,7 @@ secret_key = "my-secret-key" | allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | | gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | @@ -208,20 +208,22 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------| -| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer module for AWS | -| 20220523 | Add support for cross zone load balancing | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230521 | Change default shell for the admin user to /etc/cli.sh | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230910 | Add bootstrap script execution option for deployed gateways | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20231022 | Fixed template to populate x-chkp-tags correctly | +| 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231022 | Fixed template to populate x-chkp-tags correctly | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | Change default shell for the admin user to /etc/cli.sh | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20220523 | Add support for cross zone load balancing | +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer module for AWS | ## License diff --git a/terraform/aws/gwlb/terraform.tfvars b/terraform/aws/gwlb/terraform.tfvars index 0e26ad11..daffb3e2 100755 --- a/terraform/aws/gwlb/terraform.tfvars +++ b/terraform/aws/gwlb/terraform.tfvars @@ -24,7 +24,7 @@ enable_cross_zone_load_balancing = "true" // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-GW-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" minimum_group_size = 2 maximum_group_size = 10 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/gwlb/variables.tf b/terraform/aws/gwlb/variables.tf index 5f099c6c..834842c2 100755 --- a/terraform/aws/gwlb/variables.tf +++ b/terraform/aws/gwlb/variables.tf @@ -124,7 +124,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The EC2 instance type for the Security Gateways." - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/management/README.md b/terraform/aws/management/README.md index dd57ea4d..8545ff85 100755 --- a/terraform/aws/management/README.md +++ b/terraform/aws/management/README.md @@ -152,7 +152,7 @@ secret_key = "my-secret-key" | iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | | predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | | sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | -| management_version | Management version and license | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | Management version and license | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | management_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | | management_hostname | (Optional) Security Management Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | @@ -182,18 +182,19 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Management Server Terraform module for AWS | -| 20210329 | Stability fixes | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20240207 | Added Log Server installation support | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240207 | Added Log Server installation support | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | Stability fixes | +| 20210309 | First release of Check Point Security Management Server Terraform module for AWS | ## License diff --git a/terraform/aws/management/management_userdata.yaml b/terraform/aws/management/management_userdata.yaml index 0f3801ff..cfd9e5dc 100755 --- a/terraform/aws/management/management_userdata.yaml +++ b/terraform/aws/management/management_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" "management_installation_type=\"${ManagementInstallationType}\"" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" overTheInternet=\"${PubMgmt}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" "management_installation_type=\"${ManagementInstallationType}\"" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" overTheInternet=\"${PubMgmt}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/mds/README.md b/terraform/aws/mds/README.md index 5da9667d..156aad68 100755 --- a/terraform/aws/mds/README.md +++ b/terraform/aws/mds/README.md @@ -147,7 +147,7 @@ secret_key = "my-secret-key" | iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | | predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | | sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | -| mds_version | Multi-Domain Server version and license | string | - R80.40-BYOL
- R81-BYOL
- R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| mds_version | Multi-Domain Server version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | | mds_admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | mds_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | | mds_hostname | (Optional) Multi-Domain Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | @@ -174,16 +174,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Multi-Domain Server Terraform module for AWS | -| 20210329 | Stability fixes | -| 20221123 | R81.20 version support | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221123 | R81.20 version support | +| 20210329 | Stability fixes | +| 20210309 | First release of Check Point Multi-Domain Server Terraform module for AWS | ## License diff --git a/terraform/aws/mds/mds_userdata.yaml b/terraform/aws/mds/mds_userdata.yaml index 3321cd60..cd0085c6 100755 --- a/terraform/aws/mds/mds_userdata.yaml +++ b/terraform/aws/mds/mds_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"mds\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"mds\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" primary=\"${IsPrimary}\" secondary=\"${IsSecondary}\" adminSubnet=\"${AdminSubnet}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"mds\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"mds\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" primary=\"${IsPrimary}\" secondary=\"${IsSecondary}\" adminSubnet=\"${AdminSubnet}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/modules/amis/main.tf b/terraform/aws/modules/amis/main.tf index 4e76baa3..19d136d2 100644 --- a/terraform/aws/modules/amis/main.tf +++ b/terraform/aws/modules/amis/main.tf @@ -4,10 +4,11 @@ locals { // Variables example: - // version_license = "R80.40-PAYG-NGTX" + // version_license = "R81.10-PAYG-NGTX" // RESULT: - // version_license_key = "R80.40-PAYG-NGTX-GW" - // version_license_value = "R8040PAYGNGTXGW" + // version_license_key = "R81.10-PAYG-NGTX-GW" + + // version_license_value = "R8110PAYGNGTXGW" 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 diff --git a/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml b/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml index 05538232..ba55e025 100755 --- a/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml +++ b/terraform/aws/modules/common/gateway_instance/gateway_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenKey}\"" installationType=\"gateway\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"gateway\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenKey}\"" installationType=\"gateway\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"gateway\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/modules/common/gateway_instance/variables.tf b/terraform/aws/modules/common/gateway_instance/variables.tf index 0e1a010c..5e6ac6bf 100755 --- a/terraform/aws/modules/common/gateway_instance/variables.tf +++ b/terraform/aws/modules/common/gateway_instance/variables.tf @@ -52,7 +52,7 @@ variable "gateway_version" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../instance_type" diff --git a/terraform/aws/modules/common/instance_type/main.tf b/terraform/aws/modules/common/instance_type/main.tf index 22fffe49..418d3415 100755 --- a/terraform/aws/modules/common/instance_type/main.tf +++ b/terraform/aws/modules/common/instance_type/main.tf @@ -350,4 +350,4 @@ locals { sa_values = var.chkp_type == "standalone" ? concat(local.gw_types, local.mgmt_types) : [] allowed_values = coalescelist(local.gw_values, local.mgmt_values, local.mds_values, local.sa_values , local.server_types) is_allowed_type = index(local.allowed_values, var.instance_type) -} \ No newline at end of file +} diff --git a/terraform/aws/modules/common/load_balancer/variables.tf b/terraform/aws/modules/common/load_balancer/variables.tf index 7cc6464e..2e143fc7 100755 --- a/terraform/aws/modules/common/load_balancer/variables.tf +++ b/terraform/aws/modules/common/load_balancer/variables.tf @@ -59,4 +59,4 @@ variable "health_check_protocol" { description = "The health check protocol" type = string default = null -} +} \ No newline at end of file diff --git a/terraform/aws/modules/common/version_license/main.tf b/terraform/aws/modules/common/version_license/main.tf index 43512f98..c0aaca14 100755 --- a/terraform/aws/modules/common/version_license/main.tf +++ b/terraform/aws/modules/common/version_license/main.tf @@ -1,11 +1,5 @@ locals { gw_versions = [ - "R80.40-BYOL", - "R80.40-PAYG-NGTP", - "R80.40-PAYG-NGTX", - "R81-BYOL", - "R81-PAYG-NGTP", - "R81-PAYG-NGTX", "R81.10-BYOL", "R81.10-PAYG-NGTP", "R81.10-PAYG-NGTX", @@ -14,35 +8,22 @@ locals { "R81.20-PAYG-NGTX" ] mgmt_versions = [ - "R80.40-BYOL", - "R80.40-PAYG", - "R81-BYOL", - "R81-PAYG", "R81.10-BYOL", "R81.10-PAYG", "R81.20-BYOL", "R81.20-PAYG" ] mds_versions = [ - "R80.40-BYOL", - "R81-BYOL", "R81.10-BYOL", "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 = [ - "R80.40-BYOL", - "R80.40-PAYG-NGTP", - "R80.40-PAYG-NGTX", "R81.20-BYOL", "R81.20-PAYG-NGTP", "R81.20-PAYG-NGTX" diff --git a/terraform/aws/modules/custom-autoscale/main.tf b/terraform/aws/modules/custom-autoscale/main.tf index e7d3decd..c361388d 100755 --- a/terraform/aws/modules/custom-autoscale/main.tf +++ b/terraform/aws/modules/custom-autoscale/main.tf @@ -43,9 +43,9 @@ resource "aws_autoscaling_group" "servers_group" { target_group_arns = local.provided_target_groups_condition ? [var.servers_target_groups] : [] tag { - key = "Name" - value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.server_name) - propagate_at_launch = true + key = "Name" + value = format("%s%s", var.prefix != "" ? format("%s-", var.prefix) : "", var.server_name) + propagate_at_launch = true } } resource "aws_autoscaling_policy" "scale_up_policy" { diff --git a/terraform/aws/qs-autoscale-master/README.md b/terraform/aws/qs-autoscale-master/README.md index 809de14a..6d140f0f 100755 --- a/terraform/aws/qs-autoscale-master/README.md +++ b/terraform/aws/qs-autoscale-master/README.md @@ -167,7 +167,6 @@ secret_key = "my-secret-key" ``` ## Inputs - | Name | Description | Type | Allowed values | Default | Required | |-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | @@ -240,18 +239,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Quick Start Auto Scaling Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20231127 | Add support for parameter admin shell | | 20240425 | Remove support for R81 and lower versions | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231127 | Add support for parameter admin shell | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Quick Start Auto Scaling Master Terraform module for AWS | ## License diff --git a/terraform/aws/qs-autoscale-master/terraform.tfvars b/terraform/aws/qs-autoscale-master/terraform.tfvars index 37a07774..6272f051 100755 --- a/terraform/aws/qs-autoscale-master/terraform.tfvars +++ b/terraform/aws/qs-autoscale-master/terraform.tfvars @@ -31,7 +31,7 @@ service_port = "80" admin_shell = "/etc/cli.sh" // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" gateways_min_group_size = 2 gateways_max_group_size = 8 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/qs-autoscale-master/variables.tf b/terraform/aws/qs-autoscale-master/variables.tf index 317b1c94..35071b1c 100755 --- a/terraform/aws/qs-autoscale-master/variables.tf +++ b/terraform/aws/qs-autoscale-master/variables.tf @@ -111,7 +111,7 @@ variable "admin_shell" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_gateway_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/qs-autoscale/README.md b/terraform/aws/qs-autoscale/README.md index adadaeff..68244779 100755 --- a/terraform/aws/qs-autoscale/README.md +++ b/terraform/aws/qs-autoscale/README.md @@ -154,47 +154,45 @@ secret_key = "my-secret-key" ``` ## Inputs - -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| -| prefix | (Optional) Instances name prefix | string | n/a | "" | no | -| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | -| vpc_id | Select an existing VPC | string | n/a | n/a | yes | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| provision_tag | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | quickstart | no | -| load_balancers_type | Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing | string | - Network Load Balancer
- Application Load Balancer
| Network Load Balancer | no | -| load_balancer_protocol | The protocol to use on the Load Balancer | string | Network Load Balancer:
- TCP
- TLS
- UDP
- TCP_UDP

Application Load Balancer:
- HTTP
- HTTPS | TCP | yes | -| certificate | Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP | string | n/a | n/a | no | -| service_port | The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS | string | n/a | n/a | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | list(string) | n/a | n/a | yes | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | -| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | -| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | -| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | -| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| servers_deploy | Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored | bool | true/false | false | no | -| servers_subnets | Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-0d72417c,subnet-1f61306f,subnet-1061d06f). | list(string) | n/a | n/a | yes | -| servers_instance_type | The EC2 instance type for the web servers | string | - t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge | t3.micro | no | -| server_ami | The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63) | string | n/a | n/a | yes | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| provision_tag | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | quickstart | no | +| load_balancers_type | Use Network Load Balancer if you wish to preserve the source IP address and Application Load Balancer if you wish to use content based routing | string | - Network Load Balancer
- Application Load Balancer
| Network Load Balancer | no | +| load_balancer_protocol | The protocol to use on the Load Balancer | string | Network Load Balancer:
- TCP
- TLS
- UDP
- TCP_UDP

Application Load Balancer:
- HTTP
- HTTPS | TCP | yes | +| certificate | Amazon Resource Name (ARN) of an HTTPS Certificate, ignored if the selected protocol is HTTP | string | n/a | n/a | no | +| service_port | The external Load Balancer listens to this port. Leave this field blank to use default ports: 80 for HTTP and 443 for HTTPS | string | n/a | n/a | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | list(string) | n/a | n/a | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| servers_deploy | Select 'true' to deploy web servers and an internal Application Load Balancer. If you select 'false' the other parameters of this section will be ignored | bool | true/false | false | no | +| servers_subnets | Provide at least 2 private subnet IDs in the chosen VPC, separated by commas (e.g. subnet-0d72417c,subnet-1f61306f,subnet-1061d06f). | list(string) | n/a | n/a | yes | +| servers_instance_type | The EC2 instance type for the web servers | string | - t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge | t3.micro | no | +| server_ami | The Amazon Machine Image ID of a preconfigured web server (e.g. ami-0dc7dc63) | string | n/a | n/a | yes | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -218,21 +216,22 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Quick Start Auto Scaling Terraform module for AWS | -| 20210329 | Stability fixes | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20231022 | Fixed template to populate x-chkp-tags correctly | -| 20231127 | Add support for parameter admin shell | -| 20240130 | Network Load Balancer Health Check configuration change for higher than R81 version. New Health Check Port is 8117 and Protocol TCP | -| 20240425 | Remove support for R81 and lower versions | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240425 | Remove support for R81 and lower versions | +| 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240130 | Network Load Balancer Health Check configuration change for higher than R81 version. New Health Check Port is 8117 and Protocol TCP | +| 20231127 | Add support for parameter admin shell | +| 20231022 | Fixed template to populate x-chkp-tags correctly | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | Stability fixes | +| 20210309 | First release of Check Point Quick Start Auto Scaling Terraform module for AWS | ## License diff --git a/terraform/aws/qs-autoscale/terraform.tfvars b/terraform/aws/qs-autoscale/terraform.tfvars index d9eb16f4..c9b51179 100755 --- a/terraform/aws/qs-autoscale/terraform.tfvars +++ b/terraform/aws/qs-autoscale/terraform.tfvars @@ -21,7 +21,7 @@ admin_shell = "/etc/cli.sh" // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- gateways_subnets = ["subnet-123b5678", "subnet-123a4567"] -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" gateways_min_group_size = 2 gateways_max_group_size = 8 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/qs-autoscale/variables.tf b/terraform/aws/qs-autoscale/variables.tf index 070ec4f4..b1539ba3 100755 --- a/terraform/aws/qs-autoscale/variables.tf +++ b/terraform/aws/qs-autoscale/variables.tf @@ -98,7 +98,7 @@ variable "gateways_subnets" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_gateway_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/standalone-master/README.md b/terraform/aws/standalone-master/README.md index 7802954c..ef5219d9 100755 --- a/terraform/aws/standalone-master/README.md +++ b/terraform/aws/standalone-master/README.md @@ -152,7 +152,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | -| standalone_version | Security Gateway & Management (Standalone) version and license | string | - 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 | R81.20-BYOL | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | resources_tag_name | (optional) | string | n/a | "" | no | @@ -185,16 +185,17 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20231012 | Update AWS Terraform Provider version to 5.20.1 | -| 20231113 | Add support for BYOL license type for Standalone | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231113 | Add support for BYOL license type for Standalone | +| 20231012 | Update AWS Terraform Provider version to 5.20.1 | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Master Terraform module for AWS | ## License diff --git a/terraform/aws/standalone-master/locals.tf b/terraform/aws/standalone-master/locals.tf index e2e6ab47..61326301 100755 --- a/terraform/aws/standalone-master/locals.tf +++ b/terraform/aws/standalone-master/locals.tf @@ -32,4 +32,5 @@ locals { // Will fail if var.standalone_password_hash is invalid regex_standalone_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_password_hash) == var.standalone_password_hash ? 0 : "Variable [standalone_password_hash] must be a valid password hash" regex_maintenance_mode_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_maintenance_mode_password_hash) == var.standalone_maintenance_mode_password_hash ? 0 : "Variable [standalone_maintenance_mode_password_hash] must be a valid password hash" + } \ No newline at end of file diff --git a/terraform/aws/standalone/README.md b/terraform/aws/standalone/README.md index 388bba1e..e16f1fe8 100755 --- a/terraform/aws/standalone/README.md +++ b/terraform/aws/standalone/README.md @@ -113,36 +113,35 @@ secret_key = "my-secret-key" ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| public_subnet_id | The public subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | -| private_subnet_id | The private subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | -| private_route_table | Sets '0.0.0.0/0' route to the Security Gateway & Management (Standalone) instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | -| standalone_name | (Optional) The name tag of the Security Gateway & Management (Standalone) instance | string | n/a | Check-Point-Standalone-tf | no | -| standalone_instance_type | The instance type of the Security Gateway & Management (Standalone) instance | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | -| standalone_version | Security Gateway & Management (Standalone) version and license | string | - 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 | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| resources_tag_name | (optional) | string | n/a | "" | no | -| standalone_hostname | (Optional) Security Gateway & Management (Standalone) prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| standalone_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | -| standalone_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | +| private_route_table | Sets '0.0.0.0/0' route to the Security Gateway & Management (Standalone) instance in the specified route table (e.g. rtb-12a34567) | string | n/a | "" | no | +| standalone_name | (Optional) The name tag of the Security Gateway & Management (Standalone) instance | string | n/a | Check-Point-Standalone-tf | no | +| standalone_instance_type | The instance type of the Security Gateway & Management (Standalone) instance | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with the launched instance | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| resources_tag_name | (optional) | string | n/a | "" | no | +| standalone_hostname | (Optional) Security Gateway & Management (Standalone) prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| standalone_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | +| standalone_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -155,22 +154,21 @@ secret_key = "my-secret-key" ## Revision History In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) - -| Template Version | Description | -|--------------------|------------------------------------------------------------------------------------------------------------------| -| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Terraform module for AWS | -| 20210329 | Stability fixes | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20231113 | Add support for BYOL license type for Standalone | -| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | - +| Template Version | Description | +|------------------|------------------------------------------------------------------------------------------------------------------| +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231113 | Add support for BYOL license type for Standalone | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | Stability fixes | +| 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Terraform module for AWS | ## License diff --git a/terraform/aws/standalone/standalone_userdata.yaml b/terraform/aws/standalone/standalone_userdata.yaml index 1bdf7eca..0bf47ec4 100755 --- a/terraform/aws/standalone/standalone_userdata.yaml +++ b/terraform/aws/standalone/standalone_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" installationType=\"standalone\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"standalone\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" bootstrapScript64=\"${StandaloneBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" installationType=\"standalone\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"standalone\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" bootstrapScript64=\"${StandaloneBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/tgw-asg-master/README.md b/terraform/aws/tgw-asg-master/README.md index 7850cebd..18940e6e 100755 --- a/terraform/aws/tgw-asg-master/README.md +++ b/terraform/aws/tgw-asg-master/README.md @@ -168,14 +168,14 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | | management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | @@ -207,16 +207,17 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------| -| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Master Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-asg-master/locals.tf b/terraform/aws/tgw-asg-master/locals.tf index 54cef511..467c4b4e 100755 --- a/terraform/aws/tgw-asg-master/locals.tf +++ b/terraform/aws/tgw-asg-master/locals.tf @@ -35,10 +35,12 @@ locals { regex_valid_management_password_hash = "^[\\$\\./a-zA-Z0-9]*$" // Will fail if var.management_password_hash is invalid regex_management_password_hash = regex(local.regex_valid_management_password_hash, var.management_password_hash) == var.management_password_hash ? 0 : "Variable [management_password_hash] must be a valid password hash" + regex_management_maintenance_mode_password_hash = regex(local.regex_valid_management_password_hash, var.management_maintenance_mode_password_hash) == var.management_maintenance_mode_password_hash ? 0 : "Variable [management_maintenance_mode_password_hash] must be a valid password hash" regex_valid_gateway_password_hash = "^[\\$\\./a-zA-Z0-9]*$" // Will fail if var.gateway_password_hash is invalid regex_gateway_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_password_hash) == var.gateway_password_hash ? 0 : "Variable [gateway_password_hash] must be a valid password hash" + regex_gateway_maintenance_mode_password_hash = regex(local.regex_valid_gateway_password_hash, var.gateway_maintenance_mode_password_hash) == var.gateway_maintenance_mode_password_hash ? 0 : "Variable [gateway_maintenance_mode_password_hash] must be a valid password hash" regex_valid_asn = "^[0-9]+$" // Will fail if var.asn is invalid diff --git a/terraform/aws/tgw-asg-master/terraform.tfvars b/terraform/aws/tgw-asg-master/terraform.tfvars index 7807cc3d..5fb15521 100755 --- a/terraform/aws/tgw-asg-master/terraform.tfvars +++ b/terraform/aws/tgw-asg-master/terraform.tfvars @@ -18,7 +18,7 @@ allow_upload_download = true // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-gateway" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" gateways_min_group_size = 2 gateways_max_group_size = 8 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/tgw-asg-master/variables.tf b/terraform/aws/tgw-asg-master/variables.tf index a709a74f..f1713e76 100755 --- a/terraform/aws/tgw-asg-master/variables.tf +++ b/terraform/aws/tgw-asg-master/variables.tf @@ -74,7 +74,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_gateway_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/tgw-asg/README.md b/terraform/aws/tgw-asg/README.md index 540a8d28..44e1c298 100755 --- a/terraform/aws/tgw-asg/README.md +++ b/terraform/aws/tgw-asg/README.md @@ -159,14 +159,14 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81-BYOL
- R81-PAYG-NGTP
- R81-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | | management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | @@ -196,17 +196,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|------------------------------------------------------------------------------------------| -| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230626 | Fixed missing x-chkp-* tags on Auto Scale Group | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230626 | Fixed missing x-chkp-* tags on Auto Scale Group | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-asg/terraform.tfvars b/terraform/aws/tgw-asg/terraform.tfvars index 9bdbb84e..c0f038e4 100755 --- a/terraform/aws/tgw-asg/terraform.tfvars +++ b/terraform/aws/tgw-asg/terraform.tfvars @@ -14,7 +14,7 @@ allow_upload_download = true // --- Check Point CloudGuard Network Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-gateway" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" gateways_min_group_size = 2 gateways_max_group_size = 8 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/tgw-asg/variables.tf b/terraform/aws/tgw-asg/variables.tf index 9a9a47e1..bd4af5b7 100755 --- a/terraform/aws/tgw-asg/variables.tf +++ b/terraform/aws/tgw-asg/variables.tf @@ -68,7 +68,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_gateway_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/tgw-cross-az-cluster-master/README.md b/terraform/aws/tgw-cross-az-cluster-master/README.md index 937444d8..3a821c9c 100755 --- a/terraform/aws/tgw-cross-az-cluster-master/README.md +++ b/terraform/aws/tgw-cross-az-cluster-master/README.md @@ -139,40 +139,39 @@ secret_key = "my-secret-key" - In Smart Console: reset SIC with the re-deployed member and install policy ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| -| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | -| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | -| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | -| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | -| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | -| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | -| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | -| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | +| private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | +| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -190,20 +189,17 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | -| 20221229 | Removed unsupported versions | -| 20221123 | R81.20 version support | -| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230829 | Change default Check Point version to R81.20 | -| 20230806 | Add support for c6in instance type | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | - - +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20221123 | R81.20 version support | +| 20221229 | Removed unsupported versions | +| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars b/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars index 2a1fee10..a7403f7b 100755 --- a/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars +++ b/terraform/aws/tgw-cross-az-cluster-master/terraform.tfvars @@ -18,7 +18,7 @@ subnets_bit_length = 8 // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" volume_size = 100 volume_encryption = "alias/aws/ebs" diff --git a/terraform/aws/tgw-cross-az-cluster-master/variables.tf b/terraform/aws/tgw-cross-az-cluster-master/variables.tf index 1485389b..8d14327a 100755 --- a/terraform/aws/tgw-cross-az-cluster-master/variables.tf +++ b/terraform/aws/tgw-cross-az-cluster-master/variables.tf @@ -59,7 +59,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/tgw-cross-az-cluster/README.md b/terraform/aws/tgw-cross-az-cluster/README.md index 1dcb1b0c..a8fd8013 100755 --- a/terraform/aws/tgw-cross-az-cluster/README.md +++ b/terraform/aws/tgw-cross-az-cluster/README.md @@ -134,42 +134,40 @@ secret_key = "my-secret-key" - In Smart Console: reset SIC with the re-deployed member and install policy ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | -| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | -| tgw_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | -| tgw_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | -| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | -| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | -| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | -| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | +| tgw_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | +| tgw_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -187,18 +185,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | -| 20221123 | R81.20 version support | -| 20221229 | Removed unsupported versions | -| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | -| 20230503 | Smart-1 Cloud token validation | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230503 | Smart-1 Cloud token validation | +| 20230411 | - Improved deployment experience for gateways and clusters managed by Smart-1 Cloud
- Multiple VIPs support for Cross Availability Zone Cluster. For more details refer to the [Cross Availability Zone Cluster for AWS R81.20 Administration Guide](https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_for_AWS_Cross_AZ_Cluster/Content/Topics-AWS-CrossAZ-Cluster-AG/Check-Point-CloudGuard-for-AWS.htm) -> "Deploying Cross AZ Cluster with multiple VIPs" section. | +| 20221229 | Removed unsupported versions | +| 20221123 | R81.20 version support | +| 20221123 | First release of Check Point Security Cluster Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-cross-az-cluster/terraform.tfvars b/terraform/aws/tgw-cross-az-cluster/terraform.tfvars index c1008d0d..64e995b8 100755 --- a/terraform/aws/tgw-cross-az-cluster/terraform.tfvars +++ b/terraform/aws/tgw-cross-az-cluster/terraform.tfvars @@ -12,7 +12,7 @@ private_route_table = "" // --- EC2 Instance Configuration --- gateway_name = "Check-Point-Cluster-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" key_name = "publickey" volume_size = 100 volume_encryption = "alias/aws/ebs" diff --git a/terraform/aws/tgw-cross-az-cluster/variables.tf b/terraform/aws/tgw-cross-az-cluster/variables.tf index eb330795..9f17451b 100755 --- a/terraform/aws/tgw-cross-az-cluster/variables.tf +++ b/terraform/aws/tgw-cross-az-cluster/variables.tf @@ -60,7 +60,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The instance type of the Security Gateways" - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/tgw-gwlb-master/README.md b/terraform/aws/tgw-gwlb-master/README.md index fa8a0ffd..a28b180a 100755 --- a/terraform/aws/tgw-gwlb-master/README.md +++ b/terraform/aws/tgw-gwlb-master/README.md @@ -175,59 +175,58 @@ secret_key = "my-secret-key" ``` ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-----------| -| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | -| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | -| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | -| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | -| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | -| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | -| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | -| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | -| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | -| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | -| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | -| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | -| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | -| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| volume_size | Instances volume size | number | n/a | 100 | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | -| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | -| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | -| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | -| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | -| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | -| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | -| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | -| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | -| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | +| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | +| tgw_subnets_map | A map of pairs {availability-zone = subnet-suffix-number} for the tgw subnets. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | +| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | +| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | +| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | +| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | +| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | +| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | +| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -247,17 +246,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|----------------------------------------------------------------------------------------------------------------------------| -| 20220414 | First release of Check Point CloudGuar d Network Gateway Load Balancer for Transit Gateway Master Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230910 | Add bootstrap script execution option for deployed gateways | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20220414 | First release of Check Point CloudGuar d Network Gateway Load Balancer for Transit Gateway Master Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-gwlb-master/terraform.tfvars b/terraform/aws/tgw-gwlb-master/terraform.tfvars index bdb7a361..57cb8a02 100755 --- a/terraform/aws/tgw-gwlb-master/terraform.tfvars +++ b/terraform/aws/tgw-gwlb-master/terraform.tfvars @@ -48,7 +48,7 @@ enable_cross_zone_load_balancing = "true" // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-GW-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" minimum_group_size = 2 maximum_group_size = 10 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/tgw-gwlb-master/variables.tf b/terraform/aws/tgw-gwlb-master/variables.tf index af425811..830caffa 100755 --- a/terraform/aws/tgw-gwlb-master/variables.tf +++ b/terraform/aws/tgw-gwlb-master/variables.tf @@ -193,7 +193,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The EC2 instance type for the Security Gateways." - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/aws/tgw-gwlb/README.md b/terraform/aws/tgw-gwlb/README.md index a01c29bc..5daec1a3 100755 --- a/terraform/aws/tgw-gwlb/README.md +++ b/terraform/aws/tgw-gwlb/README.md @@ -171,62 +171,61 @@ secret_key = "my-secret-key" ``` ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| -| vpc_id | Select an existing VPC | string | n/a | n/a | yes | -| internet_gateway_id | VPC's Internet Gateway Id | string | n/a | n/a | yes | -| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | -| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | -| Gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | string | n/a | n/a | yes | -| transit_gateway_attachment_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | -| transit_gateway_attachment_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | -| transit_gateway_attachment_subnet_3_id | The TGW attachment subnet ID located in the 3st Availability Zone | string | n/a | n/a | yes | -| transit_gateway_attachment_subnet_4_id | The TGW attachment subnet ID located in the 4st Availability Zone | string | n/a | n/a | yes | -| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | -| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | -| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | -| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | -| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | -| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | -| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | -| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| volume_size | Instances volume size | number | n/a | 100 | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | -| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | -| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | -| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | -| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | -| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R80.40-BYOL
- R80.40-PAYG-NGTP
- R80.40-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | -| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R80.40-BYOL
- R80.40-PAYG
- R81-BYOL
- R81-PAYG
- R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | -| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | -| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | - +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_id | Select an existing VPC | string | n/a | n/a | yes | +| internet_gateway_id | VPC's Internet Gateway Id | string | n/a | n/a | yes | +| availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | +| Number_of_AZs | Number of Availability Zones to use in the VPC. | number | n/a | 2 | yes | +| Gateways_subnets | Select at least 2 public subnets in the VPC. If you choose to deploy a Security Management Server it will be deployed in the first subnet | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_3_id | The TGW attachment subnet ID located in the 3st Availability Zone | string | n/a | n/a | yes | +| transit_gateway_attachment_subnet_4_id | The TGW attachment subnet ID located in the 4st Availability Zone | string | n/a | n/a | yes | +| nat_gw_subnet_1_cidr | CIDR block for NAT subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.13.0/24 | yes | +| nat_gw_subnet_2_cidr | CIDR block for NAT subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.23.0/24 | yes | +| nat_gw_subnet_3_cidr | CIDR block for NAT subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.33.0/24 | yes | +| nat_gw_subnet_4_cidr | CIDR block for NAT subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.43.0/24 | yes | +| gwlbe_subnet_1_cidr | CIDR block for GWLBe subnet 1 located in the 1st Availability Zone | string | n/a | 10.0.14.0/24 | yes | +| gwlbe_subnet_2_cidr | CIDR block for GWLBe subnet 2 located in the 2st Availability Zone | string | n/a | 10.0.24.0/24 | yes | +| gwlbe_subnet_3_cidr | CIDR block for GWLBe subnet 3 located in the 3st Availability Zone | string | n/a | 10.0.34.0/24 | yes | +| gwlbe_subnet_4_cidr | CIDR block for GWLBe subnet 4 located in the 4st Availability Zone | string | n/a | 10.0.44.0/24 | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-ter | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb-terraform | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1-terraform | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | gwlb-terraform | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs | Name | Description | @@ -246,17 +245,18 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------| -| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer for Transit Gateway Terraform module for AWS | -| 20220606 | New instance type support | -| 20221123 | R81.20 version support | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20230806 | Add support for c6in instance type | -| 20230829 | Change default Check Point version to R81.20 | -| 20230910 | Add bootstrap script execution option for deployed gateways | -| 20230914 | Add support for maintenance mode password | -| 20230923 | Add support for C5d instance type | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230910 | Add bootstrap script execution option for deployed gateways | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20220414 | First release of Check Point CloudGuard Network Gateway Load Balancer for Transit Gateway Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-gwlb/terraform.tfvars b/terraform/aws/tgw-gwlb/terraform.tfvars index 266b4d1a..e6df1c8b 100755 --- a/terraform/aws/tgw-gwlb/terraform.tfvars +++ b/terraform/aws/tgw-gwlb/terraform.tfvars @@ -41,7 +41,7 @@ enable_cross_zone_load_balancing = "true" // --- Check Point CloudGuard IaaS Security Gateways Auto Scaling Group Configuration --- gateway_name = "Check-Point-GW-tf" -gateway_instance_type = "c5.xlarge" +gateway_instance_type = "c6in.xlarge" minimum_group_size = 2 maximum_group_size = 10 gateway_version = "R81.20-BYOL" diff --git a/terraform/aws/tgw-gwlb/variables.tf b/terraform/aws/tgw-gwlb/variables.tf index 52b97b13..767885aa 100755 --- a/terraform/aws/tgw-gwlb/variables.tf +++ b/terraform/aws/tgw-gwlb/variables.tf @@ -201,7 +201,7 @@ variable "gateway_name" { variable "gateway_instance_type" { type = string description = "The EC2 instance type for the Security Gateways." - default = "c5.xlarge" + default = "c6in.xlarge" } module "validate_instance_type" { source = "../modules/common/instance_type" diff --git a/terraform/azure/high-availability-existing-vnet/README.md b/terraform/azure/high-availability-existing-vnet/README.md index c26e307a..666aec67 100755 --- a/terraform/azure/high-availability-existing-vnet/README.md +++ b/terraform/azure/high-availability-existing-vnet/README.md @@ -55,7 +55,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -115,9 +115,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20"; | n/a | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20"; | n/a | | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | | @@ -214,24 +214,22 @@ availability_type = "Availability Zone" ## Revision History In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) -| Template Version | Description | -| ---------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | -| | | | -| 20230910 | - R81.20 is the default version | -| | | | -| 20230212 | - Added Smart-1 Cloud support | -| | | | -| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | -| | | | -| 20220111 | - Added support to select different shells. | -| | | | -| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | -| | | | -| 20210111 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment into an existing Vnet in Azure. | -| | | | -| | Addition of "templateType" parameter to "cloud-version" files. | -| | | | +| Template Version | Description | +| ---------------- | ------------- | +| 20230910 | - R81.20 is the default version | +| | | | +| 20230212 | - Added Smart-1 Cloud support | +| | | | +| 20221124 | - Added R81.20 support
- Upgraded azurerm provider | +| | | | +| 20220111 | - Added support to select different shells. | +| | | | +| 20210309 | - Add "source_image_vhd_uri" variable for using a custom development image | +| | | | +| 20210111 | First release of Check Point CloudGuard IaaS High Availability Terraform deployment into an existing Vnet in Azure. | +| | | | +| | Addition of "templateType" parameter to "cloud-version" files. | +| | | | ## License diff --git a/terraform/azure/high-availability-existing-vnet/main.tf b/terraform/azure/high-availability-existing-vnet/main.tf index 934102da..86cf812b 100755 --- a/terraform/azure/high-availability-existing-vnet/main.tf +++ b/terraform/azure/high-availability-existing-vnet/main.tf @@ -284,6 +284,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { location = module.common.resource_group_location account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/high-availability-existing-vnet/variables.tf b/terraform/azure/high-availability-existing-vnet/variables.tf index c11fa238..4aa5ca72 100755 --- a/terraform/azure/high-availability-existing-vnet/variables.tf +++ b/terraform/azure/high-availability-existing-vnet/variables.tf @@ -115,7 +115,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -130,13 +129,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/high-availability-new-vnet/README.md b/terraform/azure/high-availability-new-vnet/README.md index 51153c0a..2218fd5a 100755 --- a/terraform/azure/high-availability-new-vnet/README.md +++ b/terraform/azure/high-availability-new-vnet/README.md @@ -59,7 +59,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -113,9 +113,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license;| n/a | | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | | @@ -215,8 +215,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | -| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230212 | - Added Smart-1 Cloud support | diff --git a/terraform/azure/high-availability-new-vnet/main.tf b/terraform/azure/high-availability-new-vnet/main.tf index 1506b913..641826ed 100755 --- a/terraform/azure/high-availability-new-vnet/main.tf +++ b/terraform/azure/high-availability-new-vnet/main.tf @@ -303,6 +303,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { location = module.common.resource_group_location account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/high-availability-new-vnet/variables.tf b/terraform/azure/high-availability-new-vnet/variables.tf index 6bb79338..15e5ee4e 100755 --- a/terraform/azure/high-availability-new-vnet/variables.tf +++ b/terraform/azure/high-availability-new-vnet/variables.tf @@ -115,7 +115,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -130,13 +129,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/management-existing-vnet/README.md b/terraform/azure/management-existing-vnet/README.md index 3ab73dbd..e2877075 100755 --- a/terraform/azure/management-existing-vnet/README.md +++ b/terraform/azure/management-existing-vnet/README.md @@ -54,7 +54,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -168,8 +168,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/management-existing-vnet/main.tf b/terraform/azure/management-existing-vnet/main.tf index a471b842..ed9b2b85 100755 --- a/terraform/azure/management-existing-vnet/main.tf +++ b/terraform/azure/management-existing-vnet/main.tf @@ -196,6 +196,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/management-existing-vnet/variables.tf b/terraform/azure/management-existing-vnet/variables.tf index 6030652b..ec9272a4 100755 --- a/terraform/azure/management-existing-vnet/variables.tf +++ b/terraform/azure/management-existing-vnet/variables.tf @@ -89,7 +89,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -104,13 +103,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", diff --git a/terraform/azure/management-new-vnet/README.md b/terraform/azure/management-new-vnet/README.md index f744dccc..8851e3d6 100755 --- a/terraform/azure/management-new-vnet/README.md +++ b/terraform/azure/management-new-vnet/README.md @@ -56,7 +56,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -166,8 +166,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/management-new-vnet/main.tf b/terraform/azure/management-new-vnet/main.tf index 77c16ac6..c334c034 100755 --- a/terraform/azure/management-new-vnet/main.tf +++ b/terraform/azure/management-new-vnet/main.tf @@ -202,6 +202,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/management-new-vnet/variables.tf b/terraform/azure/management-new-vnet/variables.tf index 63839bd0..3ed686e1 100755 --- a/terraform/azure/management-new-vnet/variables.tf +++ b/terraform/azure/management-new-vnet/variables.tf @@ -88,7 +88,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120", @@ -103,13 +102,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/mds-existing-vnet/README.md b/terraform/azure/mds-existing-vnet/README.md index 7c8003fd..f83a56e8 100755 --- a/terraform/azure/mds-existing-vnet/README.md +++ b/terraform/azure/mds-existing-vnet/README.md @@ -54,7 +54,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -182,8 +182,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | diff --git a/terraform/azure/mds-existing-vnet/main.tf b/terraform/azure/mds-existing-vnet/main.tf index 0c8719f1..6a64aea0 100755 --- a/terraform/azure/mds-existing-vnet/main.tf +++ b/terraform/azure/mds-existing-vnet/main.tf @@ -196,6 +196,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/mds-existing-vnet/variables.tf b/terraform/azure/mds-existing-vnet/variables.tf index 8896ceae..745c78c7 100755 --- a/terraform/azure/mds-existing-vnet/variables.tf +++ b/terraform/azure/mds-existing-vnet/variables.tf @@ -109,7 +109,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -124,13 +123,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/mds-new-vnet/README.md b/terraform/azure/mds-new-vnet/README.md index 293c3862..cb782964 100755 --- a/terraform/azure/mds-new-vnet/README.md +++ b/terraform/azure/mds-new-vnet/README.md @@ -56,7 +56,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -175,8 +175,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | diff --git a/terraform/azure/mds-new-vnet/main.tf b/terraform/azure/mds-new-vnet/main.tf index 7f2c1de9..26ad4d00 100755 --- a/terraform/azure/mds-new-vnet/main.tf +++ b/terraform/azure/mds-new-vnet/main.tf @@ -202,6 +202,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/mds-new-vnet/variables.tf b/terraform/azure/mds-new-vnet/variables.tf index 9ce9d0ba..45c2175a 100755 --- a/terraform/azure/mds-new-vnet/variables.tf +++ b/terraform/azure/mds-new-vnet/variables.tf @@ -108,7 +108,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -123,13 +122,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/modules/common/variables.tf b/terraform/azure/modules/common/variables.tf index e768159b..33d85f45 100755 --- a/terraform/azure/modules/common/variables.tf +++ b/terraform/azure/modules/common/variables.tf @@ -136,7 +136,6 @@ variable "os_version"{ locals { // locals for 'os_version' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -217,13 +216,12 @@ variable "publisher" { //************** Storage image reference and plan variables ****************// variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" @@ -237,8 +235,8 @@ variable "vm_os_sku" { /* Choose from: - "sg-byol" - - "sg-ngtp" (for R80.40 and above) - - "sg-ngtx" (for R80.40 and above) + - "sg-ngtp" (for R81 and above) + - "sg-ngtx" (for R81 and above) - "mgmt-byol" - "mgmt-25" */ diff --git a/terraform/azure/nva-into-existing-hub/README.md b/terraform/azure/nva-into-existing-hub/README.md index a2765298..253cce89 100644 --- a/terraform/azure/nva-into-existing-hub/README.md +++ b/terraform/azure/nva-into-existing-hub/README.md @@ -1,6 +1,6 @@ # Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure -This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into an existing vWAN Hub in Azure. +This Terraform module deploys Check Point CloudGuard Network Security vWAN NVA solution into an existing vWAN Hub in Azure. As part of the deployment the following resources are created: - Resource groups - Azure Managed Application: @@ -77,7 +77,7 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https | | | | | | | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | | | | | | | - | **vwan-hub-resource-group** | The virtual WAN hub resource group name | string | | n/a | + | **vwan-hub-resource-group** | The vWAN hub resource group name | string | | n/a | | | | | | | | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-managed-app-nva" | | | | | | | @@ -161,7 +161,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|-------------------| -| 20240613 | Cosmetic fixes & default values | | 20240228 | Added public IP for ingress support | | | | 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | diff --git a/terraform/azure/nva-into-new-vwan/README.md b/terraform/azure/nva-into-new-vwan/README.md index 52cc1b17..c7f06c09 100644 --- a/terraform/azure/nva-into-new-vwan/README.md +++ b/terraform/azure/nva-into-new-vwan/README.md @@ -1,6 +1,6 @@ # Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure -This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into a new vWAN Hub in Azure. +This Terraform module deploys Check Point CloudGuard Network Security vWAN NVA solution into a new vWAN Hub in Azure. As part of the deployment the following resources are created: - Resource groups - Virtual WAN @@ -170,10 +170,9 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | -|------------------|-----------------------------------------------------------------------------------------------| -| 20240613 | Cosmetic fixes & default values | -| 20240228 | Added public IP for ingress support | | | -| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | +|------------------|---------------------------------------------------------------------------------------------------| +| 20240228 | Added public IP for ingress support | | | +| 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | ## License diff --git a/terraform/azure/single-gateway-existing-vnet/README.md b/terraform/azure/single-gateway-existing-vnet/README.md index 73fa074d..feebb542 100755 --- a/terraform/azure/single-gateway-existing-vnet/README.md +++ b/terraform/azure/single-gateway-existing-vnet/README.md @@ -52,7 +52,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r81200:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -112,9 +112,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -185,8 +185,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------| -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | diff --git a/terraform/azure/single-gateway-existing-vnet/main.tf b/terraform/azure/single-gateway-existing-vnet/main.tf index 81ced59f..e7a9e174 100755 --- a/terraform/azure/single-gateway-existing-vnet/main.tf +++ b/terraform/azure/single-gateway-existing-vnet/main.tf @@ -137,6 +137,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/single-gateway-existing-vnet/variables.tf b/terraform/azure/single-gateway-existing-vnet/variables.tf index dd4dc15e..f6f2da36 100755 --- a/terraform/azure/single-gateway-existing-vnet/variables.tf +++ b/terraform/azure/single-gateway-existing-vnet/variables.tf @@ -102,7 +102,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -117,13 +116,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/single-gateway-new-vnet/README.md b/terraform/azure/single-gateway-new-vnet/README.md index d4d821ac..b9227c85 100755 --- a/terraform/azure/single-gateway-new-vnet/README.md +++ b/terraform/azure/single-gateway-new-vnet/README.md @@ -56,7 +56,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -112,9 +112,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | @@ -183,8 +183,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------| -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | diff --git a/terraform/azure/single-gateway-new-vnet/main.tf b/terraform/azure/single-gateway-new-vnet/main.tf index dcb817bf..c7673cd2 100755 --- a/terraform/azure/single-gateway-new-vnet/main.tf +++ b/terraform/azure/single-gateway-new-vnet/main.tf @@ -137,6 +137,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type account_kind = "Storage" + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/single-gateway-new-vnet/variables.tf b/terraform/azure/single-gateway-new-vnet/variables.tf index 65076afc..7b247e96 100755 --- a/terraform/azure/single-gateway-new-vnet/variables.tf +++ b/terraform/azure/single-gateway-new-vnet/variables.tf @@ -101,7 +101,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -116,13 +115,12 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" diff --git a/terraform/azure/vmss-existing-vnet/README.md b/terraform/azure/vmss-existing-vnet/README.md index dca0361a..f0602c30 100755 --- a/terraform/azure/vmss-existing-vnet/README.md +++ b/terraform/azure/vmss-existing-vnet/README.md @@ -55,7 +55,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -71,91 +71,89 @@ This solution uses the following modules: terraform apply ### terraform.tfvars variables: - | Name | Description | Type | Allowed values | Default | - | ------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | ------------- | - | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a - | | | | | | - | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a - | | | | | | - | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a - | | | | | | - | **subscription_id** | The subsscription ID is used to pay for Azure cloud services | string | | n/a - | | | | | | - | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" - | | | | | | - | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a - | | | | | | - | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a - | | | | | | - | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss_name name must not contain reserved words based on: sk40179 | n/a - | | | | | | - | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a - | | | | | | - | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a - | | | | | | - | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a - | | | | | | - | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a - | | | | | | - | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix | string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a - | | | | | | - | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a - | | | | | | - | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a - | | | | | | - | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a - | | | | | | - | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 - | | | | | | - | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a - | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a - | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a - | | | | | | - | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a - | | | | | | - | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a - | | | | | | - | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a - | | | | | | - | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a - | | | | | | - | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a - | | | | | | - | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a - | | | | | | - | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a - | | | | | | - | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a - | | | | | | - | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" - | | | | | | - | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a - | | | | | | - | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a - | | | | | | - | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a - | | | | | | - | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a - | | | | | | - | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | true - | | | | | | - | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false - | | | | | | - | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" - | | | | | | - | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" - | | | | | | - | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a - | | | | | | - | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a - | | | | | | - | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" - | | | | | | - | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false - | | | | | | - | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] + | Name | Description | Type | Allowed values | Default | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **tenant_id** | The tenant ID of the Service Principal used to deploy the solution | string | | n/a + | | | | | | + | **subscription_id** | The subscription ID is used to pay for Azure cloud services | string | | n/a + | | | | | | + | **source_image_vhd_uri** | The URI of the blob containing the development image. Please use noCustomUri if you want to use marketplace images | string | | "noCustomUri" + | | | | | | + | **resource_group_name** | The name of the resource group that will contain the contents of the deployment | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period
Note: Resource group name must not contain reserved words based on: sk40179| n/a + | | | | | | + | **location** | The region where the resources will be deployed at | string | The full list of Azure regions can be found at https://azure.microsoft.com/regions | n/a + | | | | | | + | **vmss_name** | The name of the Check Point VMSS Object | string | Only alphanumeric characters are allowed, and the name must be 1-30 characters long
Note: vmss_name name must not contain reserved words based on: sk40179 | n/a + | | | | | | + | **vnet_name** | Virtual Network name | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a + | | | | | | + | **vnet_resource_group** | Resource Group of the existing virtual network | string | The exact name of the existing vnet's resource group | n/a + | | | | | | + | **frontend_subnet_name** | Specifies the name of the external subnet | string | The exact name of the existing external subnet | n/a + | | | | | | + | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a + | | | | | | + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix| string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | | | | | | + | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a + | | | | | | + | **sic_key** | The Secure Internal Communication one time secret used to set up trust between the cluster object and the management server | string | Only alphanumeric characters are allowed, and the value must be 12-30 characters long | n/a + | | | | | | + | **vm_size** | Specifies the size of Virtual Machine | string | "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E20s_v3", "Standard_E32s_v3", "Standard_E64s_v3", "Standard_E64is_v3", "Standard_F4s_v2", "Standard_F8s_v2", "Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_M8ms", "Standard_M16ms", "Standard_M32ms", "Standard_M64ms", "Standard_M64s", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_D4_v3", "Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E20_v3", "Standard_E32_v3", "Standard_E64_v3", "Standard_E64i_v3", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_DS14_v2", "Standard_DS15_v2", "Standard_D2_v5", "Standard_D4_v5", "Standard_D8_v5", "Standard_D16_v5","Standard_D32_v5", "Standard_D2s_v5", "Standard_D4s_v5", "Standard_D8s_v5", "Standard_D16s_v5", "Standard_D2d_v5", "Standard_D4d_v5", "Standard_D8d_v5", "Standard_D16d_v5", "Standard_D32d_v5", "Standard_D2ds_v5", "Standard_D4ds_v5", "Standard_D8ds_v5", "Standard_D16ds_v5", "Standard_D32ds_v5" | n/a + | | | | | | + | **disk_size** | Storage data disk size size(GB) must be 100 for versions R81.20 and below | string | A number in the range 100 - 3995 (GB) | 100 + | | | | | | + | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a + | | | | | | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | | | | | | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a + | | | | | | + | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a + | | | | | | + | **allow_upload_download** | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;
false; | n/a + | | | | | | + | **authentication_type** | Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";
"SSH Public Key"; | n/a + | | | | | | + | **availability_zones_num** | A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth" | n/a + | | | | | | + | **minimum_number_of_vm_instances** | The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **maximum_number_of_vm_instances** | The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10 | n/a + | | | | | | + | **management_name** | The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **management_IP** | The IP address used to manage the VMSS instances | string | A valid IP address | n/a + | | | | | | + | **management_interface** | Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;
"eth0-private" -Manages the GWs using their external NIC's private IP address;
"eth1-private" - Manages the GWs using their internal NIC's private IP address | "eth1-private" + | | | | | | + | **configuration_template_name** | The configuration template name as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long | n/a + | | | | | | + | **frontend_load_distribution** | The load balancing distribution method for the External Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **backend_load_distribution** | The load balancing distribution method for the Internal Load Balancer | string | "Default" - None(5-tuple);
"SourceIP" - ClientIP(2-tuple);
"SourceIPProtocol" - ClientIP and protocol(3-tuple) | n/a + | | | | | | + | **notification_email** | An email address to notify about scaling operations | string | Leave empty double quotes or enter a valid email address | n/a + | | | | | | + | **enable_custom_metrics** | Indicates whether Custom Metrics will be used for VMSS Scaling policy and VM monitoring | boolean | true;
false; | true + | | | | | | + | **enable_floating_ip** | Indicates whether the load balancers will be deployed with floating IP | boolean | true;
false; | false + | | | | | | + | **deployment_mode** | Indicates which load balancer need to be deployed. External + Internal(Standard), only External, only Internal | string | Standard ;
External;
Internal; | "Standard" + | | | | | | + | **admin_shell** | Enables to select different admin shells | string | /etc/cli.sh;
/bin/bash;
/bin/csh;
/bin/tcsh; | "/etc/cli.sh" + | | | | | | + | **serial_console_password_hash** | Optional parameter, used to enable serial console connection in case of SSH key as authentication type, to generate password hash use the command 'openssl passwd -6 PASSWORD' on Linux and paste it here | string | | n/a + | | | | | | + | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a + | | | | | | + | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false + | | | | | | + | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] ## Conditional creation To create role assignment and enable CloudGuard metrics in order to send statuses and statistics collected from VMSS instances to the Azure Monitor service: @@ -203,7 +201,6 @@ enable_custom_metrics = true admin_shell = "/etc/cli.sh" serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - nsg_id = "" add_storage_account_ip_rules = false storage_account_additional_ips = [] @@ -215,14 +212,15 @@ enable_custom_metrics = true ## Known limitations +1. Deploy the VMSS with External load balancer only (Inbound inspection only) is not supported +2. Deploy the VMSS with Internal load balancer only (Outbound and E-W inspection only) is not supported + ## Revision History In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | | ---------------- | ------------- | -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/vmss-existing-vnet/main.tf b/terraform/azure/vmss-existing-vnet/main.tf index 70e7169a..af194878 100755 --- a/terraform/azure/vmss-existing-vnet/main.tf +++ b/terraform/azure/vmss-existing-vnet/main.tf @@ -198,6 +198,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { location = module.common.resource_group_location account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/vmss-existing-vnet/terraform.tfvars b/terraform/azure/vmss-existing-vnet/terraform.tfvars index 66836af3..399ffeef 100755 --- a/terraform/azure/vmss-existing-vnet/terraform.tfvars +++ b/terraform/azure/vmss-existing-vnet/terraform.tfvars @@ -39,5 +39,4 @@ admin_shell = "PLEASE ENTER ADMIN SHELL" serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" add_storage_account_ip_rules = "PLEASE ENTER true or false" # false -storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] -nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" \ No newline at end of file +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file diff --git a/terraform/azure/vmss-existing-vnet/variables.tf b/terraform/azure/vmss-existing-vnet/variables.tf index 9ef598a3..aa405627 100755 --- a/terraform/azure/vmss-existing-vnet/variables.tf +++ b/terraform/azure/vmss-existing-vnet/variables.tf @@ -114,7 +114,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120" @@ -129,7 +128,7 @@ variable "disk_size" { } resource "null_resource" "disk_size_validation" { // Will fail if var.disk_size is not 100 and the version is R81.20 or below - count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 + count = tonumber(var.disk_size) != 100 && contains(["R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 } variable "vm_os_sku" { description = "The sku of the image to be deployed." @@ -243,10 +242,7 @@ variable "storage_account_additional_ips" { type = list(string) description = "IPs/CIDRs that are allowed access to the Storage Account" default = [] -} - -//********************* Load Balancers Variables **********************// - +}//********************* Load Balancers Variables **********************// variable "deployment_mode" { description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" type = string @@ -333,13 +329,12 @@ locals { // locals for 'frontend_load_distribution' allowed values //********************** Scale Set variables *******************// variable "vm_os_offer" { - description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", @@ -397,8 +392,3 @@ variable "enable_floating_ip" { type = bool default = false } - -variable "nsg_id" { - description = "NSG ID - Optional - if empty use default NSG" - default = "" -} diff --git a/terraform/azure/vmss-new-vnet/README.md b/terraform/azure/vmss-new-vnet/README.md index b57e3011..06f786e7 100755 --- a/terraform/azure/vmss-new-vnet/README.md +++ b/terraform/azure/vmss-new-vnet/README.md @@ -59,7 +59,7 @@ This solution uses the following modules: - sku = vm_os_sku (see accepted values in the table below); - version = latest

Example:
- az vm image terms accept --urn checkpoint:check-point-cg-r8040:sg-byol:latest + az vm image terms accept --urn checkpoint:check-point-cg-r8120:sg-byol:latest - In the terraform.tfvars file leave empty double quotes for client_secret, client_id and tenant_id variables. @@ -111,9 +111,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r8040";
"check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R8040";
"R81";
"R8110";
"R8120"; | n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | @@ -221,8 +221,6 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | --------- | -| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | -| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/vmss-new-vnet/main.tf b/terraform/azure/vmss-new-vnet/main.tf index 2438915d..025592dc 100755 --- a/terraform/azure/vmss-new-vnet/main.tf +++ b/terraform/azure/vmss-new-vnet/main.tf @@ -195,6 +195,7 @@ resource "azurerm_storage_account" "vm-boot-diagnostics-storage" { location = module.common.resource_group_location account_tier = module.common.storage_account_tier account_replication_type = module.common.account_replication_type + min_tls_version = "TLS1_2" network_rules { default_action = var.add_storage_account_ip_rules ? "Deny" : "Allow" ip_rules = module.common.storage_account_ip_rules diff --git a/terraform/azure/vmss-new-vnet/variables.tf b/terraform/azure/vmss-new-vnet/variables.tf index 1760b8a2..afc907c5 100755 --- a/terraform/azure/vmss-new-vnet/variables.tf +++ b/terraform/azure/vmss-new-vnet/variables.tf @@ -114,7 +114,6 @@ variable "os_version" { locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ - "R8040", "R81", "R8110", "R8120", @@ -129,7 +128,7 @@ variable "disk_size" { } resource "null_resource" "disk_size_validation" { // Will fail if var.disk_size is not 100 and the version is R81.20 or below - count = tonumber(var.disk_size) != 100 && contains(["R8040", "R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 + count = tonumber(var.disk_size) != 100 && contains(["R81", "R8110", "R8120"], var.os_version) ? "variable disk_size can not be changed for R81.20 and below" : 0 } variable "vm_os_sku" { description = "The sku of the image to be deployed." @@ -327,13 +326,12 @@ locals { // locals for 'frontend_load_distribution' allowed values //********************** Scale Set variables *******************// variable "vm_os_offer" { - description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r8040, check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" type = string } locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ - "check-point-cg-r8040", "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", diff --git a/terraform/gcp/autoscale-into-existing-vpc/README.md b/terraform/gcp/autoscale-into-existing-vpc/README.md index 1c11c3d3..2ce564df 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/README.md +++ b/terraform/gcp/autoscale-into-existing-vpc/README.md @@ -35,23 +35,22 @@ provider "google" { compute.autoscalers.create compute.autoscalers.delete compute.autoscalers.get + compute.autoscalers.update compute.disks.create - compute.disks.delete compute.firewalls.create compute.firewalls.delete compute.firewalls.get - compute.images.get - compute.images.useReadOnly + compute.firewalls.update compute.instanceGroupManagers.create compute.instanceGroupManagers.delete compute.instanceGroupManagers.get compute.instanceGroupManagers.use + compute.instanceGroups.delete compute.instanceTemplates.create compute.instanceTemplates.delete compute.instanceTemplates.get compute.instanceTemplates.useReadOnly compute.instances.create - compute.instances.delete compute.instances.setMetadata compute.instances.setTags compute.networks.get @@ -60,11 +59,7 @@ provider "google" { compute.subnetworks.get compute.subnetworks.use compute.subnetworks.useExternalIp - iam.serviceAccountKeys.get - iam.serviceAccountKeys.list iam.serviceAccounts.actAs - iam.serviceAccounts.get - iam.serviceAccounts.list ``` 3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). @@ -113,11 +108,14 @@ project = "project-id" # --- Check Point--- prefix = "chkp-tf-mig" license = "BYOL" -image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +image_name = "check-point-r8120-gw-byol-mig-631-991001335-v20230622" +os_version = "R8120" management_nic = "Ephemeral Public IP (eth0)" management_name = "tf-checkpoint-management" configuration_template_name = "tf-asg-autoprov-tmplt" +generate_password = true admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" network_defined_by_routes = true admin_shell = "/etc/cli.sh" allow_upload_download = true @@ -166,13 +164,17 @@ Please leave empty list for a protocol if you want to disable traffic for it. | service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | | project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | | | | | | | -| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| prefix | (Optional) Resources name prefix.
Note: resource name must not contain reserved words based on: sk40179. | string | N/A | "chkp-tf-mig" | no | | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | -| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-631-991001335-v20230622). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| | | | | | | management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | | management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | | configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| generate_password | Automatically generate an administrator password. | bool | true/false | false | no | | admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| maintenance_mode_password_hash | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here. | string | N/A | "" | no | | network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | | admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | @@ -197,6 +199,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | + ## Outputs | Name | Description | | ------------- | ------------- | @@ -212,12 +215,13 @@ Please leave empty list for a protocol if you want to disable traffic for it. | SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | | ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | - ## Revision History In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | | ---------------- | ------------- | +| 20230910 | - R81.20 is the default version | +| | | | | 20230109 | Updated startup script to use cloud-config. | | | | | | 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into an existing VPC on GCP. | diff --git a/terraform/gcp/autoscale-into-existing-vpc/locals.tf b/terraform/gcp/autoscale-into-existing-vpc/locals.tf index 058d0689..9687f394 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/locals.tf +++ b/terraform/gcp/autoscale-into-existing-vpc/locals.tf @@ -9,6 +9,14 @@ locals { // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + version_allowed_values = [ + "R81", + "R8110", + "R8120" + ] + // Will fail if var.os_version is invalid: + validate_os_version = index(local.version_allowed_values, var.os_version) + management_nic_allowed_values = [ "Ephemeral Public IP (eth0)", "Private IP (eth1)"] @@ -48,6 +56,7 @@ locals { + adminPasswordSourceMetadata = var.generate_password ? random_string.generated_password.result : "" disk_type_condition = var.disk_type == "SSD Persistent Disk" ? "pd-ssd" : var.disk_type == "Balanced Persistent Disk" ? "pd-balanced" : var.disk_type == "Standard Persistent Disk" ? "pd-standard" : "" mgmt_nic_condition = var.management_nic == "Ephemeral Public IP (eth0)" ? true : false mgmt_nic_ip_address_condition = local.mgmt_nic_condition ? "x-chkp-ip-address--public" : "x-chkp-ip-address--private" diff --git a/terraform/gcp/autoscale-into-existing-vpc/main.tf b/terraform/gcp/autoscale-into-existing-vpc/main.tf index 24548144..b854e133 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/main.tf +++ b/terraform/gcp/autoscale-into-existing-vpc/main.tf @@ -20,7 +20,10 @@ resource "random_string" "random_sic_key" { length = 12 special = false } - +resource "random_string" "generated_password" { + length = 12 + special = false +} resource "google_compute_instance_template" "instance_template" { name = "${var.prefix}-tmplt-${random_string.random_string.result}" machine_type = var.machine_type @@ -81,9 +84,18 @@ resource "google_compute_instance_template" "instance_template" { local.network_defined_by_routes_condition, local.network_defined_by_routes_settings_condition] + metadata = local.admin_SSH_key_condition ? { + serial-port-enable = "true" + instanceSSHKey = var.admin_SSH_key + adminPasswordSourceMetadata = var.generate_password ?random_string.generated_password.result : "" + } : { + serial-port-enable = "true" + adminPasswordSourceMetadata = var.generate_password?random_string.generated_password.result : "" + } + metadata_startup_script = templatefile("${path.module}/../common/startup-script.sh", { // script's arguments - generatePassword = "false" + generatePassword = var.generate_password config_url = "" config_path = "" sicKey = "" @@ -106,14 +118,9 @@ resource "google_compute_instance_template" "instance_template" { name = "" zoneConfig = "" region = "" + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash }) - - metadata = local.admin_SSH_key_condition ? { - serial-port-enable = "true" - instanceSSHKey = var.admin_SSH_key - } : { - serial-port-enable = "true" - } } resource "google_compute_firewall" "ICMP_firewall_rules" { diff --git a/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars b/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars index dfb828db..2f402aa6 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars +++ b/terraform/gcp/autoscale-into-existing-vpc/terraform.tfvars @@ -1,36 +1,39 @@ # --- Google Provider --- -service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" -project = "PLEASE ENTER PROJECT ID" # "project-id" +service_account_path = "PLEASE ENTER SERVICE ACCOUNT PATH" # "service-accounts/service-account-file-name.json" +project = "PLEASE ENTER PROJECT ID" # "project-id" # --- Check Point--- -prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" -license = "PLEASE ENTER LICENSE" # "BYOL" -image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" -management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" -management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" -configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" -admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" -network_defined_by_routes = "PLEASE ENTER true OR false" # true -admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" -allow_upload_download = "PLEASE ENTER true OR false" # true +prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" +license = "PLEASE ENTER LICENSE" # "BYOL" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8120-gw-byol-mig-631-991001335-v20230622" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8120" +management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" +management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" +configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +generate_password = "PLEASE ENTER true or false" # false +admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +network_defined_by_routes = "PLEASE ENTER true OR false" # true +admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +allow_upload_download = "PLEASE ENTER true OR false" # true # --- Networking --- -region = "PLEASE ENTER REGION" # "us-central1" -external_network_name = "PLEASE ENTER EXTERNAL NETWORK NAME" # "default" -external_subnetwork_name = "PLEASE ENTER EXTERNAL SUBNETWORK NAME" # "default" -internal_network_name = "PLEASE ENTER INTERNAL NETWORK NAME" # "tf-vpc-network" -internal_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK NAME" # "tf-vpc-subnetwork" -ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] -TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] -UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] -SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] -ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] +region = "PLEASE ENTER REGION" # "us-central1" +external_network_name = "PLEASE ENTER EXTERNAL NETWORK NAME" # "default" +external_subnetwork_name = "PLEASE ENTER EXTERNAL SUBNETWORK NAME" # "default" +internal_network_name = "PLEASE ENTER INTERNAL NETWORK NAME" # "tf-vpc-network" +internal_subnetwork_name = "PLEASE ENTER INTERNAL SUBNETWORK NAME" # "tf-vpc-subnetwork" +ICMP_traffic = "PLEASE ENTER ICMP SOURCE IP RANGES" # ["123.123.0.0/24", "234.234.0.0/24"] +TCP_traffic = "PLEASE ENTER TCP SOURCE IP RANGES" # ["0.0.0.0/0"] +UDP_traffic = "PLEASE ENTER UDP SOURCE IP RANGES" # [] +SCTP_traffic = "PLEASE ENTER SCTP SOURCE IP RANGES" # [] +ESP_traffic = "PLEASE ENTER ESP SOURCE IP RANGES" # [] # --- Instance Configuration --- -machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" -cpu_usage = "PLEASE ENTER CPU USAGE" # 60 -instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 -instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 -disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" -disk_size = "PLEASE ENTER DISK SIZE" # 100 -enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file +machine_type = "PLEASE ENTER MACHINE TYPE" # "n1-standard-4" +cpu_usage = "PLEASE ENTER CPU USAGE" # 60 +instances_min_grop_size = "PLEASE ENTER INSTANCES MIN GROP SIZE" # 2 +instances_max_grop_size = "PLEASE ENTER INSTANCES MAX GROP SIZE" # 10 +disk_type = "PLEASE ENTER DISK TYPE" # "SSD Persistent Disk" +disk_size = "PLEASE ENTER DISK SIZE" # 100 +enable_monitoring = "PLEASE ENTER true OR false" # false \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/variables.tf b/terraform/gcp/autoscale-into-existing-vpc/variables.tf index 8acd8fda..54fd97f1 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/variables.tf +++ b/terraform/gcp/autoscale-into-existing-vpc/variables.tf @@ -25,7 +25,12 @@ variable "license" { } variable "image_name" { type = string - description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" + description = "The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-123-456-v12345678). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } variable "management_nic" { type = string @@ -47,6 +52,16 @@ variable "admin_SSH_key" { description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." default = "" } +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password" + default = false +} +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "network_defined_by_routes" { type = bool description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." diff --git a/terraform/gcp/autoscale-into-new-vpc/README.md b/terraform/gcp/autoscale-into-new-vpc/README.md index 3439418c..3958865d 100755 --- a/terraform/gcp/autoscale-into-new-vpc/README.md +++ b/terraform/gcp/autoscale-into-new-vpc/README.md @@ -121,11 +121,14 @@ project = "project-id" # --- Check Point--- prefix = "chkp-tf-mig" license = "BYOL" -image_name = "check-point-r8110-gw-byol-mig-335-985-v20220126" +image_name = "check-point-r8120-gw-byol-mig-631-991001335-v20230622" +os_version = "R8120" management_nic = "Ephemeral Public IP (eth0)" management_name = "tf-checkpoint-management" configuration_template_name = "tf-asg-autoprov-tmplt" +generate_password = true admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" network_defined_by_routes = true admin_shell = "/etc/cli.sh" allow_upload_download = true @@ -172,13 +175,17 @@ Please leave empty list for a protocol if you want to disable traffic for it. | service_account_path | User service account path in JSON format - From the service account key page in the Cloud Console choose an existing account or create a new one. Next, download the JSON key file. Name it something you can remember, store it somewhere secure on your machine, and supply the path to the location is stored. (e.g. "service-accounts/service-account-name.json") | string | N/A | "" | yes | | project | Personal project id. The project indicates the default GCP project all of your resources will be created in. | string | N/A | "" | yes | | | | | | | -| prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-mig" | no | +| prefix | (Optional) Resources name prefix.
Note: resource name must not contain reserved words based on: sk40179. | string | N/A | "chkp-tf-mig" | no | | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | -| image_name | The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| image_name | The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-631-991001335-v20230622). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| | | | | | | management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | | management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | | configuration_template_name | Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including lowercase letters, digits and hyphens only). | string | N/A | "gcp-asg-autoprov-tmplt" | no | +| generate_password | Automatically generate an administrator password. | bool | true/false | false | no | | admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | +| maintenance_mode_password_hash | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here. | string | | "" | no | | network_defined_by_routes | Set eth1 topology to define the networks behind this interface by the routes configured on the gateway. | bool | true/false | true | no | | admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | | allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | @@ -226,6 +233,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20230910 | - R81.20 is the default version | +| | | | | 20230109 | Updated startup script to use cloud-config. | | | | | | 20201208 | First release of Check Point CloudGuard IaaS Auto Scaling Group of Check Point Security Gateways Terraform solution into a new VPC on GCP. | diff --git a/terraform/gcp/autoscale-into-new-vpc/locals.tf b/terraform/gcp/autoscale-into-new-vpc/locals.tf index 451bbd93..d49e09c4 100755 --- a/terraform/gcp/autoscale-into-new-vpc/locals.tf +++ b/terraform/gcp/autoscale-into-new-vpc/locals.tf @@ -9,6 +9,14 @@ locals { // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + version_allowed_values = [ + "R81", + "R8110", + "R8120" + ] + // Will fail if var.os_version is invalid: + validate_os_version = index(local.version_allowed_values, var.os_version) + management_nic_allowed_values = [ "Ephemeral Public IP (eth0)", "Private IP (eth1)"] diff --git a/terraform/gcp/autoscale-into-new-vpc/main.tf b/terraform/gcp/autoscale-into-new-vpc/main.tf index 16ec2197..180ff6c3 100755 --- a/terraform/gcp/autoscale-into-new-vpc/main.tf +++ b/terraform/gcp/autoscale-into-new-vpc/main.tf @@ -17,6 +17,7 @@ resource "google_compute_network" "external_network" { resource "google_compute_subnetwork" "external_subnetwork" { name = "${var.prefix}-ext-subnet-${random_string.mig_random_string.result}" ip_cidr_range = var.external_subnetwork_ip_cidr_range + private_ip_google_access = true region = var.region network = google_compute_network.external_network.id } @@ -28,6 +29,7 @@ resource "google_compute_network" "internal_network" { resource "google_compute_subnetwork" "internal_subnetwork" { name = "${var.prefix}-int-subnet-${random_string.mig_random_string.result}" ip_cidr_range = var.internal_subnetwork_ip_cidr_range + private_ip_google_access = true region = var.region network = google_compute_network.internal_network.id } @@ -42,10 +44,13 @@ module "autoscale-into-existing-vpc" { # --- Check Point--- prefix = var.prefix image_name = var.image_name + os_version = var.os_version management_nic = var.management_nic management_name = var.management_name configuration_template_name = var.configuration_template_name + generate_password = var.generate_password admin_SSH_key = var.admin_SSH_key + maintenance_mode_password_hash = var.maintenance_mode_password_hash network_defined_by_routes = var.network_defined_by_routes admin_shell = var.admin_shell allow_upload_download = var.allow_upload_download diff --git a/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars b/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars index 48fe765a..a7e7eb72 100755 --- a/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars +++ b/terraform/gcp/autoscale-into-new-vpc/terraform.tfvars @@ -5,11 +5,14 @@ project = "PLEASE ENTER PROJECT ID" # --- Check Point--- prefix = "PLEASE ENTER PREFIX" # "chkp-tf-mig" license = "PLEASE ENTER LICENSE" # "BYOL" -image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-mig-335-985-v20220126" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8120-gw-byol-mig-631-991001335-v20230622" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8120" management_nic = "PLEASE ENTER MANAGEMENT INTERFACE" # "Ephemeral Public IP (eth0)" management_name = "PLEASE ENTER MANAGEMENT NAME" # "tf-checkpoint-management" configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" # "tf-asg-autoprov-tmplt" +generate_password = "PLEASE ENTER true or false" # false admin_SSH_key = "PLEASE ENTER ADMIN SSH KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" network_defined_by_routes = "PLEASE ENTER true OR false" # true admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" allow_upload_download = "PLEASE ENTER true OR false" # true diff --git a/terraform/gcp/autoscale-into-new-vpc/variables.tf b/terraform/gcp/autoscale-into-new-vpc/variables.tf index f19a77d2..e929d1ff 100755 --- a/terraform/gcp/autoscale-into-new-vpc/variables.tf +++ b/terraform/gcp/autoscale-into-new-vpc/variables.tf @@ -25,7 +25,12 @@ variable "license" { } variable "image_name" { type = string - description = "The autoscaling (MIG) image name (e.g. check-point-r8110-gw-byol-mig-335-985-v20220126). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" + description = "The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-123-456-v12345678). You can choose the desired mig image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } variable "management_nic" { type = string @@ -42,11 +47,21 @@ variable "configuration_template_name" { description = "Specify the provisioning configuration template name (for autoprovisioning). (Please enter a valid autoprovisioing configuration template name including ascii characters only)" default = "tf-asg-autoprov-tmplt" } +variable "generate_password" { + type = bool + description = "Automatically generate an administrator password" + default = false +} variable "admin_SSH_key" { type = string description = "(Optional) The SSH public key for SSH authentication to the MIG instances. Leave this field blank to use all project-wide pre-configured SSH keys." default = "" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "network_defined_by_routes" { type = bool description = "Set eth1 topology to define the networks behind this interface by the routes configured on the gateway." diff --git a/terraform/gcp/common/cluster-member/main.tf b/terraform/gcp/common/cluster-member/main.tf index c740f8b3..c5ae7eda 100755 --- a/terraform/gcp/common/cluster-member/main.tf +++ b/terraform/gcp/common/cluster-member/main.tf @@ -109,7 +109,7 @@ resource "google_compute_instance" "cluster_member" { sicKey = var.sic_key allowUploadDownload = var.allow_upload_download templateName = "cluster_tf" - templateVersion = "20230109" + templateVersion = "20230910" templateType = "terraform" mgmtNIC = "" hasInternet = "true" @@ -126,5 +126,7 @@ resource "google_compute_instance" "cluster_member" { name = var.member_name zoneConfig = var.zone region = var.region + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash }) } \ No newline at end of file diff --git a/terraform/gcp/common/cluster-member/variables.tf b/terraform/gcp/common/cluster-member/variables.tf index 51b0e1d9..333e509f 100755 --- a/terraform/gcp/common/cluster-member/variables.tf +++ b/terraform/gcp/common/cluster-member/variables.tf @@ -31,7 +31,12 @@ variable "disk_type" { } variable "image_name" { type = string - description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" + description = "The High Availability (cluster) image name (e.g. check-point-r8120-gw-byol-cluster-123-456-v12345678). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } variable "cluster_network" { type = list(string) @@ -158,6 +163,11 @@ variable "smart_1_cloud_token_b" { description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" default = "" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "management_network" { type = string description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." diff --git a/terraform/gcp/common/members-a-b/main.tf b/terraform/gcp/common/members-a-b/main.tf index d40ae6d1..8424e7d8 100755 --- a/terraform/gcp/common/members-a-b/main.tf +++ b/terraform/gcp/common/members-a-b/main.tf @@ -39,6 +39,8 @@ module "member_a" { secondary_cluster_address_name = var.secondary_cluster_address_name smart_1_cloud_token_a = var.smart_1_cloud_token_a smart_1_cloud_token_b = var.smart_1_cloud_token_b + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash } module "member_b" { @@ -82,4 +84,6 @@ module "member_b" { secondary_cluster_address_name = var.secondary_cluster_address_name smart_1_cloud_token_a = var.smart_1_cloud_token_a smart_1_cloud_token_b = var.smart_1_cloud_token_b + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash } diff --git a/terraform/gcp/common/members-a-b/variables.tf b/terraform/gcp/common/members-a-b/variables.tf index 4a5b6e04..6fa8b30c 100755 --- a/terraform/gcp/common/members-a-b/variables.tf +++ b/terraform/gcp/common/members-a-b/variables.tf @@ -34,6 +34,11 @@ variable "image_name" { type = string description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" } +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" +} variable "cluster_network" { type = list(string) description = "Cluster external network ID in the chosen zone." @@ -159,6 +164,11 @@ variable "smart_1_cloud_token_b" { description ="(Optional) Smart-1 cloud token for member B to connect this Gateway to Check Point's Security Management as a Service" default = "" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "management_network" { type = string description = "Security Management Server address - The public address of the Security Management Server, in CIDR notation. If using Smart-1 Cloud management, insert 'S1C'. VPN peers addresses cannot be in this CIDR block, so this value cannot be the zero-address." diff --git a/terraform/gcp/common/startup-script.sh b/terraform/gcp/common/startup-script.sh index 196a04e3..c8192303 100755 --- a/terraform/gcp/common/startup-script.sh +++ b/terraform/gcp/common/startup-script.sh @@ -1,3 +1,3 @@ #cloud-config runcmd: - - 'python3 /etc/cloud_config.py generatePassword=\"${generatePassword}\" allowUploadDownload=\"${allowUploadDownload}\" templateName=\"${templateName}\" templateVersion=\"${templateVersion}\" mgmtNIC="X${mgmtNIC}X" hasInternet=\"${hasInternet}\" config_url=\"${config_url}\" config_path=\"${config_path}\" installationType="X${installationType}X" enableMonitoring=\"${enableMonitoring}\" shell=\"${shell}\" computed_sic_key=\"${computed_sic_key}\" sicKey=\"${sicKey}\" managementGUIClientNetwork=\"${managementGUIClientNetwork}\" primary_cluster_address_name=\"${primary_cluster_address_name}\" secondary_cluster_address_name=\"${secondary_cluster_address_name}\" managementNetwork=\"${managementNetwork}\" numAdditionalNICs=\"${numAdditionalNICs}\" smart1CloudToken="X${smart_1_cloud_token}X" name=\"${name}\" zone=\"${zoneConfig}\" region=\"${region}\"' \ No newline at end of file + - 'python3 /etc/cloud_config.py generatePassword=\"${generatePassword}\" allowUploadDownload=\"${allowUploadDownload}\" templateName=\"${templateName}\" templateVersion=\"${templateVersion}\" mgmtNIC="X${mgmtNIC}X" hasInternet=\"${hasInternet}\" config_url=\"${config_url}\" config_path=\"${config_path}\" installationType="X${installationType}X" enableMonitoring=\"${enableMonitoring}\" shell=\"${shell}\" computed_sic_key=\"${computed_sic_key}\" sicKey=\"${sicKey}\" managementGUIClientNetwork=\"${managementGUIClientNetwork}\" primary_cluster_address_name=\"${primary_cluster_address_name}\" secondary_cluster_address_name=\"${secondary_cluster_address_name}\" managementNetwork=\"${managementNetwork}\" numAdditionalNICs=\"${numAdditionalNICs}\" smart1CloudToken="X${smart_1_cloud_token}X" name=\"${name}\" zone=\"${zoneConfig}\" region=\"${region}\" osVersion=\"${os_version}\" MaintenanceModePassword=\"${maintenance_mode_password_hash}\"' \ No newline at end of file diff --git a/terraform/gcp/high-availability/README.md b/terraform/gcp/high-availability/README.md index 03e9d97b..d83af628 100755 --- a/terraform/gcp/high-availability/README.md +++ b/terraform/gcp/high-availability/README.md @@ -46,17 +46,20 @@ provider "google" { compute.firewalls.create compute.firewalls.delete compute.firewalls.get - compute.images.get - compute.images.useReadOnly + compute.firewalls.update compute.instances.create compute.instances.delete compute.instances.get + compute.instances.setLabels + compute.instances.setMachineType compute.instances.setMetadata compute.instances.setServiceAccount compute.instances.setTags + compute.instances.updateNetworkInterface compute.networks.create compute.networks.delete compute.networks.get + compute.networks.list compute.networks.updatePolicy compute.regions.list compute.subnetworks.create @@ -65,11 +68,7 @@ provider "google" { compute.subnetworks.use compute.subnetworks.useExternalIp compute.zones.get - iam.serviceAccountKeys.get - iam.serviceAccountKeys.list iam.serviceAccounts.actAs - iam.serviceAccounts.get - iam.serviceAccounts.list ``` 3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). @@ -118,7 +117,8 @@ project = "project-id" # --- Check Point Deployment --- prefix = "chkp-tf-ha" license = "BYOL" -image_name = "check-point-r8110-gw-byol-cluster-335-985-v20220126" +image_name = "check-point-r8120-gw-byol-cluster-631-991001335-v20230622" +os_version = "R8120" # --- Instances Configuration --- region = "us-central1" @@ -135,7 +135,8 @@ management_network = "209.87.209.100/32" sic_key = "aaaaaaaa" generate_password = false allow_upload_download = false -admin_shell = "/bin/bash" +admin_shell = "/etc/cli.sh" +maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #--- Quick connect to Smart-1 Cloud --- smart_1_cloud_token_a = "xxxxxxxxxxxxxxxxxxxxxxxx" @@ -226,7 +227,9 @@ internal_network1_subnetwork_name = "" | | | | | | | prefix | (Optional) Resources name prefix. | string | N/A | "chkp-tf-ha" | no | | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | -| image_name | The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py). | string | N/A | N/A | yes | +| image_name | The High Availability (cluster) image name (e.g. check-point-r8120-gw-byol-cluster-631-991001335-v20230622). You can choose the desired cluster image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py). | string | N/A | N/A | yes | +| | | | | | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | | | | | | | | region | GCP region | string | N/A | "us-central1" | no | | zoneA | Member A Zone. The zone determines what computing resources are available and where your data is stored and used. | string | N/A | "us-central1-a" | no | @@ -241,6 +244,7 @@ internal_network1_subnetwork_name = "" | generate_password | Automatically generate an administrator password. | bool | true/false | false | no | | allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | | admin_shell | Change the admin shell to enable advanced command line configuration. | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | "/etc/cli.sh" | no | +| maintenance_mode_password_hash | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here. | string | | "" | no | | smart_1_cloud_token_a | Smart-1 Cloud token to connect ***member A*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| | smart_1_cloud_token_b | Smart-1 Cloud token to connect ***member B*** to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501)| string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| | cluster_network_cidr | Cluster external subnet CIDR. If the variable's value is not empty double quotes, a new network will be created. The Cluster public IP will be translated to a private address assigned to the active member in this external network. | string | N/A | "10.0.0.0/24" | no | @@ -300,6 +304,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20230910 | - R81.20 is the default version | +| | | | | 20230209 | Added Smart-1 Cloud support. | | | | | | 20230109 | Updated startup script to use cloud-config. | diff --git a/terraform/gcp/high-availability/locals.tf b/terraform/gcp/high-availability/locals.tf index e764ccaf..680c7f9c 100755 --- a/terraform/gcp/high-availability/locals.tf +++ b/terraform/gcp/high-availability/locals.tf @@ -9,14 +9,22 @@ locals { // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") + version_allowed_values = [ + "R81", + "R8110", + "R8120" + ] + // Will fail if var.os_version is invalid: + validate_os_version = index(local.version_allowed_values, var.os_version) + split_zoneA = split("-", var.zoneA) split_zoneB = split("-", var.zoneB) // will fail if the var.zoneA and var.zoneB are not at the same region: validate_zones = index(local.split_zoneA, local.split_zoneB[0]) == local.split_zoneA[0] && index(local.split_zoneA, local.split_zoneB[1]) == local.split_zoneA[0] ? 0 : "var.zoneA and var.zoneB are not at the same region" - regex_valid_management_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|(S1C)$" + regex_valid_management_network = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|(S1C)$" // Will fail if var.management_network is invalid - regex_management_network = regex(local.regex_valid_management_network, var.management_network) == var.management_network ? 0 : "Variable [management_network] must be a valid address in CIDR notation or 'S1C'." + regex_management_network = regex(local.regex_valid_management_network, var.management_network) == var.management_network ? 0 : "Variable [management_network] must be a valid address in CIDR notation or S1C." regex_valid_network_cidr = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))|$" diff --git a/terraform/gcp/high-availability/main.tf b/terraform/gcp/high-availability/main.tf index 821d3542..1abd6c7b 100755 --- a/terraform/gcp/high-availability/main.tf +++ b/terraform/gcp/high-availability/main.tf @@ -247,4 +247,6 @@ module "members_a_b" { secondary_cluster_address_name = google_compute_address.secondary_cluster_ip_ext_address.name smart_1_cloud_token_a = var.smart_1_cloud_token_a smart_1_cloud_token_b = var.smart_1_cloud_token_b + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash } \ No newline at end of file diff --git a/terraform/gcp/high-availability/terraform.tfvars b/terraform/gcp/high-availability/terraform.tfvars index f888479f..bb4f9e5e 100755 --- a/terraform/gcp/high-availability/terraform.tfvars +++ b/terraform/gcp/high-availability/terraform.tfvars @@ -5,7 +5,8 @@ project = "PLEASE ENTER PROJECT ID" # --- Check Point Deployment --- prefix = "PLEASE ENTER PREFIX" # "chkp-tf-ha" license = "PLEASE ENTER LICENSE" # "BYOL" -image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8110-gw-byol-cluster-335-985-v20220126" +image_name = "PLEASE ENTER IMAGE NAME" # "check-point-r8120-gw-byol-cluster-631-991001335-v20230622" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8120" # --- Instances Configuration --- region = "PLEASE ENTER REGION" # "us-central1" @@ -23,6 +24,7 @@ sic_key = "PLEASE ENTER A SIC KEY" generate_password = "PLEASE ENTER true or false" # false allow_upload_download = "PLEASE ENTER true OR false" # true admin_shell = "PLEASE ENTER ADMIN SHELL" # "/etc/cli.sh" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # --- Quick connect to Smart-1 Cloud --- smart_1_cloud_token_a = "PASTE TOKEN FROM SMART-1 CLOUD PORTAL" # "" diff --git a/terraform/gcp/high-availability/variables.tf b/terraform/gcp/high-availability/variables.tf index a7bede31..72f4e916 100755 --- a/terraform/gcp/high-availability/variables.tf +++ b/terraform/gcp/high-availability/variables.tf @@ -25,9 +25,13 @@ variable "license" { } variable "image_name" { type = string - description = "The High Availability (cluster) image name (e.g. check-point-r8110-gw-byol-cluster-335-985-v20220126). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" + description = "The High Availability (cluster) image name (e.g. check-point-r8120-gw-byol-cluster-123-456-v12345678). You can choose the desired cluster image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } - # --- Instances Configuration --- data "google_compute_regions" "available_regions" { } @@ -102,6 +106,11 @@ variable "admin_shell" { description = "Change the admin shell to enable advanced command line configuration." default = "/etc/cli.sh" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} # --- Quick connect to Smart-1 Cloud --- variable "smart_1_cloud_token_a" { type = string @@ -120,6 +129,7 @@ resource "null_resource" "validate_both_tokens" { resource "null_resource" "validate_different_tokens" { count = var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_a == var.smart_1_cloud_token_b ? "To connect to Smart-1 Cloud, you must provide two different tokens" : 0 } + # --- Networking --- variable "cluster_network_cidr" { type = string diff --git a/terraform/gcp/single-into-existing-vpc/README.md b/terraform/gcp/single-into-existing-vpc/README.md index a3213acb..72bc8265 100755 --- a/terraform/gcp/single-into-existing-vpc/README.md +++ b/terraform/gcp/single-into-existing-vpc/README.md @@ -30,41 +30,30 @@ provider "google" { 1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
2. Select "Editor" Role or verify you have the following permissions: ``` + compute.addresses.create + compute.addresses.delete compute.addresses.get compute.addresses.use - compute.addresses.create compute.disks.create - compute.disks.delete compute.firewalls.create compute.firewalls.delete compute.firewalls.get - compute.images.get - compute.images.useReadOnly - compute.images.getFromFamily - compute.instanceTemplates.create - compute.instanceTemplates.delete - compute.instanceTemplates.get - compute.instanceTemplates.useReadOnly - compute.instances.addAccessConfig + compute.firewalls.update compute.instances.create compute.instances.delete compute.instances.get + compute.instances.setLabels + compute.instances.setMachineType compute.instances.setMetadata + compute.instances.setServiceAccount compute.instances.setTags - compute.instances.setLabels + compute.instances.updateNetworkInterface compute.networks.get compute.networks.updatePolicy - compute.regions.list - compute.subnetworks.get compute.subnetworks.use compute.subnetworks.useExternalIp compute.zones.get - iam.serviceAccountKeys.get - iam.serviceAccountKeys.list iam.serviceAccounts.actAs - iam.serviceAccounts.get - iam.serviceAccounts.list - iam.serviceAccounts.set ``` 3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). @@ -109,13 +98,15 @@ service_account_path = "service-accounts/service-account-file-name.json" project = "project-id" # --- Check Point--- -image_name = "check-point-r8110-gw-byol-single-335-985-v20220126" +image_name = "check-point-r8120-gw-byol-single-631-991001335-v20230622" +os_version = "R8120" installationType = "Gateway only" license = "BYOL" prefix = "chkp-single-tf-" management_nic = "Ephemeral Public IP (eth0)" admin_shell = "/etc/cli.sh" admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" generatePassword = false allow_upload_download = true sicKey = "" @@ -178,7 +169,9 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | zone | The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) |us-central1-a|yes| | | | | | | -| image_name |The single gateway or management image name (e.g. check-point-r8110-gw-byol-single-335-985-v20220126 for gateway or check-point-r8110-byol-335-883-v20210706 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | +| | | | | | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | | | | | | | | installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| | | | | | | @@ -230,6 +223,8 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | | | | | | | +| maintenance_mode_password_hash | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here. | string | | "" | no| +| | | | | | | sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| | | | | | | | managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| @@ -258,6 +253,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20230910 | - R81.20 is the default version | +| | | | | 20230209 | Added Smart-1 Cloud support. | | | | | | 20230109 | Updated startup script to use cloud-config. | diff --git a/terraform/gcp/single-into-existing-vpc/locals.tf b/terraform/gcp/single-into-existing-vpc/locals.tf index 39527714..3bfa4737 100755 --- a/terraform/gcp/single-into-existing-vpc/locals.tf +++ b/terraform/gcp/single-into-existing-vpc/locals.tf @@ -22,6 +22,15 @@ locals { 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 validate_image_name = var.installationType != "Gateway only" && length(regexall(local.regex_validate_mgmt_image_name, var.image_name)) > 0 ? 0 : (var.installationType == "Gateway only" && length(regexall(local.regex_validate_single_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME")) + + version_allowed_values = [ + "R81", + "R8110", + "R8120" + ] + // Will fail if var.os_version is invalid: + validate_os_version = index(local.version_allowed_values, var.os_version) + regex_valid_admin_SSH_key = "^(^$|ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3})" // Will fail if var.admin_SSH_key is invalid regex_admin_SSH_key = regex(local.regex_valid_admin_SSH_key, var.admin_SSH_key) == var.admin_SSH_key ? 0 : "Please enter a valid SSH public key or leave empty" @@ -49,7 +58,6 @@ locals { // Will fail if management_only and payg is_management_only = var.installationType == "Management only" is_license_payg = var.license == "PAYG" - validation_message = "Cannot use 'Management only' installation type with 'PAYG' license." - _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_message : "") - -} + validation_massage = "Cannot use 'Management only' installation type with 'Payg' license." + _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_massage : "") +} \ No newline at end of file diff --git a/terraform/gcp/single-into-existing-vpc/main.tf b/terraform/gcp/single-into-existing-vpc/main.tf index aeab8b93..7e34492d 100755 --- a/terraform/gcp/single-into-existing-vpc/main.tf +++ b/terraform/gcp/single-into-existing-vpc/main.tf @@ -192,7 +192,7 @@ resource "google_compute_instance" "gateway" { sicKey = "" allowUploadDownload = var.allowUploadDownload templateName = "single_tf" - templateVersion = "20230109" + templateVersion = "20230910" templateType = "terraform" hasInternet = "true" enableMonitoring = var.enableMonitoring @@ -211,6 +211,8 @@ resource "google_compute_instance" "gateway" { name = "" zoneConfig = "" region = "" + os_version = var.os_version + maintenance_mode_password_hash = var.maintenance_mode_password_hash }) } resource "google_compute_address" "static" { diff --git a/terraform/gcp/single-into-existing-vpc/terraform.tfvars b/terraform/gcp/single-into-existing-vpc/terraform.tfvars index 8ac21504..f2dd4fbe 100755 --- a/terraform/gcp/single-into-existing-vpc/terraform.tfvars +++ b/terraform/gcp/single-into-existing-vpc/terraform.tfvars @@ -1,15 +1,17 @@ # --- Google Provider --- service_account_path = "PLEASE ENTER SERVICE_ACCOUNT_PATH" # "service-accounts/service-account-file-name.json" -project = "PLEASE ENTER PROJECT ID" # "project-id" +project = "PLEASE ENTER PROJECT ID" # "project-id" # --- Check Point Deployment--- -image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8110-gw-byol-single-335-985-v20220126" +image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8120-gw-byol-single-631-991001335-v20230622" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8120" installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" license = "PLEASE ENTER LICENSE" # "BYOL" prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false sicKey = "PLEASE ENTER SIC KEY" # "" @@ -23,17 +25,17 @@ zone = "PLEASE ENTER ZONE" network = "PLEASE ENTER NETWORK" # ["default"] subnetwork = "PLEASE ENTER SUBNETWORK" # ["default"] network_enableTcp = "PLEASE ENTER NETWORK ENABLE TCP" # false -network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [""] +network_tcpSourceRanges = "PLEASE ENTER NETWORK TCP SOURCE RANGES" # [] network_enableGwNetwork = "PLEASE ENTER NETWORK ENABLE GW NETWORK" # false -network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [""] +network_gwNetworkSourceRanges = "PLEASE ENTER NETWORK GW NETWORK SOURCE RANGES" # [] network_enableIcmp = "PLEASE ENTER NETWORK ENABLE ICMP" # false -network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [""] +network_icmpSourceRanges = "PLEASE ENTER NETWORK ICMP SOURCE RANGES" # [] network_enableUdp = "PLEASE ENTER NETWORK ENABLE UDP" # false -network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [""] +network_udpSourceRanges = "PLEASE ENTER NETWORK UDP SOURCE RANGES" # [] network_enableSctp = "PLEASE ENTER NETWORK ENABLE SCTP" # false -network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [""] +network_sctpSourceRanges = "PLEASE ENTER NETWORK SCTP SOURCE RANGES" # [] network_enableEsp = "PLEASE ENTER NETWORK ENABLE ESP" # false -network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [""] +network_espSourceRanges = "PLEASE ENTER NETWORK ESP SOURCE RANGES" # [] numAdditionalNICs = "PLEASE ENTER NUM ADDITIONAL NICS" # 1 externalIP = "PLEASE ENTER EXTERNAL IP" # "static" internal_network1_network = "PLEASE ENTER INTERNAL_NETWORK1_NETWORK" # [""] diff --git a/terraform/gcp/single-into-existing-vpc/variables.tf b/terraform/gcp/single-into-existing-vpc/variables.tf index cc620851..196e4678 100755 --- a/terraform/gcp/single-into-existing-vpc/variables.tf +++ b/terraform/gcp/single-into-existing-vpc/variables.tf @@ -15,7 +15,12 @@ variable "zone" { } variable "image_name" { type = string - description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" + description = "The single gateway and management image name" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } variable "installationType" { type = string @@ -147,6 +152,11 @@ variable "admin_SSH_key" { description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." default = "" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "sicKey" { type = string description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" diff --git a/terraform/gcp/single-into-new-vpc/README.md b/terraform/gcp/single-into-new-vpc/README.md index 857b7c75..62e0b19f 100644 --- a/terraform/gcp/single-into-new-vpc/README.md +++ b/terraform/gcp/single-into-new-vpc/README.md @@ -30,48 +30,45 @@ provider "google" { 1. [Create a Service Account](https://cloud.google.com/docs/authentication/getting-started) (or use the existing one). Next, download the JSON key file. Name it something you can remember and store it somewhere secure on your machine.
2. Select "Editor" Role or verify you have the following permissions: ``` + compute.addresses.create + compute.addresses.delete compute.addresses.get compute.addresses.use - compute.addresses.create compute.disks.create - compute.disks.delete compute.firewalls.create compute.firewalls.delete compute.firewalls.get - compute.images.get - compute.images.useReadOnly - compute.images.getFromFamily - compute.instanceTemplates.create - compute.instanceTemplates.delete - compute.instanceTemplates.get - compute.instanceTemplates.useReadOnly - compute.instances.addAccessConfig + compute.firewalls.update compute.instances.create compute.instances.delete + compute.instances.deleteAccessConfig compute.instances.get + compute.instances.setLabels + compute.instances.setMachineType compute.instances.setMetadata + compute.instances.setServiceAccount compute.instances.setTags - compute.instances.setLabels + compute.instances.updateNetworkInterface + compute.networks.create + compute.networks.delete compute.networks.get compute.networks.updatePolicy + compute.regionOperations.get compute.regions.list + compute.subnetworks.create + compute.subnetworks.delete compute.subnetworks.get compute.subnetworks.use compute.subnetworks.useExternalIp compute.zones.get - iam.serviceAccountKeys.get - iam.serviceAccountKeys.list iam.serviceAccounts.actAs - iam.serviceAccounts.get - iam.serviceAccounts.list - iam.serviceAccounts.set ``` 3. ```credentials``` - Your service account key file is used to complete a two-legged OAuth 2.0 flow to obtain access tokens to authenticate with the GCP API as needed; Terraform will use it to reauthenticate automatically when tokens expire.
The provider credentials can be provided either as static credentials or as [Environment Variables](https://www.terraform.io/docs/providers/google/guides/provider_reference.html#credentials-1). - - Static credentials can be provided by adding the path to your service-account json file, project-id and region in /gcp/modules/single/terraform.tfvars file as follows: + - Static credentials can be provided by adding the path to your service-account json file, project-name and region in /gcp/modules/single/terraform.tfvars file as follows: ``` service_account_path = "service-accounts/service-account-file-name.json" - project = "project-id" + project = "project-name" ``` - In case the Environment Variables are used, perform modifications described below:
a. The next lines in the main.tf file, in the provider google resource, need to be deleted or commented: @@ -106,16 +103,18 @@ The provider credentials can be provided either as static credentials or as [Env ``` # --- Google Provider --- service_account_path = "service-accounts/service-account-file-name.json" -project = "project-id" +project = "project-name" # --- Check Point--- image_name = "check-point-r8120-gw-byol-single-631-991001335-v20230622" +os_version = "R8120" installationType = "Gateway only" license = "BYOL" prefix = "chkp-single-tf-" management_nic = "Ephemeral Public IP (eth0)" admin_shell = "/etc/cli.sh" admin_SSH_key = "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" generatePassword = false allow_upload_download = true sicKey = "" @@ -181,6 +180,8 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | | | | | | | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| | | | | | | installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| | | | | | | | license | Checkpoint license (BYOL or PAYG).|string|BYOL;
PAYG;|BYOL|yes| @@ -229,6 +230,8 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | admin_SSH_key | Public SSH key for the user 'admin' - The SSH public key for SSH authentication to the instances. Leave this field blank to use all project-wide pre-configured SSH keys. | string | A valid public ssh key | "" | no | | | | | | | +| maintenance_mode_password_hash | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here. | string | | "" | no| +| | | | | | | sicKey | The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server | string | At least 8 alpha numeric characters.
If SIC is not provided and needed, a key will be automatically generated |""|no| | | | | | | | managementGUIClientNetwork | Allowed GUI clients | string | A valid IPv4 network CIDR (e.g. 0.0.0.0/0) |0.0.0.0/0|no| @@ -262,6 +265,7 @@ In order to check the template version refer to the [sk116585](https://supportce | 20230921 | Added single-into-new-vpc template. | | | | + ## Authors diff --git a/terraform/gcp/single-into-new-vpc/main.tf b/terraform/gcp/single-into-new-vpc/main.tf index 1597ae33..a9dacc6f 100644 --- a/terraform/gcp/single-into-new-vpc/main.tf +++ b/terraform/gcp/single-into-new-vpc/main.tf @@ -47,12 +47,14 @@ module "single-into-existing-vpc" { # --- Check Point Deployment--- image_name = var.image_name + os_version = var.os_version installationType = var.installationType license = var.license prefix = var.prefix management_nic = var.management_nic admin_shell = var.admin_shell admin_SSH_key = var.admin_SSH_key + maintenance_mode_password_hash = var.maintenance_mode_password_hash generatePassword = var.generatePassword allowUploadDownload = var.allowUploadDownload sicKey = var.sicKey diff --git a/terraform/gcp/single-into-new-vpc/terraform.tfvars b/terraform/gcp/single-into-new-vpc/terraform.tfvars index b387fa3d..dee19701 100644 --- a/terraform/gcp/single-into-new-vpc/terraform.tfvars +++ b/terraform/gcp/single-into-new-vpc/terraform.tfvars @@ -4,12 +4,14 @@ project = "PLEASE ENTER PROJECT ID" # --- Check Point Deployment--- image_name = "PLEASE ENTER IMAGE_NAME" # "check-point-r8120-gw-byol-single-631-991001335-v20230622" +os_version = "PLEASE ENTER GAIA OS VERSION" # "R8120" installationType = "PLEASE ENTER INSTALLATION TYPE" # "Gateway only" license = "PLEASE ENTER LICENSE" # "BYOL" prefix = "PLEASE ENTER PREFIX" # "chkp-single-tf-" management_nic = "PLEASE ENTER MANAGEMENT_NIC" # "Ephemeral Public IP (eth0)" admin_shell = "PLEASE ENTER ADMIN_SHELL" # "/etc/cli.sh" admin_SSH_key = "PLEASE ENTER ADMIN_SSH_KEY" # "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx imported-openssh-key" +maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" generatePassword = "PLEASE ENTER GENERATE PASSWORD" # false allowUploadDownload = "PLEASE ENTER ALLOW UPLOAD DOWNLOAD" # false sicKey = "PLEASE ENTER SIC KEY" # "" diff --git a/terraform/gcp/single-into-new-vpc/variables.tf b/terraform/gcp/single-into-new-vpc/variables.tf index 3d6454cf..6a40d8e8 100644 --- a/terraform/gcp/single-into-new-vpc/variables.tf +++ b/terraform/gcp/single-into-new-vpc/variables.tf @@ -19,7 +19,12 @@ variable "zone" { } variable "image_name" { type = string - description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" + description = "The single gateway and management image name" +} +variable "os_version" { + type = string + description = "GAIA OS version" + default = "R8120" } variable "installationType" { type = string @@ -149,6 +154,11 @@ variable "admin_SSH_key" { description = "(Optional) The SSH public key for SSH authentication to the template instances. Leave this field blank to use all project-wide pre-configured SSH keys." default = "" } +variable "maintenance_mode_password_hash" { + description = "Maintenance mode password hash, relevant only for R81.20 and higher versions" + type = string + default = "" +} variable "sicKey" { type = string description ="The Secure Internal Communication one time secret used to set up trust between the single gateway object and the management server" From 97324254f23360fd0598c1f68d25cf71776b10c5 Mon Sep 17 00:00:00 2001 From: yairra Date: Thu, 26 Sep 2024 17:10:09 +0300 Subject: [PATCH 04/12] Azure TF | Updated azurerm provider veriosn to 3.90.0 --- terraform/azure/high-availability-existing-vnet/versions.tf | 2 +- terraform/azure/high-availability-new-vnet/versions.tf | 2 +- terraform/azure/management-existing-vnet/versions.tf | 2 +- terraform/azure/management-new-vnet/versions.tf | 2 +- terraform/azure/mds-existing-vnet/versions.tf | 2 +- terraform/azure/mds-new-vnet/versions.tf | 2 +- terraform/azure/nva-into-existing-hub/versions.tf | 2 +- terraform/azure/nva-into-new-vwan/versions.tf | 2 +- terraform/azure/single-gateway-existing-vnet/versions.tf | 2 +- terraform/azure/single-gateway-new-vnet/versions.tf | 2 +- terraform/azure/vmss-existing-vnet/versions.tf | 2 +- terraform/azure/vmss-new-vnet/versions.tf | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/terraform/azure/high-availability-existing-vnet/versions.tf b/terraform/azure/high-availability-existing-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/high-availability-existing-vnet/versions.tf +++ b/terraform/azure/high-availability-existing-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/high-availability-new-vnet/versions.tf b/terraform/azure/high-availability-new-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/high-availability-new-vnet/versions.tf +++ b/terraform/azure/high-availability-new-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/management-existing-vnet/versions.tf b/terraform/azure/management-existing-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/management-existing-vnet/versions.tf +++ b/terraform/azure/management-existing-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/management-new-vnet/versions.tf b/terraform/azure/management-new-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/management-new-vnet/versions.tf +++ b/terraform/azure/management-new-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/mds-existing-vnet/versions.tf b/terraform/azure/mds-existing-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/mds-existing-vnet/versions.tf +++ b/terraform/azure/mds-existing-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/mds-new-vnet/versions.tf b/terraform/azure/mds-new-vnet/versions.tf index de940e72..0018913d 100755 --- a/terraform/azure/mds-new-vnet/versions.tf +++ b/terraform/azure/mds-new-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/nva-into-existing-hub/versions.tf b/terraform/azure/nva-into-existing-hub/versions.tf index 1c68a298..2c81dc30 100644 --- a/terraform/azure/nva-into-existing-hub/versions.tf +++ b/terraform/azure/nva-into-existing-hub/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = " 3.79.0" + version = "~> 3.90.0" } } } diff --git a/terraform/azure/nva-into-new-vwan/versions.tf b/terraform/azure/nva-into-new-vwan/versions.tf index 40d04f16..ca6ac207 100644 --- a/terraform/azure/nva-into-new-vwan/versions.tf +++ b/terraform/azure/nva-into-new-vwan/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = " 3.79.0" + version = "~> 3.90.0" } } } diff --git a/terraform/azure/single-gateway-existing-vnet/versions.tf b/terraform/azure/single-gateway-existing-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/single-gateway-existing-vnet/versions.tf +++ b/terraform/azure/single-gateway-existing-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/single-gateway-new-vnet/versions.tf b/terraform/azure/single-gateway-new-vnet/versions.tf index 0d5ca4f3..8827a9f0 100755 --- a/terraform/azure/single-gateway-new-vnet/versions.tf +++ b/terraform/azure/single-gateway-new-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/vmss-existing-vnet/versions.tf b/terraform/azure/vmss-existing-vnet/versions.tf index df4caa26..5bf8d9db 100644 --- a/terraform/azure/vmss-existing-vnet/versions.tf +++ b/terraform/azure/vmss-existing-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" diff --git a/terraform/azure/vmss-new-vnet/versions.tf b/terraform/azure/vmss-new-vnet/versions.tf index df4caa26..5bf8d9db 100644 --- a/terraform/azure/vmss-new-vnet/versions.tf +++ b/terraform/azure/vmss-new-vnet/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.81.0" + version = "~> 3.90.0" } random = { version = "~> 3.5.1" From 06565385944e3f0ff101a7021132ab03788ba600 Mon Sep 17 00:00:00 2001 From: natanelm Date: Mon, 30 Sep 2024 15:37:50 +0300 Subject: [PATCH 05/12] Git alignment --- azure/templates/README.MD | 2 +- .../createUiDefinition.json | 6 +++--- .../marketplace-ha/createUiDefinition.json | 6 +++--- .../marketplace-management/createUiDefinition.json | 4 ++-- .../marketplace-mds/createUiDefinition.json | 2 +- .../createUiDefinition.json | 4 ++-- .../marketplace-single-waap/mainTemplate.json | 7 ++----- .../marketplace-vmss-waap/createUiDefinition.json | 4 ++-- .../marketplace-vmss-waap/mainTemplate.json | 5 ++--- .../marketplace-vmss/createUiDefinition.json | 2 +- azure/templates/vwan-managed-app/README.md | 4 ++-- .../azure/vmss-new-vnet-with-peer/terraform.tfvars | 4 ++-- .../R8040-R81/ha-r8040-r81/mainTemplate.json | 6 +++--- .../R8040-R81/mds-r8040-r81/mainTemplate.json | 4 ++-- .../R8040-R81/mgmt-r840-r81/mainTemplate.json | 4 ++-- .../R8040-R81/single-r8040-r81/mainTemplate.json | 4 ++-- .../R8040-R81/vmss-r8040-r81/mainTemplate.json | 2 +- .../stack-ha-r8040-r81/mainTemplate.json | 2 +- .../stack-management-r8040-r81/mainTemplate.json | 2 +- .../stack-single-r8040-r81/mainTemplate.json | 2 +- .../high-availability-existing-vnet/README.md | 4 +++- .../azure/high-availability-new-vnet/README.md | 2 ++ terraform/azure/management-existing-vnet/README.md | 2 ++ terraform/azure/management-new-vnet/README.md | 2 ++ terraform/azure/mds-existing-vnet/README.md | 2 ++ terraform/azure/mds-new-vnet/README.md | 2 ++ terraform/azure/nva-into-existing-hub/README.md | 5 +++-- terraform/azure/nva-into-new-vwan/README.md | 5 +++-- .../azure/single-gateway-existing-vnet/README.md | 2 ++ terraform/azure/vmss-existing-vnet/README.md | 14 ++++++++------ .../azure/vmss-existing-vnet/terraform.tfvars | 3 ++- terraform/azure/vmss-existing-vnet/variables.tf | 10 +++++++++- terraform/azure/vmss-new-vnet/README.md | 2 ++ .../gcp/autoscale-into-existing-vpc/README.md | 2 +- terraform/gcp/high-availability/variables.tf | 2 +- terraform/gcp/single-into-existing-vpc/locals.tf | 5 +++-- .../gcp/single-into-existing-vpc/variables.tf | 2 +- terraform/gcp/single-into-new-vpc/README.md | 1 - terraform/gcp/single-into-new-vpc/variables.tf | 2 +- 39 files changed, 85 insertions(+), 60 deletions(-) diff --git a/azure/templates/README.MD b/azure/templates/README.MD index e5ef10fb..522ac7cb 100644 --- a/azure/templates/README.MD +++ b/azure/templates/README.MD @@ -66,4 +66,4 @@ To deploy a specific Azure image, adjust the image version during the manual dep template_name: management template_version: 20231002 template_type: marketplace - + \ No newline at end of file diff --git a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json index 1de1c662..54fd25cc 100644 --- a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json +++ b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json @@ -1120,7 +1120,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -1508,9 +1508,9 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } } -} +} \ No newline at end of file diff --git a/azure/templates/marketplace-ha/createUiDefinition.json b/azure/templates/marketplace-ha/createUiDefinition.json index c770250c..886f864a 100644 --- a/azure/templates/marketplace-ha/createUiDefinition.json +++ b/azure/templates/marketplace-ha/createUiDefinition.json @@ -836,7 +836,7 @@ } }, { - "visible": "[bool(basics('auth').sshPublicKey)]", + "visible": "[bool(basics('auth').sshPublicKey)]", "name": "EnableSerialConsolePassword", "type": "Microsoft.Common.OptionsGroup", "label": "Enable Serial console password", @@ -946,7 +946,7 @@ "label": "Availability options", "defaultValue": "Availability Set", "toolTip": "Use replicated Cluster VMs in Availability Set or Availability Zones. Note that the load balancers and their IP addresses will be zone redundant in any case.", - "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth \\ ', concat(' ', location(), ' '))]", + "visible": "[contains(' australiaeast brazilsouth canadacentral centralus eastasia eastus eastus2 francecentral germanywestcentral japaneast koreacentral northeurope norwayeast southafricanorth southcentralus southeastasia swedencentral uksouth usgovvirginia westeurope westus2 westus3 switzerlandnorth qatarcentral centralindia uaenorth italynorth ', concat(' ', location(), ' '))]", "constraints": { "allowedValues": [ { @@ -1640,7 +1640,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", "VipsNumber": "[int(steps('network').Vips_Number)]", "VipNames": "[concat(steps('network').VIP_Names.VIP2_Name, ',', steps('network').VIP_Names.VIP3_Name, ',', steps('network').VIP_Names.VIP4_Name, ',', steps('network').VIP_Names.VIP5_Name, ',', steps('network').VIP_Names.VIP6_Name, ',', steps('network').VIP_Names.VIP7_Name, ',', steps('network').VIP_Names.VIP8_Name, ',', steps('network').VIP_Names.VIP9_Name, ',', steps('network').VIP_Names.VIP10_Name)]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", diff --git a/azure/templates/marketplace-management/createUiDefinition.json b/azure/templates/marketplace-management/createUiDefinition.json index 7e945af8..fdb719a2 100644 --- a/azure/templates/marketplace-management/createUiDefinition.json +++ b/azure/templates/marketplace-management/createUiDefinition.json @@ -422,7 +422,7 @@ } ] } - }, + }, { "name": "enableApi", "type": "Microsoft.Common.DropDown", @@ -694,7 +694,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } diff --git a/azure/templates/marketplace-mds/createUiDefinition.json b/azure/templates/marketplace-mds/createUiDefinition.json index de11e136..ad06592d 100644 --- a/azure/templates/marketplace-mds/createUiDefinition.json +++ b/azure/templates/marketplace-mds/createUiDefinition.json @@ -629,7 +629,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } diff --git a/azure/templates/marketplace-single-waap/createUiDefinition.json b/azure/templates/marketplace-single-waap/createUiDefinition.json index 42e2ebff..3ebd285b 100755 --- a/azure/templates/marketplace-single-waap/createUiDefinition.json +++ b/azure/templates/marketplace-single-waap/createUiDefinition.json @@ -67,8 +67,8 @@ "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", "constraints": { "required": true, - "regex": "^cp-(([a-z0-9A-Z-]{72,72})|([a-z0-9A-Z-]{75,75}))$", - "validationMessage": "Token should begin with 'cp-' and must be 75 or 78 characters long" + "regex": "^cp-[a-z0-9A-Z-]{72,72}$", + "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" }, "options": { "hideConfirmation": false diff --git a/azure/templates/marketplace-single-waap/mainTemplate.json b/azure/templates/marketplace-single-waap/mainTemplate.json index d7704b90..1d4f4b84 100755 --- a/azure/templates/marketplace-single-waap/mainTemplate.json +++ b/azure/templates/marketplace-single-waap/mainTemplate.json @@ -50,7 +50,7 @@ "waapAgentToken": { "type": "securestring", "minLength": 75, - "maxLength": 78, + "maxLength": 75, "metadata": { "description": "Infinity Next Agent Token" } @@ -203,7 +203,7 @@ }, "variables": { "templateName": "checkpoint_waap", - "templateVersion": "20211028", + "templateVersion": "20210922", "location": "[parameters('location')]", "osVersion": "R8040", "installationType": "waap", @@ -282,9 +282,6 @@ { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", - "properties": { - "minimalTlsVersion": "TLS1_2" - }, "apiVersion": "2021-04-01", "location": "[variables('location')]", "sku": { diff --git a/azure/templates/marketplace-vmss-waap/createUiDefinition.json b/azure/templates/marketplace-vmss-waap/createUiDefinition.json index 51c05e9c..2ca24a11 100755 --- a/azure/templates/marketplace-vmss-waap/createUiDefinition.json +++ b/azure/templates/marketplace-vmss-waap/createUiDefinition.json @@ -67,8 +67,8 @@ "toolTip": "Token can be obtained by logging in to [https://portal.checkpoint.com/](https://portal.checkpoint.com/) –> INFINITY POLICY -> CLOUD -> Profiles", "constraints": { "required": true, - "regex": "^cp-(([a-z0-9A-Z-]{72,72})|([a-z0-9A-Z-]{75,75}))$", - "validationMessage": "Token should begin with 'cp-' and must be 75 or 78 characters long" + "regex": "^cp-[a-z0-9A-Z-]{72,72}$", + "validationMessage": "Token should begin with 'cp-' and must be 75 characters long" }, "options": { "hideConfirmation": false diff --git a/azure/templates/marketplace-vmss-waap/mainTemplate.json b/azure/templates/marketplace-vmss-waap/mainTemplate.json index 0b921194..df1bc1cf 100755 --- a/azure/templates/marketplace-vmss-waap/mainTemplate.json +++ b/azure/templates/marketplace-vmss-waap/mainTemplate.json @@ -51,7 +51,7 @@ "waapAgentToken": { "type": "securestring", "minLength": 75, - "maxLength": 78, + "maxLength": 75, "metadata": { "description": "Infinity Next Agent Token" } @@ -73,7 +73,6 @@ "availabilityZonesNum": { "type": "int", "allowedValues": [ - 0, 1, 2, 3 @@ -388,7 +387,7 @@ }, "variables": { "templateName": "waap_vmss", - "templateVersion": "20211028", + "templateVersion": "20210922", "location": "[parameters('location')]", "osVersion": "R8040", "isBlink": true, diff --git a/azure/templates/marketplace-vmss/createUiDefinition.json b/azure/templates/marketplace-vmss/createUiDefinition.json index 0f2cf56a..cf04efcd 100644 --- a/azure/templates/marketplace-vmss/createUiDefinition.json +++ b/azure/templates/marketplace-vmss/createUiDefinition.json @@ -1744,7 +1744,7 @@ "deployNewNSG": "[steps('network').NSG]", "ExistingNSG": "[steps('network').nsgSelector]", "NewNsgName": "[steps('network').NSGName]", - "addStorageAccountIpRules":"[steps('network').addStorageAccountIpRules]", + "addStorageAccountIpRules": "[steps('network').addStorageAccountIpRules]", "SerialConsolePasswordHash": "[steps('chkp').AdditionalPassword]", "MaintenanceModePasswordHash": "[steps('chkp').MaintenanceModePassword]" } diff --git a/azure/templates/vwan-managed-app/README.md b/azure/templates/vwan-managed-app/README.md index 085e0620..293238e2 100644 --- a/azure/templates/vwan-managed-app/README.md +++ b/azure/templates/vwan-managed-app/README.md @@ -64,8 +64,8 @@ https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft } ], "availableVersions": [ - "8110.900335.1435", - "8120.900631.1433", + "8110.900335.1522", + "8120.900631.1522", "latest" ], "marketPlaceLink": "https://aka.ms/Checkpointmarketplace", diff --git a/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars b/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars index 8fda9c83..81133f6f 100755 --- a/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars +++ b/contrib/terraform/azure/vmss-new-vnet-with-peer/terraform.tfvars @@ -25,5 +25,5 @@ configuration_template_name = "PLEASE ENTER CONFIGURATION TEMPLATE NAME" notification_email = "PLEASE ENTER NOTIFICATION MAIL OR LEAVE EMPTY DOUBLE QUOTES" # "name@company.com" frontend_load_distribution = "PLEASE ENTER EXTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" backend_load_distribution = "PLEASE ENTER INTERNAL LOAD BALANCER SESSION PERSISTENCE" # "Default" -mgmt_vnet_name = "PLEASE ENTER MANAGEMENT VIRTUAL NETWORK NAME" # "mgmt-vnet" -mgmt_resource_group_name = "PLEASE ENTER MANAGEMENT RESOURCE GROUP NAME" # "management" +mgmt_vnet_name = "PLEASE ENTER MANAGEMENT VIRTUAL NETWORK NAME" # "mgmt-vnet" +mgmt_resource_group_name = "PLEASE ENTER MANAGEMENT RESOURCE GROUP NAME" # "management" diff --git a/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json index 59952e87..b281ecef 100644 --- a/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/R8040-R81/ha-r8040-r81/mainTemplate.json @@ -17,7 +17,7 @@ "R80.40 - Pay As You Go (NGTX)", "R81 - Bring Your Own License", "R81 - Pay As You Go (NGTP)", - "R81 - Pay As You Go (NGTX)", + "R81 - Pay As You Go (NGTX)" ], "defaultValue": "R81 - Bring Your Own License", "metadata": { @@ -361,7 +361,7 @@ "R80.40 - Pay As You Go (NGTX)": "NGTX", "R81 - Bring Your Own License": "BYOL", "R81 - Pay As You Go (NGTP)": "NGTP", - "R81 - Pay As You Go (NGTX)": "NGTX", + "R81 - Pay As You Go (NGTX)": "NGTX" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { @@ -370,7 +370,7 @@ "R80.40 - Pay As You Go (NGTX)": "R8040", "R81 - Bring Your Own License": "R81", "R81 - Pay As You Go (NGTP)": "R81", - "R81 - Pay As You Go (NGTX)": "R81", + "R81 - Pay As You Go (NGTX)": "R81" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "SerialConsoleGeographies": { diff --git a/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json index c9800935..fc8ce67a 100644 --- a/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/R8040-R81/mds-r8040-r81/mainTemplate.json @@ -13,9 +13,9 @@ "type": "string", "allowedValues": [ "R80.40 - Bring Your Own License", - "R81 - Bring Your Own License", + "R81 - Bring Your Own License" ], - "defaultValue": "R81.20 - Bring Your Own License", + "defaultValue": "R81 - Bring Your Own License", "metadata": { "description": "Version of Check Point CloudGuard" } diff --git a/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json index 44f62298..72ecc81c 100644 --- a/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json +++ b/deprecated/azure/templates/R8040-R81/mgmt-r840-r81/mainTemplate.json @@ -17,7 +17,7 @@ "R81 - Bring Your Own License", "R81 - Pay As You Go (MGMT25)" ], - "defaultValue": "R81.20 - Bring Your Own License", + "defaultValue": "R81 - Bring Your Own License", "metadata": { "description": "Version of Check Point CloudGuard" } @@ -319,7 +319,7 @@ "storageAccountType": "Standard_LRS", "diskSize100GB": 100, "diskSizeGB": "[add(parameters('additionalDiskSizeGB'), variables('diskSize100GB'))]", - "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'enableApi=\"', parameters('enableApi'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', parameters('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", "customData64": "[base64(variables('customData'))]", "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", "imagePublisher": "checkpoint", diff --git a/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json index 911b8572..95563c19 100644 --- a/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/R8040-R81/single-r8040-r81/mainTemplate.json @@ -24,9 +24,9 @@ "R80.40 - Pay As You Go (NGTX)", "R81 - Bring Your Own License", "R81 - Pay As You Go (NGTP)", - "R81 - Pay As You Go (NGTX)", + "R81 - Pay As You Go (NGTX)" ], - "defaultValue": "R81.20 - Bring Your Own License", + "defaultValue": "R81 - Bring Your Own License", "metadata": { "description": "Version of Check Point CloudGuard" } diff --git a/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json index b343976c..4a0efc1f 100644 --- a/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/R8040-R81/vmss-r8040-r81/mainTemplate.json @@ -561,7 +561,7 @@ "additionalDiskSizeGB": "[if(contains('R8040 R81', variables('osVersion')), 0, parameters('additionalDiskSizeGB'))]", "diskSizeGB": "[add(variables('additionalDiskSizeGB'), variables('diskSize100GB'))]", "enableFloatingIP": "[equals(parameters('floatingIP'), 'yes')]", - "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", + "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", "imagePublisher": "checkpoint", "imageReferenceBYOL": { diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json index 0847143c..c776a882 100644 --- a/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/stack-R8040-R81/stack-ha-r8040-r81/mainTemplate.json @@ -17,7 +17,7 @@ "R80.40 - Pay As You Go (NGTX)", "R81 - Bring Your Own License", "R81 - Pay As You Go (NGTP)", - "R81 - Pay As You Go (NGTX)", + "R81 - Pay As You Go (NGTX)" ], "defaultValue": "R81 - Bring Your Own License", "metadata": { diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json index d2e59edb..bbee571d 100644 --- a/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/stack-R8040-R81/stack-management-r8040-r81/mainTemplate.json @@ -15,7 +15,7 @@ "R80.40 - Bring Your Own License", "R80.40 - Pay As You Go (MGMT25)", "R81 - Bring Your Own License", - "R81 - Pay As You Go (MGMT25)", + "R81 - Pay As You Go (MGMT25)" ], "defaultValue": "R81 - Bring Your Own License", "metadata": { diff --git a/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json index 50422c53..a6d5f888 100644 --- a/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json +++ b/deprecated/azure/templates/stack-R8040-R81/stack-single-r8040-r81/mainTemplate.json @@ -17,7 +17,7 @@ "R80.40 - Pay As You Go (NGTX)", "R81 - Bring Your Own License", "R81 - Pay As You Go (NGTP)", - "R81 - Pay As You Go (NGTX)", + "R81 - Pay As You Go (NGTX)" ], "defaultValue": "R81 - Bring Your Own License", "metadata": { diff --git a/terraform/azure/high-availability-existing-vnet/README.md b/terraform/azure/high-availability-existing-vnet/README.md index 666aec67..2aa7468d 100755 --- a/terraform/azure/high-availability-existing-vnet/README.md +++ b/terraform/azure/high-availability-existing-vnet/README.md @@ -215,7 +215,9 @@ availability_type = "Availability Zone" In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | -| ---------------- | ------------- | +| ---------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230212 | - Added Smart-1 Cloud support | diff --git a/terraform/azure/high-availability-new-vnet/README.md b/terraform/azure/high-availability-new-vnet/README.md index 2218fd5a..15bfa197 100755 --- a/terraform/azure/high-availability-new-vnet/README.md +++ b/terraform/azure/high-availability-new-vnet/README.md @@ -215,6 +215,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Updated managed identity permissions
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230212 | - Added Smart-1 Cloud support | diff --git a/terraform/azure/management-existing-vnet/README.md b/terraform/azure/management-existing-vnet/README.md index e2877075..41c772e4 100755 --- a/terraform/azure/management-existing-vnet/README.md +++ b/terraform/azure/management-existing-vnet/README.md @@ -168,6 +168,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/management-new-vnet/README.md b/terraform/azure/management-new-vnet/README.md index 8851e3d6..bd14ac2d 100755 --- a/terraform/azure/management-new-vnet/README.md +++ b/terraform/azure/management-new-vnet/README.md @@ -166,6 +166,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/mds-existing-vnet/README.md b/terraform/azure/mds-existing-vnet/README.md index f83a56e8..6980d7cc 100755 --- a/terraform/azure/mds-existing-vnet/README.md +++ b/terraform/azure/mds-existing-vnet/README.md @@ -182,6 +182,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | diff --git a/terraform/azure/mds-new-vnet/README.md b/terraform/azure/mds-new-vnet/README.md index cb782964..8b3afc49 100755 --- a/terraform/azure/mds-new-vnet/README.md +++ b/terraform/azure/mds-new-vnet/README.md @@ -175,6 +175,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security MDS Terraform deployment for Azure | diff --git a/terraform/azure/nva-into-existing-hub/README.md b/terraform/azure/nva-into-existing-hub/README.md index 253cce89..a2765298 100644 --- a/terraform/azure/nva-into-existing-hub/README.md +++ b/terraform/azure/nva-into-existing-hub/README.md @@ -1,6 +1,6 @@ # Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure -This Terraform module deploys Check Point CloudGuard Network Security vWAN NVA solution into an existing vWAN Hub in Azure. +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into an existing vWAN Hub in Azure. As part of the deployment the following resources are created: - Resource groups - Azure Managed Application: @@ -77,7 +77,7 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https | | | | | | | **vwan-hub-name** | The name of the virtual WAN hub that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | n/a | | | | | | | - | **vwan-hub-resource-group** | The vWAN hub resource group name | string | | n/a | + | **vwan-hub-resource-group** | The virtual WAN hub resource group name | string | | n/a | | | | | | | | **managed-app-name** | The name of the managed application that will be created | string | The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens | "tf-vwan-managed-app-nva" | | | | | | | @@ -161,6 +161,7 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|-------------------| +| 20240613 | Cosmetic fixes & default values | | 20240228 | Added public IP for ingress support | | | | 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | diff --git a/terraform/azure/nva-into-new-vwan/README.md b/terraform/azure/nva-into-new-vwan/README.md index c7f06c09..17fa1ffe 100644 --- a/terraform/azure/nva-into-new-vwan/README.md +++ b/terraform/azure/nva-into-new-vwan/README.md @@ -1,6 +1,6 @@ # Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure -This Terraform module deploys Check Point CloudGuard Network Security vWAN NVA solution into a new vWAN Hub in Azure. +This Terraform module deploys Check Point CloudGuard Network Security Virtual WAN NVA solution into a new vWAN Hub in Azure. As part of the deployment the following resources are created: - Resource groups - Virtual WAN @@ -170,7 +170,8 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | -|------------------|---------------------------------------------------------------------------------------------------| +|------------------|-----------------------------------------------------------------------------------------------| +| 20240613 | Cosmetic fixes & default values | | 20240228 | Added public IP for ingress support | | | | 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | diff --git a/terraform/azure/single-gateway-existing-vnet/README.md b/terraform/azure/single-gateway-existing-vnet/README.md index feebb542..b49b1886 100755 --- a/terraform/azure/single-gateway-existing-vnet/README.md +++ b/terraform/azure/single-gateway-existing-vnet/README.md @@ -185,6 +185,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------| +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Added accelerated networking to SGW Terraform templates
- Updated Public IP sku to Standard
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230629 | First release of Check Point CloudGuard Network Security Single GW Terraform deployment for Azure | diff --git a/terraform/azure/vmss-existing-vnet/README.md b/terraform/azure/vmss-existing-vnet/README.md index f0602c30..73b83eb3 100755 --- a/terraform/azure/vmss-existing-vnet/README.md +++ b/terraform/azure/vmss-existing-vnet/README.md @@ -72,7 +72,7 @@ This solution uses the following modules: ### terraform.tfvars variables: | Name | Description | Type | Allowed values | Default | - | ------------- | ------------- | ------------- | ------------- | ------------- | + | ------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- | ------------- | ------------- | | **client_secret** | The client secret of the Service Principal used to deploy the solution | string | | n/a | | | | | | | **client_id** | The client ID of the Service Principal used to deploy the solution | string | | n/a @@ -97,7 +97,7 @@ This solution uses the following modules: | | | | | | | **backend_subnet_name** | Specifies the name of the internal subnet | string | The exact name of the existing internal subnet | n/a | | | | | | - | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix| string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a + | **backend_lb_IP_address** | Is a whole number that can be represented as a binary integer with no more than the number of digits remaining in the address after the given prefix | string | Starting from 5-th IP address in a subnet. For example: subnet - 10.0.1.0/24, backend_lb_IP_address = 4 , the LB IP is 10.0.1.4 | n/a | | | | | | | **admin_password** | The password associated with the local administrator account on each cluster member | string | Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character | n/a | | | | | | @@ -151,6 +151,8 @@ This solution uses the following modules: | | | | | | | **maintenance_mode_password_hash** | Maintenance mode password hash, relevant only for R81.20 and higher versions, to generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here | string | | n/a | | | | | | + | **nsg_id** | Optional ID for a Network Security Group that already exists in Azure, if not provided, will create a default NSG | string | Existing NSG resource ID | "" + | | | | | | | **add_storage_account_ip_rules** | Add Storage Account IP rules that allow access to the Serial Console only for IPs based on their geographic location, if false then accses will be allowed from all networks | boolean | true;
false; | false | | | | | | | **storage_account_additional_ips** | IPs/CIDRs that are allowed access to the Storage Account | list(string) | A list of valid IPs and CIDRs | [] @@ -200,7 +202,8 @@ enable_custom_metrics = true deployment_mode = "Standard" admin_shell = "/etc/cli.sh" serial_console_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + maintenance_mode_password_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + nsg_id = "" add_storage_account_ip_rules = false storage_account_additional_ips = [] @@ -212,15 +215,14 @@ enable_custom_metrics = true ## Known limitations -1. Deploy the VMSS with External load balancer only (Inbound inspection only) is not supported -2. Deploy the VMSS with Internal load balancer only (Outbound and E-W inspection only) is not supported - ## Revision History In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | | ---------------- | ------------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/azure/vmss-existing-vnet/terraform.tfvars b/terraform/azure/vmss-existing-vnet/terraform.tfvars index 399ffeef..66836af3 100755 --- a/terraform/azure/vmss-existing-vnet/terraform.tfvars +++ b/terraform/azure/vmss-existing-vnet/terraform.tfvars @@ -39,4 +39,5 @@ admin_shell = "PLEASE ENTER ADMIN SHELL" serial_console_password_hash = "PLEASE ENTER SERIAL CONSOLE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" maintenance_mode_password_hash = "PLEASE ENTER MAINTENANCE MODE PASSWORD HASH" # "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" add_storage_account_ip_rules = "PLEASE ENTER true or false" # false -storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] \ No newline at end of file +storage_account_additional_ips = "PLEASE ENTER A LIST OF VALID IPS/CIDRS" # [] +nsg_id = "PLEASE ENTER NETWORK SECURITY GROUP ID" # "" \ No newline at end of file diff --git a/terraform/azure/vmss-existing-vnet/variables.tf b/terraform/azure/vmss-existing-vnet/variables.tf index aa405627..1ad5bb46 100755 --- a/terraform/azure/vmss-existing-vnet/variables.tf +++ b/terraform/azure/vmss-existing-vnet/variables.tf @@ -242,7 +242,10 @@ variable "storage_account_additional_ips" { type = list(string) description = "IPs/CIDRs that are allowed access to the Storage Account" default = [] -}//********************* Load Balancers Variables **********************// +} + +//********************* Load Balancers Variables **********************// + variable "deployment_mode" { description = "The type of the deployment, can be 'Standard' for both load balancers or 'External' for external load balancer or 'Internal for internal load balancer" type = string @@ -392,3 +395,8 @@ variable "enable_floating_ip" { type = bool default = false } + +variable "nsg_id" { + description = "NSG ID - Optional - if empty use default NSG" + default = "" +} diff --git a/terraform/azure/vmss-new-vnet/README.md b/terraform/azure/vmss-new-vnet/README.md index 06f786e7..71857101 100755 --- a/terraform/azure/vmss-new-vnet/README.md +++ b/terraform/azure/vmss-new-vnet/README.md @@ -221,6 +221,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | --------- | +| 20240613 | - Updated Azure Terraform provider version
- Cosmetic fixes & default values
- Added option to limit storage account access by specify allowed sourcess
- Updated diskSizeGB
- Added validation for os_version & os_offer | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20221124 | - Added R81.20 support
- Upgraded azurerm provider | diff --git a/terraform/gcp/autoscale-into-existing-vpc/README.md b/terraform/gcp/autoscale-into-existing-vpc/README.md index 2ce564df..45abf434 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/README.md +++ b/terraform/gcp/autoscale-into-existing-vpc/README.md @@ -199,7 +199,6 @@ Please leave empty list for a protocol if you want to disable traffic for it. | enable_monitoring | Enable Stackdriver monitoring | bool | true/false | false | no | - ## Outputs | Name | Description | | ------------- | ------------- | @@ -215,6 +214,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | SCTP_firewall_rules_name | If enable - the SCTP firewall rules name, otherwise, an empty list. | | ESP_firewall_rules_name | If enable - the ESP firewall rules name, otherwise, an empty list. | + ## Revision History In order to check the template version refer to the [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) diff --git a/terraform/gcp/high-availability/variables.tf b/terraform/gcp/high-availability/variables.tf index 72f4e916..114c8608 100755 --- a/terraform/gcp/high-availability/variables.tf +++ b/terraform/gcp/high-availability/variables.tf @@ -32,6 +32,7 @@ variable "os_version" { description = "GAIA OS version" default = "R8120" } + # --- Instances Configuration --- data "google_compute_regions" "available_regions" { } @@ -129,7 +130,6 @@ resource "null_resource" "validate_both_tokens" { resource "null_resource" "validate_different_tokens" { count = var.smart_1_cloud_token_a != "" && var.smart_1_cloud_token_a == var.smart_1_cloud_token_b ? "To connect to Smart-1 Cloud, you must provide two different tokens" : 0 } - # --- Networking --- variable "cluster_network_cidr" { type = string diff --git a/terraform/gcp/single-into-existing-vpc/locals.tf b/terraform/gcp/single-into-existing-vpc/locals.tf index 3bfa4737..78145861 100755 --- a/terraform/gcp/single-into-existing-vpc/locals.tf +++ b/terraform/gcp/single-into-existing-vpc/locals.tf @@ -58,6 +58,7 @@ locals { // Will fail if management_only and payg is_management_only = var.installationType == "Management only" is_license_payg = var.license == "PAYG" - validation_massage = "Cannot use 'Management only' installation type with 'Payg' license." - _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_massage : "") + validation_message = "Cannot use 'Management only' installation type with 'PAYG' license." + _= regex("^$",local.is_management_only && local.is_license_payg ? local.validation_message : "") + } \ No newline at end of file diff --git a/terraform/gcp/single-into-existing-vpc/variables.tf b/terraform/gcp/single-into-existing-vpc/variables.tf index 196e4678..ef107746 100755 --- a/terraform/gcp/single-into-existing-vpc/variables.tf +++ b/terraform/gcp/single-into-existing-vpc/variables.tf @@ -15,7 +15,7 @@ variable "zone" { } variable "image_name" { type = string - description = "The single gateway and management image name" + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" } variable "os_version" { type = string diff --git a/terraform/gcp/single-into-new-vpc/README.md b/terraform/gcp/single-into-new-vpc/README.md index 62e0b19f..59db07be 100644 --- a/terraform/gcp/single-into-new-vpc/README.md +++ b/terraform/gcp/single-into-new-vpc/README.md @@ -265,7 +265,6 @@ In order to check the template version refer to the [sk116585](https://supportce | 20230921 | Added single-into-new-vpc template. | | | | - ## Authors diff --git a/terraform/gcp/single-into-new-vpc/variables.tf b/terraform/gcp/single-into-new-vpc/variables.tf index 6a40d8e8..eb6e7120 100644 --- a/terraform/gcp/single-into-new-vpc/variables.tf +++ b/terraform/gcp/single-into-new-vpc/variables.tf @@ -19,7 +19,7 @@ variable "zone" { } variable "image_name" { type = string - description = "The single gateway and management image name" + description = "The single gateway and management image name. You can choose the desired image value from: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py" } variable "os_version" { type = string From 69ad67536d9a7a76f91d2513f724f17b1e5841b0 Mon Sep 17 00:00:00 2001 From: natanelm Date: Mon, 30 Sep 2024 17:19:30 +0300 Subject: [PATCH 06/12] Align aws --- aws/templates/asg/autoscale.yaml | 9 ++++----- aws/templates/cluster/cluster-master.yaml | 10 +++++----- aws/templates/cluster/cluster.yaml | 17 ++++++++--------- .../cross-az-cluster-master.yaml | 10 +++++----- .../cross-az-cluster/cross-az-cluster.yaml | 16 ++++++++-------- .../geo-cluster/geo-cluster-master.yaml | 10 +++++----- aws/templates/geo-cluster/geo-cluster.yaml | 16 ++++++++-------- aws/templates/gwlb-asg/gwlb-master.yaml | 10 +++++----- aws/templates/gwlb-asg/gwlb.yaml | 6 +++--- aws/templates/gwlb-asg/qs-gwlb-master.yaml | 8 ++++---- aws/templates/gwlb-asg/qs-gwlb.yaml | 10 +++++----- aws/templates/gwlb-asg/tgw-gwlb-master.yaml | 10 +++++----- aws/templates/gwlb-asg/tgw-gwlb.yaml | 4 ++-- aws/templates/management/management.yaml | 10 +++++----- aws/templates/mds/mds.yaml | 12 ++++++------ aws/templates/single-gw/gateway-master.yaml | 8 ++++---- aws/templates/single-gw/gateway.yaml | 10 +++++----- .../standalone/standalone-master.yaml | 8 ++++---- aws/templates/standalone/standalone.yaml | 10 +++++----- aws/templates/tgw-asg/tgw-asg-master.yaml | 10 +++++----- aws/templates/tgw-asg/tgw-asg.yaml | 10 +++++----- .../tgw-cross-az-cluster-master.yaml | 10 +++++----- .../tgw-cross-az-cluster.yaml | 10 ++++------ aws/templates/tgw-ha/tgw-ha-master.yaml | 10 +++++----- aws/templates/tgw-ha/tgw-ha.yaml | 8 ++++---- terraform/alicloud/cluster-master/README.md | 2 +- terraform/alicloud/cluster/README.md | 2 +- terraform/alicloud/gateway-master/README.md | 2 +- terraform/alicloud/gateway/README.md | 2 +- terraform/alicloud/management-master/README.md | 3 ++- terraform/alicloud/management/README.md | 5 +++-- terraform/aws/autoscale-gwlb/README.md | 2 +- terraform/aws/autoscale/README.md | 2 +- terraform/aws/cluster/README.md | 2 +- terraform/aws/gateway/README.md | 2 +- terraform/aws/gwlb-master/README.md | 3 ++- terraform/aws/qs-autoscale-master/README.md | 1 + terraform/aws/qs-autoscale/README.md | 4 +++- terraform/aws/standalone-master/locals.tf | 1 - terraform/aws/standalone/README.md | 18 ++++-------------- .../aws/tgw-cross-az-cluster-master/README.md | 3 ++- terraform/aws/tgw-cross-az-cluster/README.md | 4 +++- terraform/aws/tgw-gwlb-master/README.md | 3 ++- terraform/aws/tgw-gwlb/README.md | 3 ++- 44 files changed, 156 insertions(+), 160 deletions(-) diff --git a/aws/templates/asg/autoscale.yaml b/aws/templates/asg/autoscale.yaml index 97627bd8..04a1adbb 100644 --- a/aws/templates/asg/autoscale.yaml +++ b/aws/templates/asg/autoscale.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Create an Auto Scaling group of Check Point gateways (__VERSION__) +Description: Create an Auto Scaling group of Check Point gateways (20240417) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -410,7 +410,7 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: ChkpGatewayPolicy PolicyRole: !Ref ChkpGatewayRole @@ -424,7 +424,7 @@ Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] NotificationTopic: @@ -545,7 +545,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"autoscale\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"autoscale\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version GatewayScaleUpPolicy: Type: AWS::AutoScaling::ScalingPolicy @@ -612,4 +612,3 @@ Outputs: SecurityGroup: Description: The Security Group of the Auto Scaling group. Value: !GetAtt PermissiveSecurityGroup.GroupId - diff --git a/aws/templates/cluster/cluster-master.yaml b/aws/templates/cluster/cluster-master.yaml index 6243e34c..87d54b56 100755 --- a/aws/templates/cluster/cluster-master.yaml +++ b/aws/templates/cluster/cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (__VERSION__) +Description: Deploy a Check Point Cluster in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -395,7 +395,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -414,7 +414,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: __URL__/cluster/cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -499,12 +499,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/cluster/cluster.yaml b/aws/templates/cluster/cluster.yaml index f1263257..9bea983a 100755 --- a/aws/templates/cluster/cluster.yaml +++ b/aws/templates/cluster/cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (__VERSION__) +Description: Deploys a Check Point Cluster into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -412,7 +412,7 @@ Resources: Condition: CreateRole Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cluster-iam-role.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -422,14 +422,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName'] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join [-, [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -610,7 +610,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version MemberBGatewayLaunchTemplate: Type: AWS::EC2::LaunchTemplate @@ -653,7 +653,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20230923\" templateName=\"cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version ClusterPublicAddress: Type: AWS::EC2::EIP @@ -747,12 +747,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [[!Ref MemberBToken], !Ref MemberAToken] @@ -762,4 +762,3 @@ Rules: - AssertDescription: "The same Smart-1 Cloud token is used for the two Cluster members. Each Cluster member must have a unique token" Assert: !Equals [ !Ref MemberBToken, '' ] - diff --git a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml index dcc61a70..9826d072 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (__VERSION__) +Description: Deploy a Check Point Cluster in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -401,7 +401,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -422,7 +422,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: __URL__/cluster/cross-az-cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -508,12 +508,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/cross-az-cluster/cross-az-cluster.yaml b/aws/templates/cross-az-cluster/cross-az-cluster.yaml index 5d294579..3c5f6ad8 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (__VERSION__) +Description: Deploys a Check Point Cluster into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -426,7 +426,7 @@ Resources: Condition: CreateRole Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cluster-iam-role.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -436,14 +436,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -669,7 +669,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version MemberBGatewayLaunchTemplate: Type: AWS::EC2::LaunchTemplate @@ -716,7 +716,7 @@ Resources: - !Join [ '', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"cross_az_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" clusterIp=\"${cluster_ip}\" secondaryIp=\"${secondary_ip}\" otherMemberPrivateClusterIp=\"${remote_secondary_ip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version Outputs: ClusterPublicAddress: @@ -772,12 +772,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/geo-cluster/geo-cluster-master.yaml b/aws/templates/geo-cluster/geo-cluster-master.yaml index a07c6ed7..b2d4e02f 100644 --- a/aws/templates/geo-cluster/geo-cluster-master.yaml +++ b/aws/templates/geo-cluster/geo-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point cross AZ Cluster in a new VPC (__VERSION__) +Description: Deploy a Check Point cross AZ Cluster in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -413,7 +413,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -433,7 +433,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/cluster/geo-cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -507,12 +507,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/geo-cluster/geo-cluster.yaml b/aws/templates/geo-cluster/geo-cluster.yaml index eee0a855..c358dfba 100644 --- a/aws/templates/geo-cluster/geo-cluster.yaml +++ b/aws/templates/geo-cluster/geo-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point cross AZ Cluster into an existing VPC (__VERSION__) +Description: Deploys a Check Point cross AZ Cluster into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -427,7 +427,7 @@ Resources: ClusterRole: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cluster-iam-role.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cluster-iam-role.yaml ClusterInstanceProfile: Type: AWS::IAM::InstanceProfile Properties: @@ -437,14 +437,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !If [CreateRole, !GetAtt ClusterRole.Outputs.ClusterIAMRole, !Ref GatewayPredefinedRole] AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion, GW]] PermissiveSecurityGroup: @@ -601,7 +601,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenA}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" elasticIp=\"${eip}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' MemberBGatewayLaunchTemplate: Type: AWS::EC2::LaunchTemplate Properties: @@ -643,7 +643,7 @@ Resources: - !Join [ '', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"' ] ] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${tokenB}\"" installationType=\"geo-cluster\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"geo_cluster\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" elasticIp=\"${eip}\" otherMemberIp=\"${other_member_ip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version MemberAPublicAddress: Type: AWS::EC2::EIP @@ -718,12 +718,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/gwlb-asg/gwlb-master.yaml b/aws/templates/gwlb-asg/gwlb-master.yaml index 6766a1b3..0e4eb4c7 100644 --- a/aws/templates/gwlb-asg/gwlb-master.yaml +++ b/aws/templates/gwlb-asg/gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -647,7 +647,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',' , !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -660,7 +660,7 @@ Resources: GWLBStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID GatewaysSubnets: !Join @@ -728,7 +728,7 @@ Outputs: Value: !GetAtt GWLBStack.Outputs.GWLBServiceName Rules: GatewayAddressAllocationRule: - RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] - Assertions: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/gwlb.yaml b/aws/templates/gwlb-asg/gwlb.yaml index 8d0340f7..50d8e335 100644 --- a/aws/templates/gwlb-asg/gwlb.yaml +++ b/aws/templates/gwlb-asg/gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -642,7 +642,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/autoscale-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -674,7 +674,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: DeployManagement Properties: - TemplateURL: __URL__/gwlb/management-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml Parameters: VPC: !Ref VPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] diff --git a/aws/templates/gwlb-asg/qs-gwlb-master.yaml b/aws/templates/gwlb-asg/qs-gwlb-master.yaml index 6979b470..4d7e56a7 100644 --- a/aws/templates/gwlb-asg/qs-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (__VERSION__) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (05072024) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -800,7 +800,7 @@ Resources: SecurityVPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',' , !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -813,7 +813,7 @@ Resources: ServersVPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/qs-gwlb-servers-vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-vpc.yaml Parameters: AvailabilityZones: !Join [ ',' , !Ref AvailabilityZones ] NumberOfAZs: !Ref NumberOfAZs @@ -832,7 +832,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: [SecurityVPCStack, ServersVPCStack] Properties: - TemplateURL: __URL__/gwlb/qs-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb.yaml Parameters: SecurityVPC: !GetAtt SecurityVPCStack.Outputs.VPCID NumberOfAZs: !Ref NumberOfAZs diff --git a/aws/templates/gwlb-asg/qs-gwlb.yaml b/aws/templates/gwlb-asg/qs-gwlb.yaml index 70723206..1ff5555b 100644 --- a/aws/templates/gwlb-asg/qs-gwlb.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (__VERSION__)" +Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (05072024)" Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -749,7 +749,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/autoscale-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/autoscale-gwlb.yaml Parameters: VPC: !Ref SecurityVPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -792,7 +792,7 @@ Resources: Condition: DeployManagement DependsOn: GWLBeEndpointStack Properties: - TemplateURL: __URL__/gwlb/management-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/management-gwlb.yaml Parameters: VPC: !Ref SecurityVPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] @@ -841,7 +841,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VpcEndpointService Properties: - TemplateURL: __URL__/gwlb/qs-gwlb-endpoints.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-endpoints.yaml Parameters: NumberOfAZs: !Ref NumberOfAZs GWLBeVPC: !Ref ServersVPC @@ -854,7 +854,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: GWLBeEndpointStack Properties: - TemplateURL: __URL__/gwlb/qs-gwlb-servers-autoscale.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/qs-gwlb-servers-autoscale.yaml Parameters: VPC: !Ref ServersVPC Subnets: !Join [',', !Ref ServersSubnets] diff --git a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml index cdf99b9c..7fe4c750 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (__VERSION__) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -741,7 +741,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -759,7 +759,7 @@ Resources: TgwGwlbStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/tgw-gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/tgw-gwlb.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID IGWID: !GetAtt VPCStack.Outputs.IGWID @@ -869,7 +869,7 @@ Outputs: Condition: 4AZs Rules: GatewayAddressAllocationRule: - RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] - Assertions: + RuleCondition: !Equals [!Ref ControlGatewayOverPrivateOrPublicAddress, 'public'] + Assertions: - AssertDescription: "Gateway's selected to be provisioned by public IP, but ['AllocatePublicAddress'] parameter is false" Assert: !Equals [!Ref AllocatePublicAddress, 'true'] diff --git a/aws/templates/gwlb-asg/tgw-gwlb.yaml b/aws/templates/gwlb-asg/tgw-gwlb.yaml index 123d500a..89fbbc8b 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (__VERSION__) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -977,7 +977,7 @@ Resources: GWLBStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gwlb/gwlb.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gwlb/gwlb.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] diff --git a/aws/templates/management/management.yaml b/aws/templates/management/management.yaml index dd756635..04e3d00e 100755 --- a/aws/templates/management/management.yaml +++ b/aws/templates/management/management.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Management Server (__VERSION__) +Description: Deploys a Check Point Management Server (20240417) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -336,7 +336,7 @@ Parameters: AllowedPattern: '[\$\./a-zA-Z0-9]*' NoEcho: true ManagementHostname: - Description: The name must not contain reserved words. For details, refer to sk40179. (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: mgmt-aws AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -417,7 +417,7 @@ Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref ManagementVersion, MGMT]] ManagementReadyHandle: @@ -493,7 +493,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: CreateRole Properties: - TemplateURL: __URL__/iam/cme-iam-role.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml Parameters: Permissions: !Ref ManagementPermissions STSRoles: !Join [',', !Ref ManagementSTSRoles] @@ -558,7 +558,7 @@ Resources: - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementPasswordHash, ')"']] - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref ManagementMaintenancePasswordHash, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref ManagementVersion]]}] - - ' python3 /etc/cloud_config.py waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" installationType=\"management\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"management\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" "management_installation_type=\"${mgmt_install_type}\"" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" overTheInternet=\"${pub_mgmt}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" installationType=\"management\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"management\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" "management_installation_type=\"${mgmt_install_type}\"" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" overTheInternet=\"${pub_mgmt}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP diff --git a/aws/templates/mds/mds.yaml b/aws/templates/mds/mds.yaml index 1f5a9b41..ec7913b2 100644 --- a/aws/templates/mds/mds.yaml +++ b/aws/templates/mds/mds.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploys a Check Point Multi-Domain Server (__VERSION__) +Description: Deploys a Check Point Multi-Domain Server (20240417) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -321,7 +321,7 @@ Parameters: AllowedPattern: '[\$\./a-zA-Z0-9]*' NoEcho: true MDSHostname: - Description: The name must not contain reserved words. For details, refer to sk40179. (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: mds-aws AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -358,7 +358,7 @@ Parameters: with the Multi-Domain Server. The address should be either 0.0.0.0/0 (any address) or /32 (specific address) Type: String AllowedPattern: '^((0.0.0.0\/0)|)$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/32)$' - ConstraintDescription: Administrator address must be either 0.0.0.0/0 or /32 + ConstraintDescription: Administrator address must be either 0.0.0.0/0 or /32 GatewaysAddresses: Description: Allow gateways only from this network to communicate with the Multi-Domain. Server @@ -398,7 +398,7 @@ Resources: AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref MDSVersion, MGMT]] MDSSecurityGroup: @@ -463,7 +463,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: CreateRole Properties: - TemplateURL: __URL__/iam/cme-iam-role.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cme-iam-role.yaml Parameters: Permissions: !Ref MDSPermissions STSRoles: !Join [',', !Ref MDSSTSRoles] @@ -526,5 +526,5 @@ Resources: - !Join ['', [' pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSPasswordHash, ')"']] - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref MDSMaintenancePasswordHash, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref MDSVersion]]}] - - ' python3 /etc/cloud_config.py sicKey=\"${sic}\" installationType=\"mds\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"mds\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" primary=\"${primary}\" secondary=\"${secondary}\" adminSubnet=\"${admin_subnet}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py sicKey=\"${sic}\" installationType=\"mds\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"mds\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" primary=\"${primary}\" secondary=\"${secondary}\" adminSubnet=\"${admin_subnet}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version \ No newline at end of file diff --git a/aws/templates/single-gw/gateway-master.yaml b/aws/templates/single-gw/gateway-master.yaml index c7c1d195..20c82362 100644 --- a/aws/templates/single-gw/gateway-master.yaml +++ b/aws/templates/single-gw/gateway-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Security Gateway into a new VPC (__VERSION__) +Description: Deploys a Check Point Security Gateway into a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -350,7 +350,7 @@ Parameters: Type: String Default: '' GatewayHostname: - Description: The name must not contain reserved words. For details, refer to sk40179. (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -408,7 +408,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -436,7 +436,7 @@ Resources: GatewayStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gateway/gateway.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/gateway.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID diff --git a/aws/templates/single-gw/gateway.yaml b/aws/templates/single-gw/gateway.yaml index 76c5cef6..645eab2f 100644 --- a/aws/templates/single-gw/gateway.yaml +++ b/aws/templates/single-gw/gateway.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Security Gateway into an existing VPC (__VERSION__) +Description: Deploys a Check Point Security Gateway into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -344,7 +344,7 @@ Parameters: Type: String Default: '' GatewayHostname: - Description: The name must not contain reserved words. For details, refer to sk40179. (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -437,14 +437,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !Ref GatewayIAMRole AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !Join ['-', [!Ref GatewayVersion,GW]] ExternalNetworkInterface: @@ -559,7 +559,7 @@ Resources: - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']] - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']] - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${token}\"" installationType=\"gateway\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"gateway\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" sicKey=\"${sic}\" "smart1CloudToken=\"${token}\"" installationType=\"gateway\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"gateway\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP diff --git a/aws/templates/standalone/standalone-master.yaml b/aws/templates/standalone/standalone-master.yaml index 42832747..6c9847cc 100644 --- a/aws/templates/standalone/standalone-master.yaml +++ b/aws/templates/standalone/standalone-master.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance in a new VPC (__VERSION__) + Security Gateway & Management (Standalone) instance in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -323,7 +323,7 @@ Parameters: Type: String Default: '' StandaloneHostname: - Description: (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -374,7 +374,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Ref AvailabilityZone NumberOfAZs: 1 @@ -401,7 +401,7 @@ Resources: StandaloneStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/gateway/standalone.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/gateway/standalone.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnet: !GetAtt VPCStack.Outputs.PublicSubnet1ID diff --git a/aws/templates/standalone/standalone.yaml b/aws/templates/standalone/standalone.yaml index cc565f6c..a73e2d34 100644 --- a/aws/templates/standalone/standalone.yaml +++ b/aws/templates/standalone/standalone.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance into an existing VPC (__VERSION__) + Security Gateway & Management (Standalone) instance into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -316,7 +316,7 @@ Parameters: Type: String Default: '' StandaloneHostname: - Description: (optional) + Description: The name must not contain reserved words. For details, refer to sk40179 (optional). Type: String Default: '' AllowedPattern: '^([A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?|)$' @@ -402,14 +402,14 @@ Resources: Condition: EnableCloudWatch Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/iam/cloudwatch-policy.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/iam/cloudwatch-policy.yaml Parameters: PolicyName: !If [ ProvidedResourcesTag, !Ref ResourcesTagName, !Ref 'AWS::StackName' ] PolicyRole: !Ref StandaloneIAMRole AMI: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/amis.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/amis.yaml Parameters: Version: !If [IsBYOL, !Join ['-', [!Ref StandaloneVersion,MGMT]], !Ref StandaloneVersion] ExternalNetworkInterface: @@ -510,7 +510,7 @@ Resources: - !Join [ '', [ ' pwd_hash="$(echo ', 'Fn::Base64': !Ref StandalonePasswordHash, ')"' ] ] - !Join [ '', [ ' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref StandaloneMaintenancePasswordHash, ')"' ] ] - !Sub [ ' version=${Version}', { Version: !Select [ 0, !Split [ '-', !Ref StandaloneVersion ] ] } ] - - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" installationType=\"standalone\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"__VERSION__\" templateName=\"standalone\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' + - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" waitHandle=\"${wait_handle}\" installationType=\"standalone\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20240204\" templateName=\"standalone\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" hostName=\"${hostname}\" ntpPrimary=\"${ntp1}\" ntpSecondary=\"${ntp2}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" adminSubnet=\"${admin_subnet}\" allocatePublicAddress=\"${eip}\" bootstrapScript64=\"${bootstrap}\"' VersionDescription: Initial template version PublicAddress: Type: AWS::EC2::EIP diff --git a/aws/templates/tgw-asg/tgw-asg-master.yaml b/aws/templates/tgw-asg/tgw-asg-master.yaml index bd72aa0e..4ddf23df 100644 --- a/aws/templates/tgw-asg/tgw-asg-master.yaml +++ b/aws/templates/tgw-asg/tgw-asg-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (__VERSION__) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -612,7 +612,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: !Ref NumberOfAZs @@ -625,7 +625,7 @@ Resources: MainStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/autoscale/tgw-asg.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/tgw-asg.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID GatewaysSubnets: !Join @@ -683,7 +683,7 @@ Outputs: Condition: DeployManagement Rules: GatewayAddressRule: - RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] - Assertions: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] diff --git a/aws/templates/tgw-asg/tgw-asg.yaml b/aws/templates/tgw-asg/tgw-asg.yaml index 096570d1..e1a5633f 100644 --- a/aws/templates/tgw-asg/tgw-asg.yaml +++ b/aws/templates/tgw-asg/tgw-asg.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (__VERSION__) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -566,7 +566,7 @@ Resources: Type: AWS::CloudFormation::Stack Condition: DeployManagement Properties: - TemplateURL: __URL__/management/management.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/management/management.yaml Parameters: VPC: !Ref VPC ManagementSubnet: !Select [0, !Ref GatewaysSubnets] @@ -620,7 +620,7 @@ Resources: SecurityGatewaysStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/autoscale/autoscale.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/autoscale/autoscale.yaml Parameters: VPC: !Ref VPC GatewaysSubnets: !Join [',', !Ref GatewaysSubnets] @@ -675,7 +675,7 @@ Outputs: Condition: DeployManagement Rules: GatewayAddressRule: - RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] - Assertions: + RuleCondition: !Equals [!Ref ManagementDeploy, 'true'] + Assertions: - AssertDescription: "Gateway's netowrk to communicate with the Security Management Server must be provided" Assert: !Not [ !Equals [!Ref GatewaysAddresses, '']] diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml index 4c03ed53..4ab74737 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (__VERSION__) +Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -427,7 +427,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -451,7 +451,7 @@ Resources: Type: AWS::CloudFormation::Stack DependsOn: VPCStack Properties: - TemplateURL: __URL__/cluster/tgw-cross-az-cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-cross-az-cluster.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -518,12 +518,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml index 92cce90f..63062132 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml @@ -1,7 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an - existing VPC - (__VERSION__) +Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -425,7 +423,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/cluster/cross-az-cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/cross-az-cluster.yaml Parameters: VPC: !Ref VPC PublicSubnetA: !Ref PublicSubnetA @@ -516,12 +514,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-ha/tgw-ha-master.yaml b/aws/templates/tgw-ha/tgw-ha-master.yaml index dcb860be..503a1b23 100644 --- a/aws/templates/tgw-ha/tgw-ha-master.yaml +++ b/aws/templates/tgw-ha/tgw-ha-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (__VERSION__) +Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -428,7 +428,7 @@ Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/utils/vpc.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/utils/vpc.yaml Parameters: AvailabilityZones: !Join [',', !Ref AvailabilityZones] NumberOfAZs: 2 @@ -451,7 +451,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/cluster/tgw-ha.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/tgw-ha.yaml Parameters: VPC: !GetAtt VPCStack.Outputs.VPCID PublicSubnetA: !GetAtt VPCStack.Outputs.PublicSubnet1ID @@ -515,12 +515,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/aws/templates/tgw-ha/tgw-ha.yaml b/aws/templates/tgw-ha/tgw-ha.yaml index d05a2e2b..9a20ff99 100644 --- a/aws/templates/tgw-ha/tgw-ha.yaml +++ b/aws/templates/tgw-ha/tgw-ha.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW HA Cluster into an existing VPC (__VERSION__) +Description: Deploys a Check Point TGW HA Cluster into an existing VPC (20240204) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -423,7 +423,7 @@ Resources: ClusterStack: Type: AWS::CloudFormation::Stack Properties: - TemplateURL: __URL__/cluster/geo-cluster.yaml + TemplateURL: https://cgi-cfts.s3.amazonaws.com/cluster/geo-cluster.yaml Parameters: VPC: !Ref VPC PublicSubnetA: !Ref PublicSubnetA @@ -511,12 +511,12 @@ Rules: MemberATokenNotProvided: RuleCondition: !Equals [!Ref MemberAToken, ''] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member A can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member A can not be empty." Assert: !Equals [!Ref MemberBToken, ''] MemberBTokenNotProvided: RuleCondition: !Equals [ !Ref MemberBToken, '' ] Assertions: - - AssertDescription: "Smart-1 Cloud Token for member B can not be empty" + - AssertDescription: "Smart-1 Cloud Token for member B can not be empty." Assert: !Equals [ !Ref MemberAToken, '' ] MembersTokenValueEquals: RuleCondition: !EachMemberEquals [ [ !Ref MemberBToken ], !Ref MemberAToken ] diff --git a/terraform/alicloud/cluster-master/README.md b/terraform/alicloud/cluster-master/README.md index 010a8a35..06b5ddf1 100755 --- a/terraform/alicloud/cluster-master/README.md +++ b/terraform/alicloud/cluster-master/README.md @@ -162,7 +162,7 @@ ram_role_name = "" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default Check Point version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/cluster/README.md b/terraform/alicloud/cluster/README.md index 0df21dbd..d057f8a0 100755 --- a/terraform/alicloud/cluster/README.md +++ b/terraform/alicloud/cluster/README.md @@ -146,7 +146,7 @@ ram_role_name = "" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/gateway-master/README.md b/terraform/alicloud/gateway-master/README.md index a90166fb..501fadc7 100755 --- a/terraform/alicloud/gateway-master/README.md +++ b/terraform/alicloud/gateway-master/README.md @@ -143,7 +143,7 @@ allocate_and_associate_eip = true | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default Check Point version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/gateway/README.md b/terraform/alicloud/gateway/README.md index 32ba9dfc..737799cd 100755 --- a/terraform/alicloud/gateway/README.md +++ b/terraform/alicloud/gateway/README.md @@ -129,7 +129,7 @@ private_route_table = "rtb-12345678" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default Check Point version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | | 20230420 | Change alicloud terraform provider version to 1.203.0 | diff --git a/terraform/alicloud/management-master/README.md b/terraform/alicloud/management-master/README.md index 8e7ea6c2..c3e4b81b 100755 --- a/terraform/alicloud/management-master/README.md +++ b/terraform/alicloud/management-master/README.md @@ -122,9 +122,10 @@ bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default Check Point version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230512 | New images with Jumbo Hotfix | | 20230420 | Change alicloud terraform provider version to 1.203.0 | | 20230330 | - Added support of ECS disk category.
- Stability fixes. | | 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | diff --git a/terraform/alicloud/management/README.md b/terraform/alicloud/management/README.md index 0c07c661..6a0077ec 100755 --- a/terraform/alicloud/management/README.md +++ b/terraform/alicloud/management/README.md @@ -115,12 +115,13 @@ bootstrap_script = "echo 'this is bootstrap script' > /home/admin/testfile.txt" | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 20240704 | R81 version deprecation | -| 20230829 | Change default Check Point version to R81.20 | +| 20230830 | Change default Check Point version to R81.20 | | 20230615 | - Improved userdata quality and stability by moving to cloud-config
- Define default primary and secondary NTP servers
- Improved deployment experience for gateways and clusters managed by Smart-1 Cloud | | 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20230512 | New images with Jumbo Hotfix | | 20230420 | Change alicloud terraform provider version to 1.203.0 | | 20230330 | - Added support of ECS disk category.
- Stability fixes. | -| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | | | | +| 20230129 | First release of R81.20 CloudGuard Management Terraform deployment in Alibaba Cloud. | | 20211011 | First release of Check Point CloudGaurd Management Terraform deployment into an existing VPC in Alibaba cloud. | ## License diff --git a/terraform/aws/autoscale-gwlb/README.md b/terraform/aws/autoscale-gwlb/README.md index 1ca4b595..b6c58219 100755 --- a/terraform/aws/autoscale-gwlb/README.md +++ b/terraform/aws/autoscale-gwlb/README.md @@ -117,7 +117,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|------------------| +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | | asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | diff --git a/terraform/aws/autoscale/README.md b/terraform/aws/autoscale/README.md index 38d4d034..a46954ae 100755 --- a/terraform/aws/autoscale/README.md +++ b/terraform/aws/autoscale/README.md @@ -126,7 +126,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | | asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | diff --git a/terraform/aws/cluster/README.md b/terraform/aws/cluster/README.md index ecb44584..e1b48f4f 100755 --- a/terraform/aws/cluster/README.md +++ b/terraform/aws/cluster/README.md @@ -133,7 +133,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|-----------| +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | diff --git a/terraform/aws/gateway/README.md b/terraform/aws/gateway/README.md index fefc7512..52c8ff8a 100755 --- a/terraform/aws/gateway/README.md +++ b/terraform/aws/gateway/README.md @@ -124,7 +124,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the security gateway | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the security gateway | string | n/a | n/a | yes | diff --git a/terraform/aws/gwlb-master/README.md b/terraform/aws/gwlb-master/README.md index c84a3ee7..2adb1f59 100755 --- a/terraform/aws/gwlb-master/README.md +++ b/terraform/aws/gwlb-master/README.md @@ -158,7 +158,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | | public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | | subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | @@ -199,6 +199,7 @@ secret_key = "my-secret-key" | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | | management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |---------------------|---------------------------------------------------------------------------------------| diff --git a/terraform/aws/qs-autoscale-master/README.md b/terraform/aws/qs-autoscale-master/README.md index 6d140f0f..0c998024 100755 --- a/terraform/aws/qs-autoscale-master/README.md +++ b/terraform/aws/qs-autoscale-master/README.md @@ -167,6 +167,7 @@ secret_key = "my-secret-key" ``` ## Inputs + | Name | Description | Type | Allowed values | Default | Required | |-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | diff --git a/terraform/aws/qs-autoscale/README.md b/terraform/aws/qs-autoscale/README.md index 68244779..ee559913 100755 --- a/terraform/aws/qs-autoscale/README.md +++ b/terraform/aws/qs-autoscale/README.md @@ -154,8 +154,9 @@ secret_key = "my-secret-key" ``` ## Inputs + | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | | asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | | vpc_id | Select an existing VPC | string | n/a | n/a | yes | @@ -194,6 +195,7 @@ secret_key = "my-secret-key" | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | | management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| diff --git a/terraform/aws/standalone-master/locals.tf b/terraform/aws/standalone-master/locals.tf index 61326301..e2e6ab47 100755 --- a/terraform/aws/standalone-master/locals.tf +++ b/terraform/aws/standalone-master/locals.tf @@ -32,5 +32,4 @@ locals { // Will fail if var.standalone_password_hash is invalid regex_standalone_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_password_hash) == var.standalone_password_hash ? 0 : "Variable [standalone_password_hash] must be a valid password hash" regex_maintenance_mode_password_hash = regex(local.regex_valid_standalone_password_hash, var.standalone_maintenance_mode_password_hash) == var.standalone_maintenance_mode_password_hash ? 0 : "Variable [standalone_maintenance_mode_password_hash] must be a valid password hash" - } \ No newline at end of file diff --git a/terraform/aws/standalone/README.md b/terraform/aws/standalone/README.md index e16f1fe8..1614c44d 100755 --- a/terraform/aws/standalone/README.md +++ b/terraform/aws/standalone/README.md @@ -114,7 +114,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | @@ -143,6 +143,7 @@ secret_key = "my-secret-key" | gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | n/a | 0.0.0.0/0 | no | | standalone_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |--------------------------|------------------------------------------------------------------------------| @@ -154,20 +155,9 @@ secret_key = "my-secret-key" ## Revision History In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) + | Template Version | Description | -|------------------|------------------------------------------------------------------------------------------------------------------| -| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | -| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | -| 20231113 | Add support for BYOL license type for Standalone | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20230923 | Add support for C5d instance type | -| 20230914 | Add support for maintenance mode password | -| 20230829 | Change default Check Point version to R81.20 | -| 20230806 | Add support for c6in instance type | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20221123 | R81.20 version support | -| 20220606 | New instance type support | -| 20210329 | Stability fixes | +|--------------------|------------------------------------------------------------------------------------------------------------------| | 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-cross-az-cluster-master/README.md b/terraform/aws/tgw-cross-az-cluster-master/README.md index 3a821c9c..6f488b2d 100755 --- a/terraform/aws/tgw-cross-az-cluster-master/README.md +++ b/terraform/aws/tgw-cross-az-cluster-master/README.md @@ -140,7 +140,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| | vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | | public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | | private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | @@ -173,6 +173,7 @@ secret_key = "my-secret-key" | secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |--------------------|-----------------------------------| diff --git a/terraform/aws/tgw-cross-az-cluster/README.md b/terraform/aws/tgw-cross-az-cluster/README.md index a8fd8013..de08521c 100755 --- a/terraform/aws/tgw-cross-az-cluster/README.md +++ b/terraform/aws/tgw-cross-az-cluster/README.md @@ -135,7 +135,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | @@ -168,6 +168,8 @@ secret_key = "my-secret-key" | primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | | secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | diff --git a/terraform/aws/tgw-gwlb-master/README.md b/terraform/aws/tgw-gwlb-master/README.md index a28b180a..28d62d04 100755 --- a/terraform/aws/tgw-gwlb-master/README.md +++ b/terraform/aws/tgw-gwlb-master/README.md @@ -176,7 +176,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-----------| | vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | | subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | | public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | @@ -228,6 +228,7 @@ secret_key = "my-secret-key" | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | | management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |---------------------|---------------------------------------------------------------------------------------| diff --git a/terraform/aws/tgw-gwlb/README.md b/terraform/aws/tgw-gwlb/README.md index 5daec1a3..d85546e3 100755 --- a/terraform/aws/tgw-gwlb/README.md +++ b/terraform/aws/tgw-gwlb/README.md @@ -172,7 +172,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| | vpc_id | Select an existing VPC | string | n/a | n/a | yes | | internet_gateway_id | VPC's Internet Gateway Id | string | n/a | n/a | yes | | availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | @@ -227,6 +227,7 @@ secret_key = "my-secret-key" | gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | | management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | + ## Outputs | Name | Description | |---------------------|---------------------------------------------------------------------------------------| From f68f4556b1e7d0d1edc376d31565b3d9148b8dba Mon Sep 17 00:00:00 2001 From: natanelm Date: Sun, 6 Oct 2024 13:52:06 +0000 Subject: [PATCH 07/12] Cosmetic update for Azure README --- azure/templates/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/templates/README.MD b/azure/templates/README.MD index 522ac7cb..e5ef10fb 100644 --- a/azure/templates/README.MD +++ b/azure/templates/README.MD @@ -66,4 +66,4 @@ To deploy a specific Azure image, adjust the image version during the manual dep template_name: management template_version: 20231002 template_type: marketplace - \ No newline at end of file + From f5f5b4d2278fcb2e22409d91d6fd28ec2eb87d77 Mon Sep 17 00:00:00 2001 From: natanelm Date: Sun, 6 Oct 2024 14:53:58 +0000 Subject: [PATCH 08/12] Cosmetic update for Azure README --- azure/templates/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/templates/README.MD b/azure/templates/README.MD index e5ef10fb..522ac7cb 100644 --- a/azure/templates/README.MD +++ b/azure/templates/README.MD @@ -66,4 +66,4 @@ To deploy a specific Azure image, adjust the image version during the manual dep template_name: management template_version: 20231002 template_type: marketplace - + \ No newline at end of file From 2844646faf278cccc4f6e22009e7c512cf936bdb Mon Sep 17 00:00:00 2001 From: eddiek Date: Tue, 15 Oct 2024 18:35:36 +0000 Subject: [PATCH 09/12] Move code analysis to internal scanners --- .github/workflows/code-analysis.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml index 527a9415..e69de29b 100644 --- a/.github/workflows/code-analysis.yaml +++ b/.github/workflows/code-analysis.yaml @@ -1,10 +0,0 @@ -name: Secure Code Analysis - -on: - - push - - pull_request - -jobs: - code-analysis: - uses: CheckPointSW/secure-code-workflow/.github/workflows/code-analysis.yml@latest - secrets: inherit From a858ae8d990b41c5ad0ed1f32c74f4f27b46da30 Mon Sep 17 00:00:00 2001 From: almogar Date: Mon, 28 Oct 2024 13:53:33 +0000 Subject: [PATCH 10/12] add r82 version to templates --- aws/templates/asg/autoscale.yaml | 5 +- aws/templates/cluster/cluster-master.yaml | 5 +- aws/templates/cluster/cluster.yaml | 5 +- .../cross-az-cluster-master.yaml | 5 +- .../cross-az-cluster/cross-az-cluster.yaml | 5 +- .../geo-cluster/geo-cluster-master.yaml | 5 +- aws/templates/geo-cluster/geo-cluster.yaml | 5 +- aws/templates/gwlb-asg/gwlb-master.yaml | 7 +- aws/templates/gwlb-asg/gwlb.yaml | 7 +- aws/templates/gwlb-asg/qs-gwlb-master.yaml | 7 +- aws/templates/gwlb-asg/qs-gwlb.yaml | 7 +- aws/templates/gwlb-asg/tgw-gwlb-master.yaml | 7 +- aws/templates/gwlb-asg/tgw-gwlb.yaml | 7 +- aws/templates/management/management.yaml | 4 +- aws/templates/mds/mds.yaml | 3 +- aws/templates/single-gw/gateway.yaml | 5 +- .../standalone/standalone-master.yaml | 4 +- aws/templates/standalone/standalone.yaml | 4 +- aws/templates/tgw-asg/tgw-asg-master.yaml | 7 +- aws/templates/tgw-asg/tgw-asg.yaml | 7 +- .../tgw-cross-az-cluster-master.yaml | 5 +- .../tgw-cross-az-cluster.yaml | 5 +- aws/templates/tgw-ha/tgw-ha-master.yaml | 5 +- aws/templates/tgw-ha/tgw-ha.yaml | 5 +- terraform/aws/autoscale-gwlb/README.md | 61 +++++++------- .../aws/autoscale-gwlb/asg_userdata.yaml | 2 +- terraform/aws/autoscale/README.md | 5 +- terraform/aws/autoscale/asg_userdata.yaml | 2 +- terraform/aws/cluster-master/README.md | 3 +- terraform/aws/cluster/README.md | 5 +- .../cluster/cluster_member_a_userdata.yaml | 2 +- .../cluster/cluster_member_b_userdata.yaml | 2 +- .../aws/cross-az-cluster-master/README.md | 3 +- terraform/aws/cross-az-cluster/README.md | 3 +- .../cluster_member_a_userdata.yaml | 2 +- .../cluster_member_b_userdata.yaml | 2 +- terraform/aws/gateway-master/README.md | 3 +- terraform/aws/gateway/README.md | 5 +- terraform/aws/gwlb-master/README.md | 83 ++++++++++--------- terraform/aws/gwlb/README.md | 3 +- terraform/aws/management/README.md | 33 ++++---- .../aws/management/management_userdata.yaml | 2 +- terraform/aws/mds/README.md | 3 +- terraform/aws/mds/mds_userdata.yaml | 2 +- .../modules/common/version_license/main.tf | 27 ++++-- terraform/aws/qs-autoscale-master/README.md | 33 ++++---- terraform/aws/qs-autoscale/README.md | 7 +- terraform/aws/standalone-master/README.md | 3 +- terraform/aws/standalone/README.md | 7 +- .../aws/standalone/standalone_userdata.yaml | 2 +- terraform/aws/tgw-asg-master/README.md | 5 +- terraform/aws/tgw-asg/README.md | 47 ++++++----- .../aws/tgw-cross-az-cluster-master/README.md | 5 +- terraform/aws/tgw-cross-az-cluster/README.md | 71 ++++++++-------- terraform/aws/tgw-gwlb-master/README.md | 7 +- terraform/aws/tgw-gwlb/README.md | 7 +- 56 files changed, 347 insertions(+), 231 deletions(-) diff --git a/aws/templates/asg/autoscale.yaml b/aws/templates/asg/autoscale.yaml index 04a1adbb..87720f66 100644 --- a/aws/templates/asg/autoscale.yaml +++ b/aws/templates/asg/autoscale.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Create an Auto Scaling group of Check Point gateways (20240417) +Description: Create an Auto Scaling group of Check Point gateways (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -303,6 +303,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/cluster/cluster-master.yaml b/aws/templates/cluster/cluster-master.yaml index 87d54b56..61ba3b5c 100755 --- a/aws/templates/cluster/cluster-master.yaml +++ b/aws/templates/cluster/cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (20240204) +Description: Deploy a Check Point Cluster in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -310,6 +310,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/cluster/cluster.yaml b/aws/templates/cluster/cluster.yaml index 9bea983a..243234a7 100755 --- a/aws/templates/cluster/cluster.yaml +++ b/aws/templates/cluster/cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Description: Deploys a Check Point Cluster into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -305,6 +305,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml index 9826d072..f53a0547 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point Cluster in a new VPC (20240204) +Description: Deploy a Check Point Cluster in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -315,6 +315,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/cross-az-cluster/cross-az-cluster.yaml b/aws/templates/cross-az-cluster/cross-az-cluster.yaml index 3c5f6ad8..b616d331 100644 --- a/aws/templates/cross-az-cluster/cross-az-cluster.yaml +++ b/aws/templates/cross-az-cluster/cross-az-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Cluster into an existing VPC (20240204) +Description: Deploys a Check Point Cluster into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -320,6 +320,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/geo-cluster/geo-cluster-master.yaml b/aws/templates/geo-cluster/geo-cluster-master.yaml index b2d4e02f..61d20c0c 100644 --- a/aws/templates/geo-cluster/geo-cluster-master.yaml +++ b/aws/templates/geo-cluster/geo-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point cross AZ Cluster in a new VPC (20240204) +Description: Deploy a Check Point cross AZ Cluster in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -327,6 +327,9 @@ Parameters: - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/geo-cluster/geo-cluster.yaml b/aws/templates/geo-cluster/geo-cluster.yaml index c358dfba..77ac4de2 100644 --- a/aws/templates/geo-cluster/geo-cluster.yaml +++ b/aws/templates/geo-cluster/geo-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point cross AZ Cluster into an existing VPC (20240204) +Description: Deploys a Check Point cross AZ Cluster into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -321,6 +321,9 @@ Parameters: - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/gwlb-asg/gwlb-master.yaml b/aws/templates/gwlb-asg/gwlb-master.yaml index 0e4eb4c7..3dd36c24 100644 --- a/aws/templates/gwlb-asg/gwlb-master.yaml +++ b/aws/templates/gwlb-asg/gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -433,6 +433,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -607,6 +610,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/gwlb-asg/gwlb.yaml b/aws/templates/gwlb-asg/gwlb.yaml index 50d8e335..bd6cdbbe 100644 --- a/aws/templates/gwlb-asg/gwlb.yaml +++ b/aws/templates/gwlb-asg/gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -383,6 +383,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -557,6 +560,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/gwlb-asg/qs-gwlb-master.yaml b/aws/templates/gwlb-asg/qs-gwlb-master.yaml index 4d7e56a7..942106cc 100644 --- a/aws/templates/gwlb-asg/qs-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (05072024) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -542,6 +542,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -711,6 +714,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/gwlb-asg/qs-gwlb.yaml b/aws/templates/gwlb-asg/qs-gwlb.yaml index 1ff5555b..ebff2add 100644 --- a/aws/templates/gwlb-asg/qs-gwlb.yaml +++ b/aws/templates/gwlb-asg/qs-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (05072024)" +Description: "Deploy a Quick-Start Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, optionally: Security Management Server and Application Server Autoscale in an existing VPC (20241027)" Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -447,6 +447,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -616,6 +619,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml index 7fe4c750..c0598bf5 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb-master.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in a new VPC for Transit Gateway (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -526,6 +526,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -700,6 +703,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/gwlb-asg/tgw-gwlb.yaml b/aws/templates/gwlb-asg/tgw-gwlb.yaml index 89fbbc8b..58601a0a 100644 --- a/aws/templates/gwlb-asg/tgw-gwlb.yaml +++ b/aws/templates/gwlb-asg/tgw-gwlb.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (20240204) +Description: Deploy a Gateway Load Balancer, Check Point CloudGuard IaaS Security Gateway Auto Scaling Group, and optionally a Security Management Server, Gateway Load Balancer Endpoints and NAT Gateways for each AZ, in an existing VPC for Transit Gateway (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -481,6 +481,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -672,6 +675,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/management/management.yaml b/aws/templates/management/management.yaml index 04e3d00e..4ae6c52c 100755 --- a/aws/templates/management/management.yaml +++ b/aws/templates/management/management.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Management Server (20240417) +Description: Deploys a Check Point Management Server (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -313,6 +313,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/mds/mds.yaml b/aws/templates/mds/mds.yaml index ec7913b2..3d2eeb7a 100644 --- a/aws/templates/mds/mds.yaml +++ b/aws/templates/mds/mds.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploys a Check Point Multi-Domain Server (20240417) +Description: Deploys a Check Point Multi-Domain Server (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -298,6 +298,7 @@ Parameters: AllowedValues: - R81.10-BYOL - R81.20-BYOL + - R82-BYOL Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/single-gw/gateway.yaml b/aws/templates/single-gw/gateway.yaml index 645eab2f..26865610 100644 --- a/aws/templates/single-gw/gateway.yaml +++ b/aws/templates/single-gw/gateway.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point Security Gateway into an existing VPC (20240204) +Description: Deploys a Check Point Security Gateway into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -305,6 +305,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/standalone/standalone-master.yaml b/aws/templates/standalone/standalone-master.yaml index 6c9847cc..28e8b447 100644 --- a/aws/templates/standalone/standalone-master.yaml +++ b/aws/templates/standalone/standalone-master.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance in a new VPC (20240204) + Security Gateway & Management (Standalone) instance in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -180,6 +180,8 @@ Parameters: - R81.10-BYOL - R81.20-PAYG-NGTP - R81.20-BYOL + - R82-PAYG-NGTP + - R82-BYOL Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/standalone/standalone.yaml b/aws/templates/standalone/standalone.yaml index a73e2d34..41876109 100644 --- a/aws/templates/standalone/standalone.yaml +++ b/aws/templates/standalone/standalone.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: 2010-09-09 Description: Deploys either a manually configurable or a Check Point CloudGuard IaaS - Security Gateway & Management (Standalone) instance into an existing VPC (20240204) + Security Gateway & Management (Standalone) instance into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -289,6 +289,8 @@ Parameters: - R81.10-BYOL - R81.20-PAYG-NGTP - R81.20-BYOL + - R82-PAYG-NGTP + - R82-BYOL Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/tgw-asg/tgw-asg-master.yaml b/aws/templates/tgw-asg/tgw-asg-master.yaml index 4ddf23df..339da4e9 100644 --- a/aws/templates/tgw-asg/tgw-asg-master.yaml +++ b/aws/templates/tgw-asg/tgw-asg-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20240204) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -372,6 +372,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -538,6 +541,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/tgw-asg/tgw-asg.yaml b/aws/templates/tgw-asg/tgw-asg.yaml index e1a5633f..bf7d2ab1 100644 --- a/aws/templates/tgw-asg/tgw-asg.yaml +++ b/aws/templates/tgw-asg/tgw-asg.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: '2010-09-09' -Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20240204) +Description: Deploy an Auto Scaling Group of CloudGuard Security Gateways for Transit Gateway with an optional Management Server into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -326,6 +326,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX GatewayPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String @@ -492,6 +495,8 @@ Parameters: - R81.10-PAYG - R81.20-BYOL - R81.20-PAYG + - R82-BYOL + - R82-PAYG ManagementPasswordHash: Description: Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash). (optional) Type: String diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml index 4ab74737..232ca1b5 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (20240204) +Description: Deploy a Check Point TGW Cross Availabilty Zone Cluster in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -342,6 +342,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml index 63062132..56d58083 100644 --- a/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml +++ b/aws/templates/tgw-cross-az-cluster/tgw-cross-az-cluster.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an existing VPC (20240204) +Description: Deploys a Check Point TGW Cross Availabilty Zone Cluster into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -338,6 +338,9 @@ Parameters: - R81.20-BYOL - R81.20-PAYG-NGTP - R81.20-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/tgw-ha/tgw-ha-master.yaml b/aws/templates/tgw-ha/tgw-ha-master.yaml index 503a1b23..d8a734ea 100644 --- a/aws/templates/tgw-ha/tgw-ha-master.yaml +++ b/aws/templates/tgw-ha/tgw-ha-master.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (20240204) +Description: Deploy a Check Point TGW HA cross AZ Cluster in a new VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -343,6 +343,9 @@ Parameters: - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/aws/templates/tgw-ha/tgw-ha.yaml b/aws/templates/tgw-ha/tgw-ha.yaml index 9a20ff99..c4f5426e 100644 --- a/aws/templates/tgw-ha/tgw-ha.yaml +++ b/aws/templates/tgw-ha/tgw-ha.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Deploys a Check Point TGW HA Cluster into an existing VPC (20240204) +Description: Deploys a Check Point TGW HA Cluster into an existing VPC (20241027) Metadata: AWS::CloudFormation::Interface: ParameterGroups: @@ -337,6 +337,9 @@ Parameters: - R81.10-BYOL - R81.10-PAYG-NGTP - R81.10-PAYG-NGTX + - R82-BYOL + - R82-PAYG-NGTP + - R82-PAYG-NGTX Shell: Description: Change the admin shell to enable advanced command line configuration. Type: String diff --git a/terraform/aws/autoscale-gwlb/README.md b/terraform/aws/autoscale-gwlb/README.md index b6c58219..4d4115db 100755 --- a/terraform/aws/autoscale-gwlb/README.md +++ b/terraform/aws/autoscale-gwlb/README.md @@ -116,36 +116,36 @@ secret_key = "my-secret-key" ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| -| prefix | (Optional) Instances name prefix | string | n/a | "" | no | -| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | -| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | -| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | -| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | -| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|-------------| +| prefix | (Optional) Instances name prefix | string | n/a | "" | no | +| asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| subnet_ids | List of public subnet IDs to launch resources into. Recommended at least 2 | list(string) | n/a | n/a | yes | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_server | The name that represents the Security Management Server in the CME configuration | string | n/a | n/a | yes | +| configuration_template | Name of the provisioning template in the CME configuration | string | n/a | n/a | yes | +| gateway_name | The name tag of the Security Gateways instances | string | n/a | Check-Point-ASG-gateway-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| instances_tags | (Optional) A map of tags as key=value pairs. All tags will be added on all AutoScaling Group instances | map(string) | n/a | {} | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | +| maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | +| target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | (optional) Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command 'grub2-mkpasswd-pbkdf2' on Linux and paste it here). | string | n/a | "" | no | ## Outputs | Name | Description | @@ -167,6 +167,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240417 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | diff --git a/terraform/aws/autoscale-gwlb/asg_userdata.yaml b/terraform/aws/autoscale-gwlb/asg_userdata.yaml index bb095c01..8cc2a7a5 100755 --- a/terraform/aws/autoscale-gwlb/asg_userdata.yaml +++ b/terraform/aws/autoscale-gwlb/asg_userdata.yaml @@ -26,4 +26,4 @@ bootcmd: - echo "cpprod_util CPPROD_SetValue \"fw1\" \"AwsGwlb\" 4 1 1" >> /etc/rc.local runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20231012\" templateName=\"autoscale_gwlb\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"autoscale_gwlb\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/autoscale/README.md b/terraform/aws/autoscale/README.md index a46954ae..834e4618 100755 --- a/terraform/aws/autoscale/README.md +++ b/terraform/aws/autoscale/README.md @@ -126,7 +126,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | | asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | @@ -144,7 +144,7 @@ secret_key = "my-secret-key" | minimum_group_size | The minimum number of instances in the Auto Scaling group | number | n/a | 2 | no | | maximum_group_size | The maximum number of instances in the Auto Scaling group | number | n/a | 10 | no | | target_groups | (Optional) List of Target Group ARNs to associate with the Auto Scaling group | list(string) | n/a | [] | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components (at least 8 alphanumeric characters) | string | n/a | "12345678" | yes | @@ -179,6 +179,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240417 | - Add support for Elastic Load Balancer Health Checks.
- EC2 Auto Scaling will start to detect and act on health checks performed by Elastic Load Balancing. | diff --git a/terraform/aws/autoscale/asg_userdata.yaml b/terraform/aws/autoscale/asg_userdata.yaml index 4c6633c3..140f2d8d 100755 --- a/terraform/aws/autoscale/asg_userdata.yaml +++ b/terraform/aws/autoscale/asg_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"autoscale\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" installationType=\"autoscale\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"autoscale\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" bootstrapScript64=\"${BootstrapScript}\" diff --git a/terraform/aws/cluster-master/README.md b/terraform/aws/cluster-master/README.md index 7354af59..680c3dfc 100755 --- a/terraform/aws/cluster-master/README.md +++ b/terraform/aws/cluster-master/README.md @@ -171,7 +171,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -203,6 +203,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/cluster/README.md b/terraform/aws/cluster/README.md index e1b48f4f..cbe60b62 100755 --- a/terraform/aws/cluster/README.md +++ b/terraform/aws/cluster/README.md @@ -133,7 +133,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|-----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | @@ -149,7 +149,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -181,6 +181,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | diff --git a/terraform/aws/cluster/cluster_member_a_userdata.yaml b/terraform/aws/cluster/cluster_member_a_userdata.yaml index 1fa105c0..da66a948 100755 --- a/terraform/aws/cluster/cluster_member_a_userdata.yaml +++ b/terraform/aws/cluster/cluster_member_a_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberAPublicAddress}\" templateVersion=\"20240704\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberAPublicAddress}\" templateVersion=\"20241027\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cluster/cluster_member_b_userdata.yaml b/terraform/aws/cluster/cluster_member_b_userdata.yaml index 36d29dc5..9109013c 100755 --- a/terraform/aws/cluster/cluster_member_b_userdata.yaml +++ b/terraform/aws/cluster/cluster_member_b_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberBPublicAddress}\" templateVersion=\"20231012\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" elasticIp=\"${MemberBPublicAddress}\" templateVersion=\"20241027\" templateName=\"cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" allocatePublicAddress=\"${AllocateAddress}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster-master/README.md b/terraform/aws/cross-az-cluster-master/README.md index ce475b0d..f3d5ebb1 100755 --- a/terraform/aws/cross-az-cluster-master/README.md +++ b/terraform/aws/cross-az-cluster-master/README.md @@ -170,7 +170,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -202,6 +202,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20230923 | Add support for C5d instance type | diff --git a/terraform/aws/cross-az-cluster/README.md b/terraform/aws/cross-az-cluster/README.md index ed0737da..34d9b77f 100755 --- a/terraform/aws/cross-az-cluster/README.md +++ b/terraform/aws/cross-az-cluster/README.md @@ -145,7 +145,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -178,6 +178,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240304 | Add x-chkp-cluster-ips, x-chkp-member-ips tags to cluster members | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml index f9a926c5..2d8ab4a0 100755 --- a/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml +++ b/terraform/aws/cross-az-cluster/cluster_member_a_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240310\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberAPublicAddress}\" otherMemberIp=\"${MemberBPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberAPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberBPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenA}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberAPublicAddress}\" otherMemberIp=\"${MemberBPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberAPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberBPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml index a374aaa6..44e2eb70 100755 --- a/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml +++ b/terraform/aws/cross-az-cluster/cluster_member_b_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240310\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberBPublicAddress}\" otherMemberIp=\"${MemberAPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberBPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberAPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" sicKey=\"${SICKey}\" "smart1CloudToken=\"${TokenB}\"" installationType=\"cross-az-cluster\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"cross_az_cluster\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname}\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" elasticIp=\"${MemberBPublicAddress}\" otherMemberIp=\"${MemberAPrivateAddressCluster}\" clusterIp=\"${PublicAddressCluster}\" secondaryIp=\"${MemberBPrivateAddressSecondary}\" otherMemberPrivateClusterIp=\"${MemberAPrivateAddressSecondary}\" bootstrapScript64=\"${GatewayBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/gateway-master/README.md b/terraform/aws/gateway-master/README.md index 00594f44..15fd6892 100755 --- a/terraform/aws/gateway-master/README.md +++ b/terraform/aws/gateway-master/README.md @@ -161,7 +161,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -198,6 +198,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/gateway/README.md b/terraform/aws/gateway/README.md index 52c8ff8a..ea58cb3b 100755 --- a/terraform/aws/gateway/README.md +++ b/terraform/aws/gateway/README.md @@ -124,7 +124,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| +|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the security gateway | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the security gateway | string | n/a | n/a | yes | @@ -139,7 +139,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Security Gateway EC2 Instance | map(string) | n/a | {} | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX
| R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -173,6 +173,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/gwlb-master/README.md b/terraform/aws/gwlb-master/README.md index 2adb1f59..9bb7568c 100755 --- a/terraform/aws/gwlb-master/README.md +++ b/terraform/aws/gwlb-master/README.md @@ -157,47 +157,47 @@ secret_key = "my-secret-key" ``` ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| -| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | -| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | -| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | -| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | -| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | -| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| volume_size | Instances volume size | number | n/a | 100 | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | -| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | -| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | -| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | -| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | -| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | -| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | -| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | -| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | -| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | -| management_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | -| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | -| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +| vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | +| public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | +| subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | +| key_name | The EC2 Key Pair name to allow SSH access to the instances | string | n/a | n/a | yes | +| enable_volume_encryption | Encrypt Environment instances volume with default AWS KMS key | bool | true/false | true | no | +| enable_instance_connect | Enable SSH connection over AWS web console. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| volume_size | Instances volume size | number | n/a | 100 | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| management_server | The name that represents the Security Management Server in the automatic provisioning configuration. | string | n/a | CP-Management-gwlb-tf | yes | +| configuration_template | The tag is used by the Security Management Server to automatically provision the Security Gateways. Must be up to 12 alphanumeric characters and unique for each Quick Start deployment | string | n/a | gwlb-configuration | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_load_balancer_name | Load Balancer name in AWS | string | n/a | gwlb1 | yes | +| target_group_name | Target Group Name. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. | string | n/a | tg1 | yes | +| connection_acceptance_required | Indicate whether requests from service consumers to create an endpoint to your service must be accepted. Default is set to false(acceptance not required). | bool | true/false | false | yes | +| enable_cross_zone_load_balancing | Select 'true' to enable cross-az load balancing. NOTE! this may cause a spike in cross-az charges. | bool | true/false | true | yes | +| gateway_name | The name tag of the Security Gateway instances. (optional) | string | n/a | Check-Point-GW-tf | yes | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | +| gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) An optional script with semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| gateways_provision_address_type | Determines if the gateways are provisioned using their private or public address. | string | - private
- public | private | no | +| allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | +| management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | +| management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | +| gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | +| admin_cidr | (CIDR) Allow web, ssh, and graphical clients only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| gateway_addresses | (CIDR) Allow gateways only from this network to communicate with the Management Server | string | valid CIDR | n/a | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs @@ -217,6 +217,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/gwlb/README.md b/terraform/aws/gwlb/README.md index 46a142c0..465eef86 100755 --- a/terraform/aws/gwlb/README.md +++ b/terraform/aws/gwlb/README.md @@ -172,7 +172,7 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | @@ -208,6 +208,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | diff --git a/terraform/aws/management/README.md b/terraform/aws/management/README.md index 8545ff85..9c3a0a2b 100755 --- a/terraform/aws/management/README.md +++ b/terraform/aws/management/README.md @@ -152,7 +152,7 @@ secret_key = "my-secret-key" | iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | | predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | | sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | -| management_version | Management version and license | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | Management version and license | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | management_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | | management_hostname | (Optional) Security Management Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | @@ -180,21 +180,22 @@ secret_key = "my-secret-key" ## Revision History In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) -| Template Version | Description | -|------------------|---------------------------------------------------------------------------------------------------------------| -| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | -| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | -| 20240207 | Added Log Server installation support | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20230923 | Add support for C5d instance type | -| 20230914 | Add support for maintenance mode password | -| 20230829 | Change default Check Point version to R81.20 | -| 20230806 | Add support for c6in instance type | -| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | -| 20221123 | R81.20 version support | -| 20220606 | New instance type support | -| 20210329 | Stability fixes | -| 20210309 | First release of Check Point Security Management Server Terraform module for AWS | +| Template Version | Description | +|-------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20240207 | Added Log Server installation support | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230521 | - Change default shell for the admin user to /etc/cli.sh
- Add description for reserved words in hostname | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | Stability fixes | +| 20210309 | First release of Check Point Security Management Server Terraform module for AWS | ## License diff --git a/terraform/aws/management/management_userdata.yaml b/terraform/aws/management/management_userdata.yaml index cfd9e5dc..1b87042a 100755 --- a/terraform/aws/management/management_userdata.yaml +++ b/terraform/aws/management/management_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" "management_installation_type=\"${ManagementInstallationType}\"" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" overTheInternet=\"${PubMgmt}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"management\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"management\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" "management_installation_type=\"${ManagementInstallationType}\"" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" overTheInternet=\"${PubMgmt}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/mds/README.md b/terraform/aws/mds/README.md index 156aad68..92186771 100755 --- a/terraform/aws/mds/README.md +++ b/terraform/aws/mds/README.md @@ -147,7 +147,7 @@ secret_key = "my-secret-key" | iam_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read permissions | no | | predefined_role | (Optional) A predefined IAM role to attach to the instance profile. Ignored if var.iam_permissions is not set to 'Use existing' | string | n/a | "" | no | | sts_roles | (Optional) The IAM role will be able to assume these STS Roles (list of ARNs). Ignored if var.iam_permissions is set to 'None' or 'Use existing' | list(string) | n/a | [] | no | -| mds_version | Multi-Domain Server version and license | string | - R81.10-BYOL
- R81.20-BYOL | R81.20-BYOL | no | +| mds_version | Multi-Domain Server version and license | string | - R81.10-BYOL
- R81.20-BYOL
- R82-BYOL | R81.20-BYOL | no | | mds_admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | mds_password_hash | (Optional) Admin user's password hash (use command "openssl passwd -6 PASSWORD" to get the PASSWORD's hash) | string | n/a | "" | no | | mds_hostname | (Optional) Multi-Domain Server prompt hostname. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | @@ -174,6 +174,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | diff --git a/terraform/aws/mds/mds_userdata.yaml b/terraform/aws/mds/mds_userdata.yaml index cd0085c6..bf30aa1b 100755 --- a/terraform/aws/mds/mds_userdata.yaml +++ b/terraform/aws/mds/mds_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"mds\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"mds\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" primary=\"${IsPrimary}\" secondary=\"${IsSecondary}\" adminSubnet=\"${AdminSubnet}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py sicKey=\"${SICKey}\" installationType=\"mds\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"mds\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" primary=\"${IsPrimary}\" secondary=\"${IsSecondary}\" adminSubnet=\"${AdminSubnet}\" bootstrapScript64=\"${BootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/modules/common/version_license/main.tf b/terraform/aws/modules/common/version_license/main.tf index c0aaca14..93515298 100755 --- a/terraform/aws/modules/common/version_license/main.tf +++ b/terraform/aws/modules/common/version_license/main.tf @@ -4,29 +4,40 @@ locals { "R81.10-PAYG-NGTP", "R81.10-PAYG-NGTX", "R81.20-BYOL", - "R81.20-PAYG-NGTP", - "R81.20-PAYG-NGTX" + "R81.20-PAYG-NGTP", + "R81.20-PAYG-NGTX", + "R82-BYOL", + "R82-PAYG-NGTP", + "R82-PAYG-NGTX" ] mgmt_versions = [ "R81.10-BYOL", "R81.10-PAYG", "R81.20-BYOL", - "R81.20-PAYG" + "R81.20-PAYG", + "R82-BYOL", + "R82-PAYG" ] mds_versions = [ "R81.10-BYOL", - "R81.20-BYOL" + "R81.20-BYOL", + "R82-BYOL" ] standalone_versions = [ "R81.10-BYOL", "R81.10-PAYG-NGTP", "R81.20-BYOL", - "R81.20-PAYG-NGTP" + "R81.20-PAYG-NGTP", + "R82-BYOL", + "R82-PAYG-NGTP" ] gwlb_gw_versions = [ - "R81.20-BYOL", - "R81.20-PAYG-NGTP", - "R81.20-PAYG-NGTX" + "R81.20-BYOL", + "R81.20-PAYG-NGTP", + "R81.20-PAYG-NGTX", + "R82-BYOL", + "R82-PAYG-NGTP", + "R82-PAYG-NGTX" ] } diff --git a/terraform/aws/qs-autoscale-master/README.md b/terraform/aws/qs-autoscale-master/README.md index 0c998024..d42f1fa2 100755 --- a/terraform/aws/qs-autoscale-master/README.md +++ b/terraform/aws/qs-autoscale-master/README.md @@ -192,13 +192,13 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | | gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | @@ -238,20 +238,21 @@ secret_key = "my-secret-key" In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) -| Template Version | Description | -|------------------|---------------------------------------------------------------------------------------| -| 20240425 | Remove support for R81 and lower versions | -| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | -| 20231127 | Add support for parameter admin shell | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20230923 | Add support for C5d instance type | -| 20230914 | Add support for maintenance mode password | -| 20230829 | Change default Check Point version to R81.20 | -| 20230806 | Add support for c6in instance type | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20221123 | R81.20 version support | -| 20220606 | New instance type support | -| 20210309 | First release of Check Point Quick Start Auto Scaling Master Terraform module for AWS | +| Template Version | Description | +|------------------|-----------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | +| 20240425 | Remove support for R81 and lower versions | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231127 | Add support for parameter admin shell | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210309 | First release of Check Point Quick Start Auto Scaling Master Terraform module for AWS | ## License diff --git a/terraform/aws/qs-autoscale/README.md b/terraform/aws/qs-autoscale/README.md index ee559913..fe0398e9 100755 --- a/terraform/aws/qs-autoscale/README.md +++ b/terraform/aws/qs-autoscale/README.md @@ -156,7 +156,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| +|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | prefix | (Optional) Instances name prefix | string | n/a | "" | no | | asg_name | Autoscaling Group name | string | n/a | Check-Point-ASG-tf | no | | vpc_id | Select an existing VPC | string | n/a | n/a | yes | @@ -176,13 +176,13 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | | gateways_blades | Turn on the Intrusion Prevention System, Application Control, Anti-Virus and Anti-Bot Blades (additional Blades can be manually turned on later) | bool | true/false | true | no | @@ -218,6 +218,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20240425 | Remove support for R81 and lower versions | | 20240310 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | diff --git a/terraform/aws/standalone-master/README.md b/terraform/aws/standalone-master/README.md index ef5219d9..78d42f12 100755 --- a/terraform/aws/standalone-master/README.md +++ b/terraform/aws/standalone-master/README.md @@ -152,7 +152,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | -| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP | R81.20-BYOL | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R82-BYOL
- R82-PAYG-NGTP | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | resources_tag_name | (optional) | string | n/a | "" | no | @@ -185,6 +185,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231113 | Add support for BYOL license type for Standalone | diff --git a/terraform/aws/standalone/README.md b/terraform/aws/standalone/README.md index 1614c44d..619be496 100755 --- a/terraform/aws/standalone/README.md +++ b/terraform/aws/standalone/README.md @@ -114,7 +114,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------| | vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | | public_subnet_id | The public subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | | private_subnet_id | The private subnet of the Security Gateway & Management (Standalone) | string | n/a | n/a | yes | @@ -129,7 +129,7 @@ secret_key = "my-secret-key" | disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Standalone EC2 Instance | map(string) | n/a | {} | no | -| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP | R81.20-BYOL | no | +| standalone_version | Security Gateway & Management (Standalone) version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | standalone_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | resources_tag_name | (optional) | string | n/a | "" | no | @@ -157,7 +157,8 @@ secret_key = "my-secret-key" In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) | Template Version | Description | -|--------------------|------------------------------------------------------------------------------------------------------------------| +|------------------|------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20210309 | First release of Check Point Security Management Server & Security Gateway (Standalone) Terraform module for AWS | ## License diff --git a/terraform/aws/standalone/standalone_userdata.yaml b/terraform/aws/standalone/standalone_userdata.yaml index 0bf47ec4..205b5bc3 100755 --- a/terraform/aws/standalone/standalone_userdata.yaml +++ b/terraform/aws/standalone/standalone_userdata.yaml @@ -1,4 +1,4 @@ #cloud-config runcmd: - | - python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" installationType=\"standalone\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20240704\" templateName=\"standalone\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" bootstrapScript64=\"${StandaloneBootstrapScript}\" \ No newline at end of file + python3 /etc/cloud_config.py enableCloudWatch=\"${EnableCloudWatch}\" installationType=\"standalone\" osVersion=\"${OsVersion}\" allowUploadDownload=\"${AllowUploadDownload}\" templateVersion=\"20241027\" templateName=\"standalone\" templateType=\"terraform\" shell=\"${Shell}\" enableInstanceConnect=\"${EnableInstanceConnect}\" hostName=\"${Hostname }\" ntpPrimary=\"${NTPPrimary}\" ntpSecondary=\"${NTPSecondary}\" passwordHash=\"${PasswordHash}\" MaintenanceModePassword=\"${MaintenanceModePassword}\" adminSubnet=\"${AdminSubnet}\" allocatePublicAddress=\"${AllocateElasticIP}\" bootstrapScript64=\"${StandaloneBootstrapScript}\" \ No newline at end of file diff --git a/terraform/aws/tgw-asg-master/README.md b/terraform/aws/tgw-asg-master/README.md index 18940e6e..85b2aa3c 100755 --- a/terraform/aws/tgw-asg-master/README.md +++ b/terraform/aws/tgw-asg-master/README.md @@ -168,14 +168,14 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | | management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | @@ -207,6 +207,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|-------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/tgw-asg/README.md b/terraform/aws/tgw-asg/README.md index 44e1c298..e32fa852 100755 --- a/terraform/aws/tgw-asg/README.md +++ b/terraform/aws/tgw-asg/README.md @@ -159,14 +159,14 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.10-BYOL
- R81.10-PAYG-NGTP
- R81.10-PAYG-NGTX
- R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SIC_Key | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | | asn | The organization Autonomous System Number (ASN) that identifies the routing domain for the Security Gateways | string | n/a | 6500 | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | management_permissions | IAM role to attach to the instance profile | string | - None (configure later)
- Use existing (specify an existing IAM role name)
- Create with assume role permissions (specify an STS role ARN)
- Create with read permissions
- Create with read-write permissions | Create with read-write permissions | no | | management_predefined_role | ((Optional) A predefined IAM role to attach to the instance profile. Ignored if IAM role is not set to 'Use existing' | string | n/a | "" | no | @@ -182,32 +182,33 @@ secret_key = "my-secret-key" ## Outputs -| Name | Description | -|--------------------------|--------------------------------------------------------------------------------------------------------| -| management_instance_name | The deployed Security Management AWS instance name | -| management_public_ip | The deployed Security Management Server AWS public ip | -| management_url | URL to the portal of the deployed Security Management Server | -| autoscaling_group_name | The name of the deployed AutoScaling Group | +| Name | Description | +|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| management_instance_name | The deployed Security Management AWS instance name | +| management_public_ip | The deployed Security Management Server AWS public ip | +| management_url | URL to the portal of the deployed Security Management Server | +| autoscaling_group_name | The name of the deployed AutoScaling Group | | configuration_template | The name that represents the configuration template. Configurations required to automatically provision the Gateways in the Auto Scaling Group, such as what Security Policy to install and which Blades to enable, will be placed under this template name | -| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | +| controller_name | The name that represents the controller. Configurations required to connect to your AWS environment, such as credentials and regions, will be placed under this controller name | ## Revision History In order to check the template version, please refer to [sk116585](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk116585) -| Template Version | Description | -|------------------|------------------------------------------------------------------------------------------| -| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | -| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | -| 20231012 | Update AWS Terraform provider version to 5.20.1 | -| 20230923 | Add support for C5d instance type | -| 20230914 | Add support for maintenance mode password | -| 20230829 | Change default Check Point version to R81.20 | -| 20230806 | Add support for c6in instance type | -| 20230626 | Fixed missing x-chkp-* tags on Auto Scale Group | -| 20221226 | Support ASG Launch Template instead of Launch Configuration | -| 20221123 | R81.20 version support | -| 20220606 | New instance type support | -| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Terraform module for AWS | +| Template Version | Description | +|------------------|-----------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | +| 20240704 | - R80.40 version deprecation.
- R81 version deprecation. | +| 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | +| 20231012 | Update AWS Terraform provider version to 5.20.1 | +| 20230923 | Add support for C5d instance type | +| 20230914 | Add support for maintenance mode password | +| 20230829 | Change default Check Point version to R81.20 | +| 20230806 | Add support for c6in instance type | +| 20230626 | Fixed missing x-chkp-* tags on Auto Scale Group | +| 20221226 | Support ASG Launch Template instead of Launch Configuration | +| 20221123 | R81.20 version support | +| 20220606 | New instance type support | +| 20210329 | First release of Check Point Transit Gateway Auto Scaling Group Terraform module for AWS | ## License diff --git a/terraform/aws/tgw-cross-az-cluster-master/README.md b/terraform/aws/tgw-cross-az-cluster-master/README.md index 6f488b2d..210d40b5 100755 --- a/terraform/aws/tgw-cross-az-cluster-master/README.md +++ b/terraform/aws/tgw-cross-az-cluster-master/README.md @@ -140,7 +140,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------| +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| | vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | | public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 1 \"us-east-1b\" = 2} ) | map | n/a | n/a | yes | | private_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 2 pairs. (e.g. {\"us-east-1a\" = 3 \"us-east-1b\" = 4} ) | map | n/a | n/a | yes | @@ -158,7 +158,7 @@ secret_key = "my-secret-key" | metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | | instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | | predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | @@ -190,6 +190,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20230923 | Add support for C5d instance type | diff --git a/terraform/aws/tgw-cross-az-cluster/README.md b/terraform/aws/tgw-cross-az-cluster/README.md index de08521c..971ea70b 100755 --- a/terraform/aws/tgw-cross-az-cluster/README.md +++ b/terraform/aws/tgw-cross-az-cluster/README.md @@ -134,41 +134,41 @@ secret_key = "my-secret-key" - In Smart Console: reset SIC with the re-deployed member and install policy ## Inputs -| Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| -| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | -| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | -| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | -| tgw_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | -| tgw_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | -| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | -| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | -| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | -| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | -| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | -| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | -| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | -| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | -| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | -| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | -| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | -| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | -| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | -| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | -| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | -| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | -| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | -| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | -| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | -| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | -| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | -| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | -| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | -| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | -| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | -| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| Name | Description | Type | Allowed values | Default | Required | +|-------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +| vpc_id | The VPC id in which to deploy | string | n/a | n/a | yes | +| public_subnet_id | The public subnet of the cluster. The cluster's public IPs will be generated from this subnet | string | n/a | n/a | yes | +| private_subnet_id | The private subnet of the cluster. The cluster's private IPs will be generated from this subnet | string | n/a | n/a | yes | +| tgw_subnet_1_id | The TGW attachment subnet ID located in the 1st Availability Zone | string | n/a | n/a | yes | +| tgw_subnet_2_id | The TGW attachment subnet ID located in the 2st Availability Zone | string | n/a | n/a | yes | +| private_route_table | (Optional) Set 0.0.0.0/0 route to the Active Cluster member instance in this route table (e.g. rtb-12a34567). Route table cannot have an existing 0.0.0.0/0 route | string | n/a | "" | no | +| gateway_name | (Optional) The name tag of the Security Gateway instances | string | n/a | Check-Point-Cluster-tf | no | +| gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | +| key_name | The EC2 Key Pair name to allow SSH access to the instance | string | n/a | n/a | yes | +| allocate_and_associate_eip | If set to true, an elastic IP will be allocated and associated with each cluster member, in addition to the shared cluster Elastic IP | bool | true/false | true | no | +| volume_size | Root volume size (GB) - minimum 100 | number | n/a | 100 | no | +| volume_type | General Purpose SSD Volume Type | string | - gp3
- gp2 | gp3 | no | +| volume_encryption | KMS or CMK key Identifier: Use key ID, alias or ARN. Key alias should be prefixed with 'alias/' (e.g. for KMS default alias 'aws/ebs' - insert 'alias/aws/ebs') | string | n/a | alias/aws/ebs | no | +| enable_instance_connect | Enable AWS Instance Connect. Supporting regions can be found [here](https://aws.amazon.com/about-aws/whats-new/2019/06/introducing-amazon-ec2-instance-connect/) | bool | true/false | false | no | +| disable_instance_termination | Prevents an instance from accidental termination. Note: Once this attribute is true terraform destroy won't work properly | bool | true/false | false | no | +| metadata_imdsv2_required | Set true to deploy the instance with metadata v2 token required | bool | true/false | true | yes | +| instance_tags | (Optional) A map of tags as key=value pairs. All tags will be added to the Gateway EC2 Instances | map(string) | n/a | {} | no | +| predefined_role | (Optional) A predefined IAM role to attach to the cluster profile | string | n/a | "" | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | +| admin_shell | Set the admin shell to enable advanced command line configuration | string | - /etc/cli.sh
- /bin/bash
- /bin/csh
- /bin/tcsh | /etc/cli.sh | no | +| gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | +| gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | +| memberAToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| memberBToken | (Recommended) Quick connect to Smart-1 Cloud. Paste here the token copied from the Connect Gateway screen in Smart-1 Cloud portal. Follow the instructions in SK180501 to quickly connect this Gateway to Smart-1 Cloud. | string | n/a | "" | no | +| resources_tag_name | (Optional) Name tag prefix of the resources | string | n/a | "" | no | +| gateway_hostname | (Optional) The host name will be appended with member-a/b accordingly. The name must not contain reserved words. For details, refer to sk40179. | string | n/a | "" | no | +| allow_upload_download | Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | bool | true/false | true | no | +| enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | +| gateway_bootstrap_script | (Optional) Semicolon (;) separated commands to run on the initial boot | string | n/a | "" | no | +| primary_ntp | (Optional) The IPv4 addresses of Network Time Protocol primary server | string | n/a | 169.254.169.123 | no | +| secondary_ntp | (Optional) The IPv4 addresses of Network Time Protocol secondary server | string | n/a | 0.pool.ntp.org | no | +| gateway_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | +| management_maintenance_mode_password_hash | Check Point recommends setting Admin user's password and maintenance-mode password for recovery purposes. For R81.10 and below the Admin user's password is used also as maintenance-mode password. (To generate a password hash use the command "grub2-mkpasswd-pbkdf2" on Linux and paste it here). (optional) | string | n/a | "" | no | ## Outputs @@ -187,6 +187,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | | 20230923 | Add support for C5d instance type | diff --git a/terraform/aws/tgw-gwlb-master/README.md b/terraform/aws/tgw-gwlb-master/README.md index 28d62d04..0ccc4165 100755 --- a/terraform/aws/tgw-gwlb-master/README.md +++ b/terraform/aws/tgw-gwlb-master/README.md @@ -176,7 +176,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | vpc_cidr | The CIDR block of the VPC | string | n/a | n/a | yes | | subnets_bit_length | Number of additional bits with which to extend the vpc cidr. For example, if given a vpc_cidr ending in /16 and a subnets_bit_length value of 4, the resulting subnet address will have length /20 | number | n/a | n/a | yes | | public_subnets_map | A map of pairs {availability-zone = subnet-suffix-number}. Each entry creates a subnet. Minimum 1 pair. (e.g. {\"us-east-1a\" = 1} ) | map | n/a | n/a | yes | @@ -209,7 +209,7 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | @@ -218,7 +218,7 @@ secret_key = "my-secret-key" | allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | | gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | @@ -247,6 +247,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|----------------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | diff --git a/terraform/aws/tgw-gwlb/README.md b/terraform/aws/tgw-gwlb/README.md index d85546e3..89325fd5 100755 --- a/terraform/aws/tgw-gwlb/README.md +++ b/terraform/aws/tgw-gwlb/README.md @@ -172,7 +172,7 @@ secret_key = "my-secret-key" ## Inputs | Name | Description | Type | Allowed values | Default | Required | -|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|----------| +|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------| | vpc_id | Select an existing VPC | string | n/a | n/a | yes | | internet_gateway_id | VPC's Internet Gateway Id | string | n/a | n/a | yes | | availability_zones | The Availability Zones (AZs) to use for the subnets in the VPC. | string | n/a | n/a | yes | @@ -208,7 +208,7 @@ secret_key = "my-secret-key" | gateway_instance_type | The instance type of the Security Gateways | string | - c4.large
- c4.xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| c5.xlarge | no | | gateways_min_group_size | The minimal number of Security Gateways | number | n/a | 2 | no | | gateways_max_group_size | The maximal number of Security Gateways | number | n/a | 10 | no | -| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX | R81.20-BYOL | no | +| gateway_version | Gateway version and license | string | - R81.20-BYOL
- R81.20-PAYG-NGTP
- R81.20-PAYG-NGTX
- R82-BYOL
- R82-PAYG-NGTP
- R82-PAYG-NGTX | R81.20-BYOL | no | | gateway_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateway_SICKey | The Secure Internal Communication key for trusted connection between Check Point components. Choose a random string consisting of at least 8 alphanumeric characters | string | n/a | "12345678" | yes | | enable_cloudwatch | Report Check Point specific CloudWatch metrics | bool | true/false | false | no | @@ -217,7 +217,7 @@ secret_key = "my-secret-key" | allocate_public_IP | Allocate a Public IP for gateway members. | bool | true/false | false | no | | management_deploy | Select 'false' to use an existing Security Management Server or to deploy one later and to ignore the other parameters of this section | bool | true/false | true | no | | management_instance_type | The EC2 instance type of the Security Management Server | string | - c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
- c5.24xlarge
- c5n.large
- c5n.xlarge
- c5n.2xlarge
- c5n.4xlarge
- c5n.9xlarge
- c5n.18xlarge
- c5d.large
- c5d.xlarge
- c5d.2xlarge
- c5d.4xlarge
- c5d.9xlarge
- c5d.12xlarge
- c5d.18xlarge
- c5d.24xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.8xlarge
- m5.12xlarge
- m5.16xlarge
- m5.24xlarge
- m6i.large
- m6i.xlarge
- m6i.2xlarge
- m6i.4xlarge
- m6i.8xlarge
- m6i.12xlarge
- m6i.16xlarge
- m6i.24xlarge
- m6i.32xlarge
- c6i.large
- c6i.xlarge
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.12xlarge
- c6i.16xlarge
- c6i.24xlarge
- c6i.32xlarge
- c6in.large
- c6in.xlarge
- c6in.2xlarge
- c6in.4xlarge
- c6in.8xlarge
- c6in.12xlarge
- c6in.16xlarge
- c6in.24xlarge
- c6in.32xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.12xlarge
- r5.16xlarge
- r5.24xlarge
- r5a.large
- r5a.xlarge
- r5a.2xlarge
- r5a.4xlarge
- r5a.8xlarge
- r5a.12xlarge
- r5a.16xlarge
- r5a.24xlarge
- r5b.large
- r5b.xlarge
- r5b.2xlarge
- r5b.4xlarge
- r5b.8xlarge
- r5b.12xlarge
- r5b.16xlarge
- r5b.24xlarge
- r5n.large
- r5n.xlarge
- r5n.2xlarge
- r5n.4xlarge
- r5n.8xlarge
- r5n.12xlarge
- r5n.16xlarge
- r5n.24xlarge
- r6i.large
- r6i.xlarge
- r6i.2xlarge
- r6i.4xlarge
- r6i.8xlarge
- r6i.12xlarge
- r6i.16xlarge
- r6i.24xlarge
- r6i.32xlarge
- m6a.large
- m6a.xlarge
- m6a.2xlarge
- m6a.4xlarge
- m6a.8xlarge
- m6a.12xlarge
- m6a.16xlarge
- m6a.24xlarge - m6a.32xlarge
- m6a.48xlarge
| m5.xlarge | no | -| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG | R81.20-BYOL | no | +| management_version | The license to install on the Security Management Server | string | - R81.10-BYOL
- R81.10-PAYG
- R81.20-BYOL
- R81.20-PAYG
- R82-BYOL
- R82-PAYG | R81.20-BYOL | no | | management_password_hash | (Optional) Admin user's password hash (use command 'openssl passwd -6 PASSWORD' to get the PASSWORD's hash) | string | n/a | "" | no | | gateways_policy | The name of the Security Policy package to be installed on the gateways in the Security Gateways Auto Scaling group | string | n/a | Standard | no | | gateway_management | Select 'Over the internet' if any of the gateways you wish to manage are not directly accessed via their private IP address. | string | - Locally managed
- Over the internet | Locally managed | no | @@ -246,6 +246,7 @@ In order to check the template version, please refer to [sk116585](https://suppo | Template Version | Description | |------------------|--------------------------------------------------------------------------------------------------------------------| +| 20241027 | R82 version support | | 20240704 | R80.40 version deprecation | | 20240515 | Add support for requiring use instance metadata service version 2 (IMDSv2) only | | 20231012 | Update AWS Terraform provider version to 5.20.1 | From c94cfce8d21aa1814d47792e174fbf97bc467028 Mon Sep 17 00:00:00 2001 From: olgami Date: Mon, 28 Oct 2024 13:09:48 +0000 Subject: [PATCH 11/12] GCP | Added R82 support --- .../autoscale-byol/README.md | 2 +- .../check-point-autoscale--byol.py | 3 +- .../check-point-autoscale--byol.py.schema | 1 + .../autoscale-byol/images.py | 64 +++++++++---------- .../autoscale-payg/README.md | 2 +- .../check-point-autoscale--payg.py | 3 +- .../check-point-autoscale--payg.py.schema | 1 + .../autoscale-payg/images.py | 64 +++++++++---------- gcp/deployment-packages/ha-byol/README.md | 2 +- .../ha-byol/check-point-cluster--byol.py | 3 +- .../check-point-cluster--byol.py.schema | 1 + gcp/deployment-packages/ha-byol/images.py | 64 +++++++++---------- gcp/deployment-packages/ha-payg/README.md | 2 +- .../ha-payg/check-point-cluster--payg.py | 3 +- .../check-point-cluster--payg.py.schema | 1 + gcp/deployment-packages/ha-payg/images.py | 64 +++++++++---------- gcp/deployment-packages/single-byol/README.md | 2 +- .../single-byol/check-point-vsec--byol.py | 4 +- .../check-point-vsec--byol.py.schema | 4 ++ gcp/deployment-packages/single-byol/images.py | 64 +++++++++---------- gcp/deployment-packages/single-payg/README.md | 2 +- .../single-payg/check-point-vsec--payg.py | 4 +- .../check-point-vsec--payg.py.schema | 4 ++ gcp/deployment-packages/single-payg/images.py | 64 +++++++++---------- .../gcp/autoscale-into-existing-vpc/README.md | 4 +- .../gcp/autoscale-into-existing-vpc/locals.tf | 5 +- .../gcp/autoscale-into-new-vpc/README.md | 4 +- .../gcp/autoscale-into-new-vpc/locals.tf | 5 +- terraform/gcp/high-availability/README.md | 4 +- terraform/gcp/high-availability/locals.tf | 5 +- .../gcp/single-into-existing-vpc/README.md | 4 +- .../gcp/single-into-existing-vpc/locals.tf | 7 +- terraform/gcp/single-into-new-vpc/README.md | 4 +- 33 files changed, 252 insertions(+), 218 deletions(-) diff --git a/gcp/deployment-packages/autoscale-byol/README.md b/gcp/deployment-packages/autoscale-byol/README.md index d11c9a1b..b9f8aec7 100644 --- a/gcp/deployment-packages/autoscale-byol/README.md +++ b/gcp/deployment-packages/autoscale-byol/README.md @@ -35,7 +35,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke ## config.yaml variables | Name | Description | Type | Allowed values | | ------------- | ------------- | ------------- | ------------- | -| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;
R82 Autoscaling;| | | | | | | | **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | | | | | | | diff --git a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py index 226e09ea..06748f67 100755 --- a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py +++ b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py @@ -12,7 +12,8 @@ VERSIONS = { 'R81.10-GW': 'r8110-gw', - 'R81.20-GW': 'r8120-gw' + 'R81.20-GW': 'r8120-gw', + 'R82-GW': 'r82-gw' } TEMPLATE_NAME = 'autoscale' diff --git a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema index 65b41f3d..219adc72 100755 --- a/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema +++ b/gcp/deployment-packages/autoscale-byol/check-point-autoscale--byol.py.schema @@ -171,6 +171,7 @@ properties: enum: - R81.10 Autoscaling - R81.20 Autoscaling + - R82 Autoscaling managementName: type: string default: 'checkpoint-management' diff --git a/gcp/deployment-packages/autoscale-byol/images.py b/gcp/deployment-packages/autoscale-byol/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/autoscale-byol/images.py +++ b/gcp/deployment-packages/autoscale-byol/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/gcp/deployment-packages/autoscale-payg/README.md b/gcp/deployment-packages/autoscale-payg/README.md index 9dfa6b83..bef206ee 100644 --- a/gcp/deployment-packages/autoscale-payg/README.md +++ b/gcp/deployment-packages/autoscale-payg/README.md @@ -35,7 +35,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke ## config.yaml variables | Name | Description | Type | Allowed values | | ------------- | ------------- | ------------- | ------------- | -| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;| +| **autoscalingVersion** | Autoscaling Version | string | R80.40 Autoscaling;
R81.00 Autoscaling;
R81.10 Autoscaling;
R81.20 Autoscaling;
R82 Autoscaling;| | | | | | | | **managementName** | Security Management Server name | string | The name of the Security Management Server as appears in autoprovisioning configuration | | | | | | | diff --git a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py index b13af6da..8dd5e401 100755 --- a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py +++ b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py @@ -12,7 +12,8 @@ VERSIONS = { 'R81.10-GW': 'r8110-gw', - 'R81.20-GW': 'r8120-gw' + 'R81.20-GW': 'r8120-gw', + 'R82-GW': 'r82-gw' } TEMPLATE_NAME = 'autoscale' diff --git a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema index b9341dfa..e8dbbe5d 100755 --- a/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema +++ b/gcp/deployment-packages/autoscale-payg/check-point-autoscale--payg.py.schema @@ -171,6 +171,7 @@ properties: enum: - R81.10 Autoscaling - R81.20 Autoscaling + - R82 Autoscaling managementName: type: string default: 'checkpoint-management' diff --git a/gcp/deployment-packages/autoscale-payg/images.py b/gcp/deployment-packages/autoscale-payg/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/autoscale-payg/images.py +++ b/gcp/deployment-packages/autoscale-payg/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/gcp/deployment-packages/ha-byol/README.md b/gcp/deployment-packages/ha-byol/README.md index f915c4b4..660afa73 100644 --- a/gcp/deployment-packages/ha-byol/README.md +++ b/gcp/deployment-packages/ha-byol/README.md @@ -43,7 +43,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke ## config.yaml variables | Name | Description | Type | Allowed values | | ------------- | ------------- | ------------- | ------------- | -| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster;
R82 Cluster;| | | | | | | | **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | | | | | | | diff --git a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py index 4a66ea50..9a7ad76e 100755 --- a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py +++ b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py @@ -17,7 +17,8 @@ VERSIONS = { 'R81.10': 'r8110-gw', - 'R81.20': 'r8120-gw' + 'R81.20': 'r8120-gw', + 'R82': 'r82-gw' } TEMPLATE_NAME = 'cluster' diff --git a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema index d01c7887..eddbcbf4 100755 --- a/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema +++ b/gcp/deployment-packages/ha-byol/check-point-cluster--byol.py.schema @@ -73,6 +73,7 @@ properties: enum: - R81.10 Cluster - R81.20 Cluster + - R82 Cluster enableMonitoring: type: boolean default: False diff --git a/gcp/deployment-packages/ha-byol/images.py b/gcp/deployment-packages/ha-byol/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/ha-byol/images.py +++ b/gcp/deployment-packages/ha-byol/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/gcp/deployment-packages/ha-payg/README.md b/gcp/deployment-packages/ha-payg/README.md index 4f8405cd..fa12d90c 100644 --- a/gcp/deployment-packages/ha-payg/README.md +++ b/gcp/deployment-packages/ha-payg/README.md @@ -43,7 +43,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke ## config.yaml variables | Name | Description | Type | Allowed values | | ------------- | ------------- | ------------- | ------------- | -| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster; | +| **ha_version** | High Availability Version | string | R80.40 Cluster;
R81.00 Cluster;
R81.10 Cluster;
R81.20 Cluster;
R82 Cluster;| | | | | | | | **zoneA** | Member A Zone. The zone determines what computing resources are available and where your data is stored and used | string | List of allowed [Regions and Zones](https://cloud.google.com/compute/docs/regions-zones?_ga=2.31926582.-962483654.1585043745) | | | | | | | diff --git a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py index d65178a6..0bc5dc6c 100755 --- a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py +++ b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py @@ -17,7 +17,8 @@ VERSIONS = { 'R81.10': 'r8110-gw', - 'R81.20': 'r8120-gw' + 'R81.20': 'r8120-gw', + 'R82': 'r82-gw' } TEMPLATE_NAME = 'cluster' diff --git a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema index b3b513b6..d257e117 100755 --- a/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema +++ b/gcp/deployment-packages/ha-payg/check-point-cluster--payg.py.schema @@ -73,6 +73,7 @@ properties: enum: - R81.10 Cluster - R81.20 Cluster + - R82 Cluster enableMonitoring: type: boolean default: False diff --git a/gcp/deployment-packages/ha-payg/images.py b/gcp/deployment-packages/ha-payg/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/ha-payg/images.py +++ b/gcp/deployment-packages/ha-payg/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/gcp/deployment-packages/single-byol/README.md b/gcp/deployment-packages/single-byol/README.md index 4c14d447..5e589c22 100644 --- a/gcp/deployment-packages/single-byol/README.md +++ b/gcp/deployment-packages/single-byol/README.md @@ -65,7 +65,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke | | | | | | | **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | | | | | | | -| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| **installationType** | Installation type and version | string | R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone)
R82 Gateway only
R82 Management only
R82 Manual Configuration
R82 Gateway and Management (Standalone) | | | | | | | | **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| | | | | | | diff --git a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py index 3cef893f..2916b92d 100755 --- a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py +++ b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py @@ -15,7 +15,9 @@ 'R81.10': 'r8110', 'R81.10-GW': 'r8110-gw', 'R81.20': 'r8120', - 'R81.20-GW': 'r8120-gw' + 'R81.20-GW': 'r8120-gw', + 'R82': 'r82', + 'R82-GW': 'r82-gw' } ADDITIONAL_NETWORK = 'additionalNetwork{}' diff --git a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema index 2a3c922a..4ca0f5a2 100755 --- a/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema +++ b/gcp/deployment-packages/single-byol/check-point-vsec--byol.py.schema @@ -154,6 +154,10 @@ properties: - R81.20 Management only - R81.20 Manual Configuration - R81.20 Gateway and Management (Standalone) + - R82 Gateway only + - R82 Management only + - R82 Manual Configuration + - R82 Gateway and Management (Standalone) maintenanceMode: type: string pattern: ^([a-z0-9A-Z.]{12,300}|)$ diff --git a/gcp/deployment-packages/single-byol/images.py b/gcp/deployment-packages/single-byol/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/single-byol/images.py +++ b/gcp/deployment-packages/single-byol/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/gcp/deployment-packages/single-payg/README.md b/gcp/deployment-packages/single-payg/README.md index c3f9443a..18b4bf04 100644 --- a/gcp/deployment-packages/single-payg/README.md +++ b/gcp/deployment-packages/single-payg/README.md @@ -65,7 +65,7 @@ To deploy the Deployment Manager's package manually, without using the GCP Marke | | | | | | | **externalIP** | External IP address type | string | Static;
Ephemeral;
None;
An external IP address associated with this instance. Selecting "None" will result in the instance having no external internet access. [Learn more](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address?_ga=2.259654658.-962483654.1585043745) | | | | | | | -| **installationType** | Installation type and version | string | R80.40 Gateway only
R80.40 Management only
R80.40 Manual Configuration
R80.40 Gateway and Management (Standalone)
R81.00 Gateway only
R81.00 Management only
R81.00 Manual Configuration
R81.00 Gateway and Management (Standalone)
R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone) | +| **installationType** | Installation type and version | string | R81.10 Gateway only
R81.10 Management only
R81.10 Manual Configuration
R81.10 Gateway and Management (Standalone)
R81.20 Gateway only
R81.20 Management only
R81.20 Manual Configuration
R81.20 Gateway and Management (Standalone)
R82 Gateway only
R82 Management only
R82 Manual Configuration
R82 Gateway and Management (Standalone) | | **smart1CloudToken** | Smart-1 Cloud token to connect this gateway to Check Point's Security Management as a Service.

Follow these instructions to quickly connect this member to Smart-1 Cloud - [SK180501](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk180501) | string | A valid token copied from the Connect Gateway screen in Smart-1 Cloud portal.| | | | | | | | **diskType** | Disk type | string | pd-ssd;
pd-standard;
Storage space is much less expensive for a standard persistent disk. An SSD persistent disk is better for random IOPS or streaming throughput with low latency. [Learn more](https://cloud.google.com/compute/docs/disks/?hl=en_US&_ga=2.66020774.-962483654.1585043745#overview_of_disk_types)| diff --git a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py index a5dfbedf..100134ae 100755 --- a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py +++ b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py @@ -15,7 +15,9 @@ 'R81.10': 'r8110', 'R81.10-GW': 'r8110-gw', 'R81.20': 'r8120', - 'R81.20-GW': 'r8120-gw' + 'R81.20-GW': 'r8120-gw', + 'R82': 'r82', + 'R82-GW': 'r82-gw' } ADDITIONAL_NETWORK = 'additionalNetwork{}' diff --git a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema index 50f3e9bb..988c88f7 100755 --- a/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema +++ b/gcp/deployment-packages/single-payg/check-point-vsec--payg.py.schema @@ -152,6 +152,10 @@ properties: - R81.20 Gateway only - R81.20 Manual Configuration - R81.20 Gateway and Management (Standalone) + - R82 Gateway only + - R82 Management only + - R82 Manual Configuration + - R82 Gateway and Management (Standalone) maintenanceMode: type: string pattern: ^([a-z0-9A-Z.]{12,300}|)$ diff --git a/gcp/deployment-packages/single-payg/images.py b/gcp/deployment-packages/single-payg/images.py index 7b04bee0..46c40abd 100755 --- a/gcp/deployment-packages/single-payg/images.py +++ b/gcp/deployment-packages/single-payg/images.py @@ -1,34 +1,34 @@ IMAGES = { - "check-point-r8120-payg": "check-point-r8120-payg-631-991001560-v20240425", - "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001560-v20240425", - "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001560-v20240425", - "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001560-v20240425", - "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001560-v20240425", - "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001560-v20240425", - "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001560-v20240425", - "check-point-r8120-byol": "check-point-r8120-byol-631-991001560-v20240425", - "check-point-r8110-payg": "check-point-r8110-payg-335-991001560-v20240425", - "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001560-v20240425", - "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001560-v20240425", - "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001560-v20240425", - "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001560-v20240425", - "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001560-v20240425", - "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001560-v20240425", - "check-point-r8110-byol": "check-point-r8110-byol-335-991001560-v20240425", - "check-point-r81-payg": "check-point-r81-payg-392-991001560-v20240425", - "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001560-v20240425", - "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001560-v20240425", - "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001560-v20240425", - "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001560-v20240425", - "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001560-v20240425", - "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001560-v20240425", - "check-point-r81-byol": "check-point-r81-byol-392-991001560-v20240425", - "check-point-r8040-payg": "check-point-r8040-payg-294-991001560-v20240425", - "check-point-r8040-gw-payg-single": "check-point-r8040-gw-payg-single-294-991001564-v20240505", - "check-point-r8040-gw-payg-mig": "check-point-r8040-gw-payg-mig-294-991001564-v20240505", - "check-point-r8040-gw-payg-cluster": "check-point-r8040-gw-payg-cluster-294-991001564-v20240505", - "check-point-r8040-gw-byol-single": "check-point-r8040-gw-byol-single-294-991001564-v20240505", - "check-point-r8040-gw-byol-mig": "check-point-r8040-gw-byol-mig-294-991001564-v20240505", - "check-point-r8040-gw-byol-cluster": "check-point-r8040-gw-byol-cluster-294-991001564-v20240505", - "check-point-r8040-byol": "check-point-r8040-byol-294-991001560-v20240425" + "check-point-r82-payg": "check-point-r82-payg-777-991001695-v20241021", + "check-point-r82-gw-payg-single": "check-point-r82-gw-payg-single-777-991001695-v20241021", + "check-point-r82-gw-payg-mig": "check-point-r82-gw-payg-mig-777-991001695-v20241021", + "check-point-r82-gw-payg-cluster": "check-point-r82-gw-payg-cluster-777-991001695-v20241021", + "check-point-r82-gw-byol-single": "check-point-r82-gw-byol-single-777-991001695-v20241021", + "check-point-r82-gw-byol-mig": "check-point-r82-gw-byol-mig-777-991001695-v20241021", + "check-point-r82-gw-byol-cluster": "check-point-r82-gw-byol-cluster-777-991001695-v20241021", + "check-point-r82-byol": "check-point-r82-byol-777-991001695-v20241021", + "check-point-r8120-payg": "check-point-r8120-payg-634-991001641-v20240807", + "check-point-r8120-gw-payg-single": "check-point-r8120-gw-payg-single-631-991001669-v20240923", + "check-point-r8120-gw-payg-mig": "check-point-r8120-gw-payg-mig-631-991001669-v20240923", + "check-point-r8120-gw-payg-cluster": "check-point-r8120-gw-payg-cluster-631-991001669-v20240923", + "check-point-r8120-gw-byol-single": "check-point-r8120-gw-byol-single-631-991001669-v20240923", + "check-point-r8120-gw-byol-mig": "check-point-r8120-gw-byol-mig-631-991001669-v20240923", + "check-point-r8120-gw-byol-cluster": "check-point-r8120-gw-byol-cluster-631-991001669-v20240923", + "check-point-r8120-byol": "check-point-r8120-byol-634-991001641-v20240807", + "check-point-r8110-payg": "check-point-r8110-payg-335-991001681-v20241009", + "check-point-r8110-gw-payg-single": "check-point-r8110-gw-payg-single-335-991001681-v20241009", + "check-point-r8110-gw-payg-mig": "check-point-r8110-gw-payg-mig-335-991001681-v20241009", + "check-point-r8110-gw-payg-cluster": "check-point-r8110-gw-payg-cluster-335-991001681-v20241009", + "check-point-r8110-gw-byol-single": "check-point-r8110-gw-byol-single-335-991001681-v20241009", + "check-point-r8110-gw-byol-mig": "check-point-r8110-gw-byol-mig-335-991001681-v20241009", + "check-point-r8110-gw-byol-cluster": "check-point-r8110-gw-byol-cluster-335-991001681-v20241009", + "check-point-r8110-byol": "check-point-r8110-byol-335-991001681-v20241009", + "check-point-r81-payg": "check-point-r81-payg-392-991001616-v20240619", + "check-point-r81-gw-payg-single": "check-point-r81-gw-payg-single-392-991001616-v20240619", + "check-point-r81-gw-payg-mig": "check-point-r81-gw-payg-mig-392-991001616-v20240619", + "check-point-r81-gw-payg-cluster": "check-point-r81-gw-payg-cluster-392-991001616-v20240619", + "check-point-r81-gw-byol-single": "check-point-r81-gw-byol-single-392-991001616-v20240619", + "check-point-r81-gw-byol-mig": "check-point-r81-gw-byol-mig-392-991001616-v20240619", + "check-point-r81-gw-byol-cluster": "check-point-r81-gw-byol-cluster-392-991001616-v20240619", + "check-point-r81-byol": "check-point-r81-byol-392-991001616-v20240619" } \ No newline at end of file diff --git a/terraform/gcp/autoscale-into-existing-vpc/README.md b/terraform/gcp/autoscale-into-existing-vpc/README.md index 45abf434..1949b511 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/README.md +++ b/terraform/gcp/autoscale-into-existing-vpc/README.md @@ -167,7 +167,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | prefix | (Optional) Resources name prefix.
Note: resource name must not contain reserved words based on: sk40179. | string | N/A | "chkp-tf-mig" | no | | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | | image_name | The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-631-991001335-v20230622). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | -| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120;
R82 | R8120 | yes | | | | | | | | management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | | management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | @@ -220,6 +220,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20241027 | Added R82 support | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230109 | Updated startup script to use cloud-config. | diff --git a/terraform/gcp/autoscale-into-existing-vpc/locals.tf b/terraform/gcp/autoscale-into-existing-vpc/locals.tf index 9687f394..20143f79 100755 --- a/terraform/gcp/autoscale-into-existing-vpc/locals.tf +++ b/terraform/gcp/autoscale-into-existing-vpc/locals.tf @@ -5,14 +5,15 @@ locals { // will fail if [var.license] is invalid: validate_license = index(local.license_allowed_values, upper(var.license)) - regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + regex_validate_image_name = "^check-point-${lower(var.os_version)}-gw-.*[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}.*" // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // Will fail if var.os_version is invalid: validate_os_version = index(local.version_allowed_values, var.os_version) diff --git a/terraform/gcp/autoscale-into-new-vpc/README.md b/terraform/gcp/autoscale-into-new-vpc/README.md index 3958865d..873dcb67 100755 --- a/terraform/gcp/autoscale-into-new-vpc/README.md +++ b/terraform/gcp/autoscale-into-new-vpc/README.md @@ -178,7 +178,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | prefix | (Optional) Resources name prefix.
Note: resource name must not contain reserved words based on: sk40179. | string | N/A | "chkp-tf-mig" | no | | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | | image_name | The autoscaling (MIG) image name (e.g. check-point-r8120-gw-byol-mig-631-991001335-v20230622). You can choose the desired mig image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/autoscale-byol/images.py). | string | N/A | N/A | yes | -| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120;
R82 | R8120 | yes | | | | | | | | management_nic | Management Interface - Autoscaling Security Gateways in GCP can be managed by an ephemeral public IP or using the private IP of the internal interface (eth1). | string | Ephemeral Public IP (eth0)
- Private IP (eth1) | "Ephemeral Public IP (eth0)" | no | | management_name | The name of the Security Management Server as appears in autoprovisioning configuration. (Please enter a valid Security Management name including lowercase letters, digits and hyphens only). | string | N/A | "checkpoint-management" | no | @@ -233,6 +233,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20241027 | Added R82 support | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230109 | Updated startup script to use cloud-config. | diff --git a/terraform/gcp/autoscale-into-new-vpc/locals.tf b/terraform/gcp/autoscale-into-new-vpc/locals.tf index d49e09c4..b4679b97 100755 --- a/terraform/gcp/autoscale-into-new-vpc/locals.tf +++ b/terraform/gcp/autoscale-into-new-vpc/locals.tf @@ -5,14 +5,15 @@ locals { // will fail if [var.license] is invalid: validate_license = index(local.license_allowed_values, upper(var.license)) - regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-mig-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + regex_validate_image_name = "^check-point-${lower(var.os_version)}-gw-.*[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}.*" // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // Will fail if var.os_version is invalid: validate_os_version = index(local.version_allowed_values, var.os_version) diff --git a/terraform/gcp/high-availability/README.md b/terraform/gcp/high-availability/README.md index d83af628..037bc592 100755 --- a/terraform/gcp/high-availability/README.md +++ b/terraform/gcp/high-availability/README.md @@ -229,7 +229,7 @@ internal_network1_subnetwork_name = "" | license | Checkpoint license (BYOL or PAYG). | string | - BYOL
- PAYG
| "BYOL" | no | | image_name | The High Availability (cluster) image name (e.g. check-point-r8120-gw-byol-cluster-631-991001335-v20230622). You can choose the desired cluster image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/ha-byol/images.py). | string | N/A | N/A | yes | | | | | | | -| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120;
R82 | R8120 | yes | | | | | | | | region | GCP region | string | N/A | "us-central1" | no | | zoneA | Member A Zone. The zone determines what computing resources are available and where your data is stored and used. | string | N/A | "us-central1-a" | no | @@ -304,6 +304,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20241027 | Added R82 support | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230209 | Added Smart-1 Cloud support. | diff --git a/terraform/gcp/high-availability/locals.tf b/terraform/gcp/high-availability/locals.tf index 680c7f9c..53a9eb7a 100755 --- a/terraform/gcp/high-availability/locals.tf +++ b/terraform/gcp/high-availability/locals.tf @@ -5,14 +5,15 @@ locals { // will fail if [var.license] is invalid: validate_license = index(local.license_allowed_values, upper(var.license)) - regex_validate_image_name = "check-point-r8[0-1][1-4]0-gw-(byol|payg)-cluster-[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}" + regex_validate_image_name = "^check-point-${lower(var.os_version)}-gw-.*[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}.*" // will fail if the image name is not in the right syntax validate_image_name = length(regexall(local.regex_validate_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME") version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // Will fail if var.os_version is invalid: validate_os_version = index(local.version_allowed_values, var.os_version) diff --git a/terraform/gcp/single-into-existing-vpc/README.md b/terraform/gcp/single-into-existing-vpc/README.md index 72bc8265..51f2a85e 100755 --- a/terraform/gcp/single-into-existing-vpc/README.md +++ b/terraform/gcp/single-into-existing-vpc/README.md @@ -171,7 +171,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | | | | | | | -| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120;
R82 | R8120 | yes | | | | | | | | installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| | | | | | | @@ -253,6 +253,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | | ---------------- | ------------- | +| 20241027 | Added R82 support | +| | | | | 20230910 | - R81.20 is the default version | | | | | | 20230209 | Added Smart-1 Cloud support. | diff --git a/terraform/gcp/single-into-existing-vpc/locals.tf b/terraform/gcp/single-into-existing-vpc/locals.tf index 78145861..4efc3b29 100755 --- a/terraform/gcp/single-into-existing-vpc/locals.tf +++ b/terraform/gcp/single-into-existing-vpc/locals.tf @@ -18,15 +18,16 @@ locals { // 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 alphanumeric 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,}" + regex_validate_mgmt_image_name = "^check-point-${lower(var.os_version)}-[^(gw)].*[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}.*" + regex_validate_single_image_name = "^check-point-${lower(var.os_version)}-gw-.*[0-9]{3}-([0-9]{3,}|[a-z]+)-v[0-9]{8,}.*" // will fail if the image name is not in the right syntax validate_image_name = var.installationType != "Gateway only" && length(regexall(local.regex_validate_mgmt_image_name, var.image_name)) > 0 ? 0 : (var.installationType == "Gateway only" && length(regexall(local.regex_validate_single_image_name, var.image_name)) > 0 ? 0 : index(split("-", var.image_name), "INVALID IMAGE NAME")) version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // Will fail if var.os_version is invalid: validate_os_version = index(local.version_allowed_values, var.os_version) diff --git a/terraform/gcp/single-into-new-vpc/README.md b/terraform/gcp/single-into-new-vpc/README.md index 59db07be..029f71da 100644 --- a/terraform/gcp/single-into-new-vpc/README.md +++ b/terraform/gcp/single-into-new-vpc/README.md @@ -180,7 +180,7 @@ Please leave empty list for a protocol if you want to disable traffic for it. | | | | | | | image_name |The single gateway or management image name (e.g. check-point-r8120-gw-byol-single-631-991001335-v20230622 for gateway or check-point-r8120-byol-631-991001335-v20230621 for management). You can choose the desired gateway image value from [Github](https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/gcp/deployment-packages/single-byol/images.py).| string | N/A | N/A | yes | | | | | | | -| os_version |GAIA OS Version | string | R81;
R8110;
R8120 | R8120 | yes | +| os_version |GAIA OS Version | string | R81;
R8110;
R8120;
R82 | R8120 | yes | | | | | | | | installationType | Installation type and version | string |Gateway only;
Management only;
Manual Configuration
Gateway and Management (Standalone) |Gateway only|yes| | | | | | | @@ -262,6 +262,8 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|-------------------------------------| +| 20241027 | Added R82 support | +| | | | | 20230921 | Added single-into-new-vpc template. | | | | From fb1dfc0a0ca8881bfa27c9b3c798ac83e5f8c75b Mon Sep 17 00:00:00 2001 From: yairra Date: Mon, 28 Oct 2024 16:42:26 +0200 Subject: [PATCH 12/12] Azure tempaltes | Added R82 support --- .../createUiDefinition.json | 345 ++++++++++++++++- .../mainTemplate.json | 15 +- .../marketplace-ha/createUiDefinition.json | 345 ++++++++++++++++- .../marketplace-ha/mainTemplate.json | 15 +- .../createUiDefinition.json | 64 +++- .../marketplace-management/mainTemplate.json | 12 +- .../marketplace-mds/createUiDefinition.json | 35 +- .../marketplace-mds/mainTemplate.json | 9 +- .../createUiDefinition.json | 353 +++++++++++++++++- .../marketplace-single/mainTemplate.json | 17 +- .../marketplace-vmss/createUiDefinition.json | 345 ++++++++++++++++- .../marketplace-vmss/mainTemplate.json | 15 +- .../vwan-managed-app/mainTemplate.json | 5 +- .../high-availability-existing-vnet/README.md | 4 +- .../variables.tf | 6 +- .../high-availability-new-vnet/README.md | 4 +- .../high-availability-new-vnet/variables.tf | 8 +- .../azure/management-existing-vnet/README.md | 4 +- .../management-existing-vnet/variables.tf | 6 +- terraform/azure/management-new-vnet/README.md | 4 +- .../azure/management-new-vnet/variables.tf | 6 +- terraform/azure/mds-existing-vnet/README.md | 4 +- .../azure/mds-existing-vnet/variables.tf | 8 +- terraform/azure/mds-new-vnet/README.md | 4 +- terraform/azure/mds-new-vnet/variables.tf | 8 +- terraform/azure/modules/common/variables.tf | 8 +- .../azure/nva-into-existing-hub/README.md | 7 +- terraform/azure/nva-into-existing-hub/main.tf | 4 +- .../azure/nva-into-existing-hub/variables.tf | 4 +- terraform/azure/nva-into-new-vwan/README.md | 3 +- terraform/azure/nva-into-new-vwan/main.tf | 4 +- .../azure/nva-into-new-vwan/variables.tf | 4 +- .../single-gateway-existing-vnet/README.md | 4 +- .../single-gateway-existing-vnet/variables.tf | 8 +- .../azure/single-gateway-new-vnet/README.md | 4 +- .../single-gateway-new-vnet/variables.tf | 8 +- terraform/azure/vmss-existing-vnet/README.md | 4 +- .../azure/vmss-existing-vnet/variables.tf | 6 +- terraform/azure/vmss-new-vnet/README.md | 4 +- terraform/azure/vmss-new-vnet/variables.tf | 4 +- 40 files changed, 1627 insertions(+), 90 deletions(-) diff --git a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json index 54fd25cc..f4c53009 100644 --- a/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json +++ b/azure/templates/marketplace-gateway-load-balancer/createUiDefinition.json @@ -360,6 +360,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -1066,6 +1070,345 @@ }, "count": "[steps('autoprovision').vmCount]" }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R82vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R82vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, { "name": "adminShell", "type": "Microsoft.Common.DropDown", @@ -1489,7 +1832,7 @@ "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", "customMetrics": "[steps('autoprovision').customMetrics]", "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX, steps('chkp').R82vmSizeUiBYOL, steps('chkp').R82vmSizeUiNGTP, steps('chkp').R82vmSizeUiNGTX)]", "sicKey": "[steps('chkp').sicKeyUi]", "bootstrapScript": "[steps('chkp').bootstrapScript]", "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", diff --git a/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json index 12d29edc..e2307459 100644 --- a/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json +++ b/azure/templates/marketplace-gateway-load-balancer/mainTemplate.json @@ -24,7 +24,10 @@ "R81.10 - Pay As You Go (NGTX)", "R81.20 - Bring Your Own License", "R81.20 - Pay As You Go (NGTP)", - "R81.20 - Pay As You Go (NGTX)" + "R81.20 - Pay As You Go (NGTX)", + "R82 - Bring Your Own License", + "R82 - Pay As You Go (NGTP)", + "R82 - Pay As You Go (NGTX)" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -422,7 +425,10 @@ "R81.10 - Pay As You Go (NGTX)": "NGTX", "R81.20 - Bring Your Own License": "BYOL", "R81.20 - Pay As You Go (NGTP)": "NGTP", - "R81.20 - Pay As You Go (NGTX)": "NGTX" + "R81.20 - Pay As You Go (NGTX)": "NGTX", + "R82 - Bring Your Own License": "BYOL", + "R82 - Pay As You Go (NGTP)": "NGTP", + "R82 - Pay As You Go (NGTX)": "NGTX" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { @@ -431,7 +437,10 @@ "R81.10 - Pay As You Go (NGTX)": "R8110", "R81.20 - Bring Your Own License": "R8120", "R81.20 - Pay As You Go (NGTP)": "R8120", - "R81.20 - Pay As You Go (NGTX)": "R8120" + "R81.20 - Pay As You Go (NGTX)": "R8120", + "R82 - Bring Your Own License": "R82", + "R82 - Pay As You Go (NGTP)": "R82", + "R82 - Pay As You Go (NGTX)": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "SerialConsoleGeographies": { diff --git a/azure/templates/marketplace-ha/createUiDefinition.json b/azure/templates/marketplace-ha/createUiDefinition.json index 886f864a..5061798d 100644 --- a/azure/templates/marketplace-ha/createUiDefinition.json +++ b/azure/templates/marketplace-ha/createUiDefinition.json @@ -75,6 +75,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -781,6 +785,345 @@ }, "count": 2 }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-byol" + }, + "count": 2 + }, + { + "name": "R82vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtp" + }, + "count": 2 + }, + { + "name": "R82vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtx" + }, + "count": 2 + }, { "name": "adminShell", "type": "Microsoft.Common.DropDown", @@ -1609,7 +1952,7 @@ "authenticationType": "[basics('auth').authenticationType]", "sshPublicKey": "[basics('auth').sshPublicKey]", "vmName": "[basics('clusterObjectNameUi')]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX, steps('chkp').R82vmSizeUiBYOL, steps('chkp').R82vmSizeUiNGTP, steps('chkp').R82vmSizeUiNGTX)]", "sicKey": "[steps('chkp').sicKeyUi]", "virtualNetworkName": "[steps('network').virtualNetwork.name]", "virtualNetworkAddressPrefixes": "[steps('network').virtualNetwork.addressPrefixes]", diff --git a/azure/templates/marketplace-ha/mainTemplate.json b/azure/templates/marketplace-ha/mainTemplate.json index 92ebdc45..cebd2dfb 100644 --- a/azure/templates/marketplace-ha/mainTemplate.json +++ b/azure/templates/marketplace-ha/mainTemplate.json @@ -17,7 +17,10 @@ "R81.10 - Pay As You Go (NGTX)", "R81.20 - Bring Your Own License", "R81.20 - Pay As You Go (NGTP)", - "R81.20 - Pay As You Go (NGTX)" + "R81.20 - Pay As You Go (NGTX)", + "R82 - Bring Your Own License", + "R82 - Pay As You Go (NGTP)", + "R82 - Pay As You Go (NGTX)" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -367,7 +370,10 @@ "R81.10 - Pay As You Go (NGTX)": "NGTX", "R81.20 - Bring Your Own License": "BYOL", "R81.20 - Pay As You Go (NGTP)": "NGTP", - "R81.20 - Pay As You Go (NGTX)": "NGTX" + "R81.20 - Pay As You Go (NGTX)": "NGTX", + "R82 - Bring Your Own License": "BYOL", + "R82 - Pay As You Go (NGTP)": "NGTP", + "R82 - Pay As You Go (NGTX)": "NGTX" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { @@ -376,7 +382,10 @@ "R81.10 - Pay As You Go (NGTX)": "R8110", "R81.20 - Bring Your Own License": "R8120", "R81.20 - Pay As You Go (NGTP)": "R8120", - "R81.20 - Pay As You Go (NGTX)": "R8120" + "R81.20 - Pay As You Go (NGTX)": "R8120", + "R82 - Bring Your Own License": "R82", + "R82 - Pay As You Go (NGTP)": "R82", + "R82 - Pay As You Go (NGTX)": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "SerialConsoleGeographies": { diff --git a/azure/templates/marketplace-management/createUiDefinition.json b/azure/templates/marketplace-management/createUiDefinition.json index fdb719a2..f35c7c0f 100644 --- a/azure/templates/marketplace-management/createUiDefinition.json +++ b/azure/templates/marketplace-management/createUiDefinition.json @@ -75,6 +75,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -215,6 +219,64 @@ }, "count": 1 }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_DS3_v2", + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "mgmt-byol" + }, + "count": 1 + }, + { + "name": "R82vmSizeUiMGMT25", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(MGMT25)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Management", + "recommendedSizes": [ + "Standard_DS3_v2", + "Standard_D3_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "mgmt-25" + }, + "count": 1 + }, { "name": "SerialPasswordInfoBox", "type": "Microsoft.Common.InfoBox", @@ -673,7 +735,7 @@ "authenticationType": "[basics('auth').authenticationType]", "sshPublicKey": "[basics('auth').sshPublicKey]", "vmName": "[basics('gatewayNameUi')]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiMGMT25, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiMGMT25)]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiMGMT25, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiMGMT25, steps('chkp').R82vmSizeUiBYOL, steps('chkp').R82vmSizeUiMGMT25)]", "virtualNetworkName": "[steps('network').virtualNetwork.name]", "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", diff --git a/azure/templates/marketplace-management/mainTemplate.json b/azure/templates/marketplace-management/mainTemplate.json index eb3153c8..7c7d26cd 100644 --- a/azure/templates/marketplace-management/mainTemplate.json +++ b/azure/templates/marketplace-management/mainTemplate.json @@ -15,7 +15,9 @@ "R81.10 - Bring Your Own License", "R81.10 - Pay As You Go (MGMT25)", "R81.20 - Bring Your Own License", - "R81.20 - Pay As You Go (MGMT25)" + "R81.20 - Pay As You Go (MGMT25)", + "R82 - Bring Your Own License", + "R82 - Pay As You Go (MGMT25)" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -275,14 +277,18 @@ "R81.10 - Bring Your Own License": "BYOL", "R81.10 - Pay As You Go (MGMT25)": "MGMT25", "R81.20 - Bring Your Own License": "BYOL", - "R81.20 - Pay As You Go (MGMT25)": "MGMT25" + "R81.20 - Pay As You Go (MGMT25)": "MGMT25", + "R82 - Bring Your Own License": "BYOL", + "R82 - Pay As You Go (MGMT25)": "MGMT25" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { "R81.10 - Bring Your Own License": "R8110", "R81.10 - Pay As You Go (MGMT25)": "R8110", "R81.20 - Bring Your Own License": "R8120", - "R81.20 - Pay As You Go (MGMT25)": "R8120" + "R81.20 - Pay As You Go (MGMT25)": "R8120", + "R82 - Bring Your Own License": "R82", + "R82 - Pay As You Go (MGMT25)": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "SerialConsoleGeographies": { diff --git a/azure/templates/marketplace-mds/createUiDefinition.json b/azure/templates/marketplace-mds/createUiDefinition.json index ad06592d..87e4004f 100644 --- a/azure/templates/marketplace-mds/createUiDefinition.json +++ b/azure/templates/marketplace-mds/createUiDefinition.json @@ -75,6 +75,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -153,6 +157,35 @@ }, "count": 1 }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size. Minimum of 16 cores and 64 GB RAM is required.", + "recommendedSizes": [ + "Standard_DS15_v2", + "Standard_DS5_v2" + ], + "constraints": { + "excludedSizes": [ + "Standard_A1_v2", + "Standard_D1_v2", + "Standard_DS1_v2", + "Standard_F1", + "Standard_F1s", + "Standard_G1", + "Standard_GS1" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "mgmt-byol" + }, + "count": 1 + }, { "name": "installationType", "type": "Microsoft.Common.DropDown", @@ -608,7 +641,7 @@ "authenticationType": "[basics('auth').authenticationType]", "sshPublicKey": "[basics('auth').sshPublicKey]", "vmName": "[basics('gatewayNameUi')]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8120vmSizeUiBYOL)]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R82vmSizeUiBYOL)]", "virtualNetworkName": "[steps('network').virtualNetwork.name]", "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", "Subnet1Name": "[steps('network').virtualNetwork.subnets.subnet1.name]", diff --git a/azure/templates/marketplace-mds/mainTemplate.json b/azure/templates/marketplace-mds/mainTemplate.json index 98e056c2..7c1dca78 100644 --- a/azure/templates/marketplace-mds/mainTemplate.json +++ b/azure/templates/marketplace-mds/mainTemplate.json @@ -13,7 +13,8 @@ "type": "string", "allowedValues": [ "R81.10 - Bring Your Own License", - "R81.20 - Bring Your Own License" + "R81.20 - Bring Your Own License", + "R82 - Bring Your Own License" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -266,12 +267,14 @@ "location": "[parameters('location')]", "offers": { "R81.10 - Bring Your Own License": "BYOL", - "R81.20 - Bring Your Own License": "BYOL" + "R81.20 - Bring Your Own License": "BYOL", + "R82 - Bring Your Own License": "BYOL" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { "R81.10 - Bring Your Own License": "R8110", - "R81.20 - Bring Your Own License": "R8120" + "R81.20 - Bring Your Own License": "R8120", + "R82 - Bring Your Own License": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "serialConsoleGeographies": { diff --git a/azure/templates/marketplace-single/createUiDefinition.json b/azure/templates/marketplace-single/createUiDefinition.json index 4df2533a..77059428 100644 --- a/azure/templates/marketplace-single/createUiDefinition.json +++ b/azure/templates/marketplace-single/createUiDefinition.json @@ -75,6 +75,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -781,11 +785,350 @@ }, "count": 1 }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-byol" + }, + "count": 1 + }, + { + "name": "R82vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtp" + }, + "count": 1 + }, + { + "name": "R82vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtx" + }, + "count": 1 + }, { "name": "installationType", "type": "Microsoft.Common.DropDown", "label": "Installation type", - "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'))]", + "visible": "[or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'), equals(steps('chkp').cloudGuardVersion, 'R82'))]", "defaultValue": "Gateway only", "toolTip": "Select the type of deployment", "constraints": { @@ -831,10 +1174,10 @@ { "name": "standaloneValidation", "type": "Microsoft.Common.InfoBox", - "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')))))]", + "visible": "[and(equals(steps('chkp').installationType, 'standalone'), not(and(equals(steps('chkp').R80Offer, 'Bring Your Own License'),or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'), equals(steps('chkp').cloudGuardVersion, 'R82')))))]", "options": { "icon": "Error", - "text": "Standalone deployment is ONLY supported for CloudGuard versions R81.10 and R81.20 Bring Your Own License." + "text": "Standalone deployment is ONLY supported for CloudGuard versions R81.10, R81.20 and R82 Bring Your Own License." } }, { @@ -847,7 +1190,7 @@ "regex": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", "validationMessage": "Enter a valid IPv4 network CIDR" }, - "visible": "[and(or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20')), equals(steps('chkp').installationType, 'standalone'))]" + "visible": "[and(or(equals(steps('chkp').cloudGuardVersion, 'R81.10'), equals(steps('chkp').cloudGuardVersion, 'R81.20'), equals(steps('chkp').cloudGuardVersion, 'R82')), equals(steps('chkp').installationType, 'standalone'))]" }, { "name": "sicKeyUi", @@ -1321,7 +1664,7 @@ "authenticationType": "[basics('auth').authenticationType]", "sshPublicKey": "[basics('auth').sshPublicKey]", "vmName": "[basics('gatewayNameUi')]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX )]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX, steps('chkp').R82vmSizeUiBYOL, steps('chkp').R82vmSizeUiNGTP, steps('chkp').R82vmSizeUiNGTX )]", "sicKey": "[coalesce(steps('chkp').sicKeyUi, 'notused')]", "virtualNetworkName": "[steps('network').virtualNetwork.name]", "virtualNetworkAddressPrefix": "[steps('network').virtualNetwork.addressPrefix]", diff --git a/azure/templates/marketplace-single/mainTemplate.json b/azure/templates/marketplace-single/mainTemplate.json index 6085d845..d3216bf3 100644 --- a/azure/templates/marketplace-single/mainTemplate.json +++ b/azure/templates/marketplace-single/mainTemplate.json @@ -24,7 +24,10 @@ "R81.10 - Pay As You Go (NGTX)", "R81.20 - Bring Your Own License", "R81.20 - Pay As You Go (NGTP)", - "R81.20 - Pay As You Go (NGTX)" + "R81.20 - Pay As You Go (NGTX)", + "R82 - Bring Your Own License", + "R82 - Pay As You Go (NGTP)", + "R82 - Pay As You Go (NGTX)" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -314,7 +317,10 @@ "R81.10 - Pay As You Go (NGTX)": "NGTX", "R81.20 - Bring Your Own License": "BYOL", "R81.20 - Pay As You Go (NGTP)": "NGTP", - "R81.20 - Pay As You Go (NGTX)": "NGTX" + "R81.20 - Pay As You Go (NGTX)": "NGTX", + "R82 - Bring Your Own License": "BYOL", + "R82 - Pay As You Go (NGTP)": "NGTP", + "R82 - Pay As You Go (NGTX)": "NGTX" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { @@ -323,7 +329,10 @@ "R81.10 - Pay As You Go (NGTX)": "R8110", "R81.20 - Bring Your Own License": "R8120", "R81.20 - Pay As You Go (NGTP)": "R8120", - "R81.20 - Pay As You Go (NGTX)": "R8120" + "R81.20 - Pay As You Go (NGTX)": "R8120", + "R82 - Bring Your Own License": "R82", + "R82 - Pay As You Go (NGTP)": "R82", + "R82 - Pay As You Go (NGTX)": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "serialConsoleGeographies": { @@ -541,7 +550,7 @@ "customData": "[concat('#!/usr/bin/python3 /etc/cloud_config.py\n', '\n', 'installationType=\"', variables('installationType'), '\"', '\n', 'allowUploadDownload=\"', variables('allowUploadDownload'), '\"', '\n', 'osVersion=\"', variables('osVersion'), '\"', '\n', 'templateName=\"', variables('templateName'), '\"', '\n', 'isBlink=\"', variables('isBlink'), '\"', '\n', 'templateVersion=\"', variables('templateVersion'), '\"', '\n', 'bootstrapScript64=\"', variables('bootstrapScript64'), '\"', '\n', 'location=\"', variables('location'), '\"', '\n', 'sicKey=\"', variables('sicKey'), '\"', '\n', 'managementGUIClientNetwork=\"', variables('managementGUIClientNetwork'), '\"', '\n', 'customMetrics=\"', variables('customMetrics'), '\"', '\n', 'adminShell=\"', parameters('adminShell'), '\"', '\n', 'smart1CloudToken=\"', parameters('smart1CloudToken'), '\"', '\n', 'MaintenanceModePassword=\"', parameters('MaintenanceModePasswordHash'), '\"', '\n', 'passwordHash=\"', parameters('SerialConsolePasswordHash'), '\"', '\n')]", "imageOffer": "[concat('check-point-cg-', toLower(variables('osVersion')))]", "imagePublisher": "checkpoint", - "imageSku": "[if(and(equals(parameters('installationType'), 'standalone'), or(equals(variables('osVersion'),'R8110'), equals(variables('osVersion'),'R8120'))), 'mgmt-byol', 'sg-byol')]", + "imageSku": "[if(and(equals(parameters('installationType'), 'standalone'), or(equals(variables('osVersion'),'R8110'), equals(variables('osVersion'),'R8120'), equals(variables('osVersion'),'R82'))), 'mgmt-byol', 'sg-byol')]", "imageReferenceBYOL": { "offer": "[variables('imageOffer')]", "publisher": "[variables('imagePublisher')]", diff --git a/azure/templates/marketplace-vmss/createUiDefinition.json b/azure/templates/marketplace-vmss/createUiDefinition.json index cf04efcd..3228cb59 100644 --- a/azure/templates/marketplace-vmss/createUiDefinition.json +++ b/azure/templates/marketplace-vmss/createUiDefinition.json @@ -571,6 +571,10 @@ { "label": "R81.20", "value": "R81.20" + }, + { + "label": "R82", + "value": "R82" } ] } @@ -1277,6 +1281,345 @@ }, "count": "[steps('autoprovision').vmCount]" }, + { + "name": "R82vmSizeUiBYOL", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, 'Bring Your Own License'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-byol" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R82vmSizeUiNGTP", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTP)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtp" + }, + "count": "[steps('autoprovision').vmCount]" + }, + { + "name": "R82vmSizeUiNGTX", + "type": "Microsoft.Compute.SizeSelector", + "visible": "[and(equals(steps('chkp').cloudGuardVersion, 'R82'), contains(steps('chkp').R80Offer, '(NGTX)'))]", + "label": "Virtual machine size", + "toolTip": "The VM size of the Security Gateway", + "recommendedSizes": [ + "Standard_D4ds_v5", + "Standard_D4d_v5" + ], + "constraints": { + "allowedSizes": [ + "Standard_D4_v4", + "Standard_D8_v4", + "Standard_D16_v4", + "Standard_D32_v4", + "Standard_D48_v4", + "Standard_D64_v4", + "Standard_D4s_v4", + "Standard_D8s_v4", + "Standard_D16s_v4", + "Standard_D32s_v4", + "Standard_D48s_v4", + "Standard_D64s_v4", + "Standard_D2_v5", + "Standard_D4_v5", + "Standard_D8_v5", + "Standard_D16_v5", + "Standard_D32_v5", + "Standard_D2s_v5", + "Standard_D4s_v5", + "Standard_D8s_v5", + "Standard_D16s_v5", + "Standard_D2d_v5", + "Standard_D4d_v5", + "Standard_D8d_v5", + "Standard_D16d_v5", + "Standard_D32d_v5", + "Standard_D2ds_v5", + "Standard_D4ds_v5", + "Standard_D8ds_v5", + "Standard_D16ds_v5", + "Standard_D32ds_v5", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_D4s_v3", + "Standard_D8s_v3", + "Standard_D16s_v3", + "Standard_D32s_v3", + "Standard_D64s_v3", + "Standard_E4s_v3", + "Standard_E8s_v3", + "Standard_E16s_v3", + "Standard_E20s_v3", + "Standard_E32s_v3", + "Standard_E64s_v3", + "Standard_E64is_v3", + "Standard_F4s_v2", + "Standard_F8s_v2", + "Standard_F16s_v2", + "Standard_F32s_v2", + "Standard_F64s_v2", + "Standard_M8ms", + "Standard_M16ms", + "Standard_M32ms", + "Standard_M64ms", + "Standard_M64s", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_D4_v3", + "Standard_D8_v3", + "Standard_D16_v3", + "Standard_D32_v3", + "Standard_D64_v3", + "Standard_E4_v3", + "Standard_E8_v3", + "Standard_E16_v3", + "Standard_E20_v3", + "Standard_E32_v3", + "Standard_E64_v3", + "Standard_E64i_v3", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ] + }, + "osPlatform": "Linux", + "imageReference": { + "publisher": "checkpoint", + "offer": "check-point-cg-r82", + "sku": "sg-ngtx" + }, + "count": "[steps('autoprovision').vmCount]" + }, { "name": "adminShell", "type": "Microsoft.Common.DropDown", @@ -1718,7 +2061,7 @@ "availabilityZonesNum": "[coalesce(steps('autoprovision').availabilityZonesNum, int('0'))]", "customMetrics": "[steps('autoprovision').customMetrics]", "cloudGuardVersion": "[concat(steps('chkp').cloudGuardVersion, ' - ', coalesce(steps('chkp').R80Offer, 'Bring Your Own License'))]", - "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX)]", + "vmSize": "[coalesce(steps('chkp').R8110vmSizeUiBYOL, steps('chkp').R8110vmSizeUiNGTP, steps('chkp').R8110vmSizeUiNGTX, steps('chkp').R8120vmSizeUiBYOL, steps('chkp').R8120vmSizeUiNGTP, steps('chkp').R8120vmSizeUiNGTX, steps('chkp').R82vmSizeUiBYOL, steps('chkp').R82vmSizeUiNGTP, steps('chkp').R82vmSizeUiNGTX)]", "sicKey": "[steps('chkp').sicKeyUi]", "bootstrapScript": "[steps('chkp').bootstrapScript]", "allowDownloadFromUploadToCheckPoint": "[coalesce(steps('chkp').allowUploadDownload, 'true')]", diff --git a/azure/templates/marketplace-vmss/mainTemplate.json b/azure/templates/marketplace-vmss/mainTemplate.json index 077e926c..d0159464 100644 --- a/azure/templates/marketplace-vmss/mainTemplate.json +++ b/azure/templates/marketplace-vmss/mainTemplate.json @@ -24,7 +24,10 @@ "R81.10 - Pay As You Go (NGTX)", "R81.20 - Bring Your Own License", "R81.20 - Pay As You Go (NGTP)", - "R81.20 - Pay As You Go (NGTX)" + "R81.20 - Pay As You Go (NGTX)", + "R82 - Bring Your Own License", + "R82 - Pay As You Go (NGTP)", + "R82 - Pay As You Go (NGTX)" ], "defaultValue": "R81.20 - Bring Your Own License", "metadata": { @@ -510,7 +513,10 @@ "R81.10 - Pay As You Go (NGTX)": "NGTX", "R81.20 - Bring Your Own License": "BYOL", "R81.20 - Pay As You Go (NGTP)": "NGTP", - "R81.20 - Pay As You Go (NGTX)": "NGTX" + "R81.20 - Pay As You Go (NGTX)": "NGTX", + "R82 - Bring Your Own License": "BYOL", + "R82 - Pay As You Go (NGTP)": "NGTP", + "R82 - Pay As You Go (NGTX)": "NGTX" }, "offer": "[variables('offers')[parameters('cloudGuardVersion')]]", "osVersions": { @@ -519,7 +525,10 @@ "R81.10 - Pay As You Go (NGTX)": "R8110", "R81.20 - Bring Your Own License": "R8120", "R81.20 - Pay As You Go (NGTP)": "R8120", - "R81.20 - Pay As You Go (NGTX)": "R8120" + "R81.20 - Pay As You Go (NGTX)": "R8120", + "R82 - Bring Your Own License": "R82", + "R82 - Pay As You Go (NGTP)": "R82", + "R82 - Pay As You Go (NGTX)": "R82" }, "osVersion": "[variables('osVersions')[parameters('cloudGuardVersion')]]", "SerialConsoleGeographies": { diff --git a/azure/templates/vwan-managed-app/mainTemplate.json b/azure/templates/vwan-managed-app/mainTemplate.json index 1856f822..eb3efcdc 100644 --- a/azure/templates/vwan-managed-app/mainTemplate.json +++ b/azure/templates/vwan-managed-app/mainTemplate.json @@ -35,7 +35,8 @@ "defaultValue": "R8120", "allowedValues": [ "R8110", - "R8120" + "R8120", + "R82" ], "type": "String", "metadata": { @@ -200,7 +201,7 @@ "name": "vwan-app", "product": "cp-vwan-managed-app", "publisher": "checkpoint", - "version": "1.0.14" + "version": "1.0.15" }, "properties": { "managedResourceGroupId": "[variables('managedResourceGroupId')]", diff --git a/terraform/azure/high-availability-existing-vnet/README.md b/terraform/azure/high-availability-existing-vnet/README.md index 2aa7468d..50753f21 100755 --- a/terraform/azure/high-availability-existing-vnet/README.md +++ b/terraform/azure/high-availability-existing-vnet/README.md @@ -115,9 +115,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20"; | n/a | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r81.10";
"check-point-cg-r81.20";
"check-point-cg-r82"; | n/a | | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | | diff --git a/terraform/azure/high-availability-existing-vnet/variables.tf b/terraform/azure/high-availability-existing-vnet/variables.tf index 4aa5ca72..319c945b 100755 --- a/terraform/azure/high-availability-existing-vnet/variables.tf +++ b/terraform/azure/high-availability-existing-vnet/variables.tf @@ -117,7 +117,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -129,7 +130,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -138,6 +139,7 @@ locals { // locals for 'vm_os_offer' allowed values "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120" + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/high-availability-new-vnet/README.md b/terraform/azure/high-availability-new-vnet/README.md index 15bfa197..a2dcb08b 100755 --- a/terraform/azure/high-availability-new-vnet/README.md +++ b/terraform/azure/high-availability-new-vnet/README.md @@ -113,9 +113,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license;| n/a | | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a | + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82";| n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | | diff --git a/terraform/azure/high-availability-new-vnet/variables.tf b/terraform/azure/high-availability-new-vnet/variables.tf index 15e5ee4e..b40d7e9f 100755 --- a/terraform/azure/high-availability-new-vnet/variables.tf +++ b/terraform/azure/high-availability-new-vnet/variables.tf @@ -117,7 +117,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -129,7 +130,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -137,7 +138,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/management-existing-vnet/README.md b/terraform/azure/management-existing-vnet/README.md index 41c772e4..8159b782 100755 --- a/terraform/azure/management-existing-vnet/README.md +++ b/terraform/azure/management-existing-vnet/README.md @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/management-existing-vnet/variables.tf b/terraform/azure/management-existing-vnet/variables.tf index ec9272a4..94436ce3 100755 --- a/terraform/azure/management-existing-vnet/variables.tf +++ b/terraform/azure/management-existing-vnet/variables.tf @@ -91,7 +91,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -103,7 +104,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -112,6 +113,7 @@ locals { // locals for 'vm_os_offer' allowed values "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", + "check-point-cg-r82", ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/management-new-vnet/README.md b/terraform/azure/management-new-vnet/README.md index bd14ac2d..d19866e5 100755 --- a/terraform/azure/management-new-vnet/README.md +++ b/terraform/azure/management-new-vnet/README.md @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/management-new-vnet/variables.tf b/terraform/azure/management-new-vnet/variables.tf index 3ed686e1..7097c647 100755 --- a/terraform/azure/management-new-vnet/variables.tf +++ b/terraform/azure/management-new-vnet/variables.tf @@ -91,6 +91,7 @@ locals { // locals for 'vm_os_offer' allowed values "R81", "R8110", "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -102,7 +103,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -110,7 +111,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/mds-existing-vnet/README.md b/terraform/azure/mds-existing-vnet/README.md index 6980d7cc..5ab6f874 100755 --- a/terraform/azure/mds-existing-vnet/README.md +++ b/terraform/azure/mds-existing-vnet/README.md @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/mds-existing-vnet/variables.tf b/terraform/azure/mds-existing-vnet/variables.tf index 745c78c7..f870ad8d 100755 --- a/terraform/azure/mds-existing-vnet/variables.tf +++ b/terraform/azure/mds-existing-vnet/variables.tf @@ -111,7 +111,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -123,7 +124,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -131,7 +132,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/mds-new-vnet/README.md b/terraform/azure/mds-new-vnet/README.md index 8b3afc49..c1c7e9d3 100755 --- a/terraform/azure/mds-new-vnet/README.md +++ b/terraform/azure/mds-new-vnet/README.md @@ -108,9 +108,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "mgmt-byol" - BYOL license;
"mgmt-25" - PAYG; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";| n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/mds-new-vnet/variables.tf b/terraform/azure/mds-new-vnet/variables.tf index 45c2175a..57891273 100755 --- a/terraform/azure/mds-new-vnet/variables.tf +++ b/terraform/azure/mds-new-vnet/variables.tf @@ -110,7 +110,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -122,7 +123,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -130,7 +131,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/modules/common/variables.tf b/terraform/azure/modules/common/variables.tf index 33d85f45..99aa176a 100755 --- a/terraform/azure/modules/common/variables.tf +++ b/terraform/azure/modules/common/variables.tf @@ -138,7 +138,8 @@ locals { // locals for 'os_version' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.installation_type] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -216,7 +217,7 @@ variable "publisher" { //************** Storage image reference and plan variables ****************// variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -224,7 +225,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/nva-into-existing-hub/README.md b/terraform/azure/nva-into-existing-hub/README.md index a2765298..6dca42ef 100644 --- a/terraform/azure/nva-into-existing-hub/README.md +++ b/terraform/azure/nva-into-existing-hub/README.md @@ -85,7 +85,7 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https | | | | | | | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | "tf-vwan-nva-rg"| | | | | | | - | **os-version** | The GAIA os version | string | "R8110"
"R8120" | "R8120" | + | **os-version** | The GAIA os version | string | "R8110"
"R8120"
"R82" | "R8120" | | | | | | | | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | | | | | | | | | | | @@ -161,8 +161,9 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|-------------------| -| 20240613 | Cosmetic fixes & default values | -| 20240228 | Added public IP for ingress support | | | +| 20241028 |Added R82 version support | +| 20240613 | Cosmetic fixes & default values | +| 20240228 | Added public IP for ingress support | | | | 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | diff --git a/terraform/azure/nva-into-existing-hub/main.tf b/terraform/azure/nva-into-existing-hub/main.tf index 5987c76b..5580d250 100644 --- a/terraform/azure/nva-into-existing-hub/main.tf +++ b/terraform/azure/nva-into-existing-hub/main.tf @@ -40,7 +40,7 @@ data "http" "image-versions" { } locals { - image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(length(var.os-version) > 3 ? var.os-version : "${var.os-version}00"), 1, 4)]) routing_intent-internet-policy = { "name": "InternetTraffic", "destinations": [ @@ -105,7 +105,7 @@ resource "azurerm_managed_application" "nva" { name = "vwan-app" product = "cp-vwan-managed-app" publisher = "checkpoint" - version = "1.0.14" + version = "1.0.15" } parameter_values = jsonencode({ location = { diff --git a/terraform/azure/nva-into-existing-hub/variables.tf b/terraform/azure/nva-into-existing-hub/variables.tf index d00283d4..2d6c8e48 100644 --- a/terraform/azure/nva-into-existing-hub/variables.tf +++ b/terraform/azure/nva-into-existing-hub/variables.tf @@ -65,8 +65,8 @@ variable "os-version" { type = string default = "R8120" validation { - condition = contains(["R8110", "R8120"], var.os-version) - error_message = "Allowed values for os-version are 'R8110', 'R8120'" + condition = contains(["R8110", "R8120", "R82"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120', 'R82'" } } diff --git a/terraform/azure/nva-into-new-vwan/README.md b/terraform/azure/nva-into-new-vwan/README.md index 17fa1ffe..b5d82afc 100644 --- a/terraform/azure/nva-into-new-vwan/README.md +++ b/terraform/azure/nva-into-new-vwan/README.md @@ -90,7 +90,7 @@ please see the [CloudGuard Network for Azure Virtual WAN Deployment Guide](https | || | | | | **nva-rg-name** | The name of the resource group that will contain the NVA | string | Resource group names only allow alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period | tf-vwan-nva-rg | | || | | | - | **os-version** | The GAIA os version| string | "R8110"
"R8120" | "R8120" | + | **os-version** | The GAIA os version| string | "R8110"
"R8120"
"R82" | "R8120" | | || | | | | **license-type** | The Check Point licence type | string | "Security Enforcement (NGTP)"
"Full Package (NGTX + S1C)"
"Full Package Premium (NGTX + S1C++)" | "Security Enforcement (NGTP)" | | || | | | @@ -171,6 +171,7 @@ In order to check the template version refer to the [sk116585](https://supportce | Template Version | Description | |------------------|-----------------------------------------------------------------------------------------------| +| 20241028 |Added R82 version support | | 20240613 | Cosmetic fixes & default values | | 20240228 | Added public IP for ingress support | | | | 20231226 | First release of Check Point CloudGuard Network Security Virtual WAN Terraform deployment for Azure | | | diff --git a/terraform/azure/nva-into-new-vwan/main.tf b/terraform/azure/nva-into-new-vwan/main.tf index 43a409c3..627b0728 100644 --- a/terraform/azure/nva-into-new-vwan/main.tf +++ b/terraform/azure/nva-into-new-vwan/main.tf @@ -49,7 +49,7 @@ data "http" "image-versions" { } locals { - image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(var.os-version), 1, 4)]) + image_versions = tolist([for version in jsondecode(data.http.image-versions.response_body).properties.availableVersions : version if substr(version, 0, 4) == substr(lower(length(var.os-version) > 3 ? var.os-version : "${var.os-version}00"), 1, 4)]) routing_intent-internet-policy = { "name": "InternetTraffic", "destinations": [ @@ -115,7 +115,7 @@ resource "azurerm_managed_application" "nva" { name = "vwan-app" product = "cp-vwan-managed-app" publisher = "checkpoint" - version = "1.0.14" + version = "1.0.15" } parameter_values = jsonencode({ location = { diff --git a/terraform/azure/nva-into-new-vwan/variables.tf b/terraform/azure/nva-into-new-vwan/variables.tf index 927592c9..b5ec36b9 100644 --- a/terraform/azure/nva-into-new-vwan/variables.tf +++ b/terraform/azure/nva-into-new-vwan/variables.tf @@ -76,8 +76,8 @@ variable "os-version" { type = string default = "R8120" validation { - condition = contains(["R8110", "R8120"], var.os-version) - error_message = "Allowed values for os-version are 'R8110', 'R8120'" + condition = contains(["R8110", "R8120", "R82"], var.os-version) + error_message = "Allowed values for os-version are 'R8110', 'R8120', 'R82'" } } diff --git a/terraform/azure/single-gateway-existing-vnet/README.md b/terraform/azure/single-gateway-existing-vnet/README.md index b49b1886..47eb8a5c 100755 --- a/terraform/azure/single-gateway-existing-vnet/README.md +++ b/terraform/azure/single-gateway-existing-vnet/README.md @@ -112,9 +112,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/single-gateway-existing-vnet/variables.tf b/terraform/azure/single-gateway-existing-vnet/variables.tf index f6f2da36..debd9b9d 100755 --- a/terraform/azure/single-gateway-existing-vnet/variables.tf +++ b/terraform/azure/single-gateway-existing-vnet/variables.tf @@ -104,7 +104,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -116,7 +117,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -124,7 +125,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/single-gateway-new-vnet/README.md b/terraform/azure/single-gateway-new-vnet/README.md index b9227c85..bfe2cfcc 100755 --- a/terraform/azure/single-gateway-new-vnet/README.md +++ b/terraform/azure/single-gateway-new-vnet/README.md @@ -112,9 +112,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a | + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | "" | | | | | | diff --git a/terraform/azure/single-gateway-new-vnet/variables.tf b/terraform/azure/single-gateway-new-vnet/variables.tf index 7b247e96..5a75c23d 100755 --- a/terraform/azure/single-gateway-new-vnet/variables.tf +++ b/terraform/azure/single-gateway-new-vnet/variables.tf @@ -103,7 +103,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -115,7 +116,7 @@ variable "vm_os_sku" { } variable "vm_os_offer" { - description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the image offer to be deployed.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -123,7 +124,8 @@ locals { // locals for 'vm_os_offer' allowed values vm_os_offer_allowed_values = [ "check-point-cg-r81", "check-point-cg-r8110", - "check-point-cg-r8120" + "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/vmss-existing-vnet/README.md b/terraform/azure/vmss-existing-vnet/README.md index 73b83eb3..f19aa45a 100755 --- a/terraform/azure/vmss-existing-vnet/README.md +++ b/terraform/azure/vmss-existing-vnet/README.md @@ -109,9 +109,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | diff --git a/terraform/azure/vmss-existing-vnet/variables.tf b/terraform/azure/vmss-existing-vnet/variables.tf index 1ad5bb46..b95ee2e4 100755 --- a/terraform/azure/vmss-existing-vnet/variables.tf +++ b/terraform/azure/vmss-existing-vnet/variables.tf @@ -116,7 +116,8 @@ locals { // locals for 'vm_os_offer' allowed values os_version_allowed_values = [ "R81", "R8110", - "R8120" + "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -332,7 +333,7 @@ locals { // locals for 'frontend_load_distribution' allowed values //********************** Scale Set variables *******************// variable "vm_os_offer" { - description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -341,6 +342,7 @@ locals { // locals for 'vm_os_offer' allowed values "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer) diff --git a/terraform/azure/vmss-new-vnet/README.md b/terraform/azure/vmss-new-vnet/README.md index 71857101..b9feac93 100755 --- a/terraform/azure/vmss-new-vnet/README.md +++ b/terraform/azure/vmss-new-vnet/README.md @@ -111,9 +111,9 @@ This solution uses the following modules: | | | | | | | **vm_os_sku** | A sku of the image to be deployed | string | "sg-byol" - BYOL license;
"sg-ngtp" - NGTP PAYG license;
"sg-ngtx" - NGTX PAYG license; | n/a | | | | | | - | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120"; | n/a + | **vm_os_offer** | The name of the image offer to be deployed | string | "check-point-cg-r81";
"check-point-cg-r8110";
"check-point-cg-r8120";
"check-point-cg-r82"; | n/a | | | | | | - | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120"; | n/a + | **os_version** | GAIA OS version | string | "R81";
"R8110";
"R8120";
"R82"; | n/a | | | | | | | **bootstrap_script** | An optional script to run on the initial boot | string | Bootstrap script example:
"touch /home/admin/bootstrap.txt; echo 'hello_world' > /home/admin/bootstrap.txt"
The script will create bootstrap.txt file in the /home/admin/ and add 'hello word' string into it | n/a | | | | | | diff --git a/terraform/azure/vmss-new-vnet/variables.tf b/terraform/azure/vmss-new-vnet/variables.tf index afc907c5..f59e7007 100755 --- a/terraform/azure/vmss-new-vnet/variables.tf +++ b/terraform/azure/vmss-new-vnet/variables.tf @@ -117,6 +117,7 @@ locals { // locals for 'vm_os_offer' allowed values "R81", "R8110", "R8120", + "R82" ] // will fail if [var.os_version] is invalid: validate_os_version_value = index(local.os_version_allowed_values, var.os_version) @@ -326,7 +327,7 @@ locals { // locals for 'frontend_load_distribution' allowed values //********************** Scale Set variables *******************// variable "vm_os_offer" { - description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120" + description = "The name of the offer of the image that you want to deploy.Choose from: check-point-cg-r81, check-point-cg-r8110, check-point-cg-r8120, check-point-cg-r82" type = string } @@ -335,6 +336,7 @@ locals { // locals for 'vm_os_offer' allowed values "check-point-cg-r81", "check-point-cg-r8110", "check-point-cg-r8120", + "check-point-cg-r82" ] // will fail if [var.vm_os_offer] is invalid: validate_os_offer_value = index(local.vm_os_offer_allowed_values, var.vm_os_offer)