11---
22AWSTemplateFormatVersion : 2010-09-09
33Description : |
4- Create an Auto Scaling group of Check Point gateways into an existing VPC (20260302 )
4+ Create an Auto Scaling group of Check Point gateways into an existing VPC (20260310 )
55 See CloudGuard Network for AWS Auto Scale Group deployment guide for detailed deployment and configuration steps
66Metadata :
77 AWS::CloudFormation::Interface :
@@ -22,6 +22,7 @@ Metadata:
2222 default : Advanced Settings
2323 Parameters :
2424 - GatewayName
25+ - IPMode
2526 - VolumeSize
2627 - VolumeType
2728 - EnableVolumeEncryption
@@ -41,9 +42,6 @@ Metadata:
4142 - ControlGatewayOverPrivateOrPublicAddress
4243 - ManagementServer
4344 - ConfigurationTemplate
44- - ELBType
45- - ELBPort
46- - ELBClients
4745 ParameterLabels :
4846 VPC :
4947 default : VPC
@@ -55,6 +53,8 @@ Metadata:
5553 default : Gateways Instance type
5654 KeyName :
5755 default : Key name
56+ IPMode :
57+ default : IP Configuration Mode
5858 VolumeSize :
5959 default : Root volume size (GB)
6060 VolumeType :
@@ -95,12 +95,6 @@ Metadata:
9595 default : Management Server Settings - Server
9696 ConfigurationTemplate :
9797 default : Management Server Settings - Configuration template
98- ELBType :
99- default : Proxy Settings - Proxy type
100- ELBPort :
101- default : Proxy Settings - Proxy port
102- ELBClients :
103- default : Proxy Settings - Allowed proxy clients
10498 AutoScaleGroupName :
10599 default : Auto Scale Group name
106100Parameters :
@@ -346,6 +340,14 @@ Parameters:
346340 Type : AWS::EC2::KeyPair::KeyName
347341 MinLength : 1
348342 ConstraintDescription : Must be the name of an existing EC2 KeyPair.
343+ IPMode :
344+ Description : Specifies the IP mode for the Autoscale Group and AWS resources.
345+ Type : String
346+ AllowedValues :
347+ - IPv4
348+ # - IPv6
349+ - DualStack
350+ Default : IPv4
349351 VolumeSize :
350352 Type : Number
351353 Default : 200
@@ -483,33 +485,19 @@ Parameters:
483485 Default : ASG-configuration
484486 MinLength : 1
485487 MaxLength : 30
486- ELBType :
487- Type : String
488- Default : none
489- AllowedValues :
490- - none
491- - internal
492- - internet-facing
493- ELBPort :
494- Type : Number
495- Default : 8080
496- ELBClients :
497- Type : String
498- Default : 0.0.0.0/0
499- AllowedPattern : ' ^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})$'
500488 AutoScaleGroupName :
501489 Description : The Name of the Auto Scaling Group. (optional)
502490 Type : String
503491 Default : " "
504492 MaxLength : 100
505-
506493Conditions :
507494 ProvidedAdminEmail : !Not [!Equals [!Ref AdminEmail, '']]
508495 ProvidedTargetGroups : !Not [!Equals [!Ref GatewaysTargetGroups, '']]
509496 EnableCloudWatch : !Equals [!Ref CloudWatch, true]
510- CreateELB : !Not [!Equals [!Ref ELBType, none]]
511497 EnableMetaDataToken : !Equals [!Ref MetaDataToken, true]
512498 GenerateAutoScalingName : !Equals [!Ref AutoScaleGroupName, ""]
499+ IsIPv6Enabled : !Not [!Equals [!Ref IPMode, "IPv4"]]
500+ IsIPv4Enabled : !Not [!Equals [!Ref IPMode, "IPv6"]]
513501Resources :
514502 ChkpGatewayRole :
515503 Type : AWS::IAM::Role
@@ -553,33 +541,6 @@ Resources:
553541 Subscription :
554542 - Endpoint : !Ref AdminEmail
555543 Protocol : email
556- ElasticLoadBalancer :
557- Type : AWS::ElasticLoadBalancing::LoadBalancer
558- Condition : CreateELB
559- Properties :
560- CrossZone : true
561- Listeners :
562- - LoadBalancerPort : !Ref ELBPort
563- InstancePort : !Ref ELBPort
564- Protocol : TCP
565- HealthCheck :
566- Target : !Join [':', [TCP, !Ref ELBPort]]
567- HealthyThreshold : 3
568- UnhealthyThreshold : 5
569- Interval : 30
570- Timeout : 5
571- Scheme : !Ref ELBType
572- Subnets : !Ref GatewaysSubnets
573- Policies :
574- - PolicyName : EnableProxyProtocol
575- PolicyType : ProxyProtocolPolicyType
576- Attributes :
577- - Name : ProxyProtocol
578- Value : true
579- InstancePorts :
580- - !Ref ELBPort
581- SecurityGroups :
582- - !Ref ELBSecurityGroup
583544 PermissiveSecurityGroup :
584545 Type : AWS::EC2::SecurityGroup
585546 Properties :
@@ -589,8 +550,16 @@ Resources:
589550 GroupDescription : Permissive security group.
590551 VpcId : !Ref VPC
591552 SecurityGroupIngress :
592- - IpProtocol : -1
593- CidrIp : 0.0.0.0/0
553+ - !If
554+ - IsIPv4Enabled
555+ - IpProtocol : -1
556+ CidrIp : 0.0.0.0/0
557+ - !Ref " AWS::NoValue"
558+ - !If
559+ - IsIPv6Enabled
560+ - IpProtocol : -1
561+ CidrIpv6 : ::/0
562+ - !Ref " AWS::NoValue"
594563 GatewayGroup :
595564 Type : AWS::AutoScaling::AutoScalingGroup
596565 Properties :
@@ -601,7 +570,6 @@ Resources:
601570 AutoScalingGroupName : !If [GenerateAutoScalingName, !Join ["-", [!Ref 'AWS::StackName', GatewayGroup]], !Ref AutoScaleGroupName]
602571 MinSize : !Ref GatewaysMinSize
603572 MaxSize : !Ref GatewaysMaxSize
604- LoadBalancerNames : !If [CreateELB, [!Ref ElasticLoadBalancer], !Ref 'AWS::NoValue']
605573 TargetGroupARNs : !If [ProvidedTargetGroups, !Split [',', !Ref GatewaysTargetGroups], !Ref 'AWS::NoValue']
606574 HealthCheckGracePeriod : 3600
607575 HealthCheckType : ELB
@@ -631,7 +599,8 @@ Resources:
631599 LaunchTemplateData :
632600 NetworkInterfaces :
633601 - DeviceIndex : 0
634- AssociatePublicIpAddress : true
602+ AssociatePublicIpAddress : !If [IsIPv4Enabled, true, false]
603+ Ipv6AddressCount : !If [IsIPv6Enabled, 1, !Ref "AWS::NoValue"]
635604 Groups :
636605 - !Ref PermissiveSecurityGroup
637606 Monitoring :
@@ -668,7 +637,7 @@ Resources:
668637 - !Join ['', [' maintenance_pwd_hash="$(echo ', 'Fn::Base64': !Ref GatewayMaintenancePasswordHash, ')"']]
669638 - !Join ['', [' bootstrap="$(echo ', 'Fn::Base64': !Ref GatewayBootstrapScript, ')"']]
670639 - !Sub [' version=${Version}', {Version: !Select [0, !Split ['-', !Ref GatewayVersion]]}]
671- - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20260302 \" templateName=\"${template_name}\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"'
640+ - ' python3 /etc/cloud_config.py enableCloudWatch=\"${cw}\" sicKey=\"${sic}\" installationType=\"autoscale\" osVersion=\"${version}\" allowUploadDownload=\"${allow_info}\" templateVersion=\"20260310 \" templateName=\"${template_name}\" shell=\"${admin_shell}\" enableInstanceConnect=\"${eic}\" passwordHash=\"${pwd_hash}\" MaintenanceModePassword=\"${maintenance_pwd_hash}\" bootstrapScript64=\"${bootstrap}\"'
672641 VersionDescription : Initial template version
673642 GatewayScaleUpPolicy :
674643 Type : AWS::AutoScaling::ScalingPolicy
@@ -716,23 +685,7 @@ Resources:
716685 - Name : AutoScalingGroupName
717686 Value : !Ref GatewayGroup
718687 ComparisonOperator : LessThanThreshold
719- ELBSecurityGroup :
720- Type : AWS::EC2::SecurityGroup
721- Condition : CreateELB
722- Properties :
723- GroupDescription : ELB security group.
724- VpcId : !Ref VPC
725- SecurityGroupIngress :
726- - IpProtocol : tcp
727- CidrIp : !Ref ELBClients
728- FromPort : !Ref ELBPort
729- ToPort : !Ref ELBPort
730688Outputs :
731- URL :
732- Description : The URL of the Proxy.
733- Condition : CreateELB
734- Value : !Join ['', ['http://', !GetAtt ElasticLoadBalancer.DNSName]]
735689 SecurityGroup :
736690 Description : The Security Group of the Auto Scaling group.
737691 Value : !GetAtt PermissiveSecurityGroup.GroupId
738-
0 commit comments