Skip to content

Commit 491fca3

Browse files
fix(VSECPC-11987): Minor fixes and cleanup (#22)
Co-authored-by: guybarak <guybarak@checkpoint.com>
1 parent 44f56c1 commit 491fca3

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

modules/autoscale/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ resource "aws_security_group" "elb_security_group" {
210210
description = "ELB security group"
211211
vpc_id = var.vpc_id
212212
egress {
213-
from_port = 0
214-
to_port = 0
213+
from_port = 0
214+
to_port = 0
215215
protocol = "-1"
216216
cidr_blocks = ["0.0.0.0/0"]
217217
}

modules/autoscale_gwlb/main.tf

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,27 @@ resource "aws_security_group" "permissive_sg" {
1616
resource "aws_vpc_security_group_ingress_rule" "ingress_rule_ipv4" {
1717
security_group_id = aws_security_group.permissive_sg.id
1818
cidr_ipv4 = "0.0.0.0/0"
19-
from_port = 0
2019
ip_protocol = "-1"
21-
to_port = 0
2220
}
2321

2422
resource "aws_vpc_security_group_egress_rule" "egress_rule_ipv4" {
2523
security_group_id = aws_security_group.permissive_sg.id
2624
cidr_ipv4 = "0.0.0.0/0"
27-
from_port = 0
2825
ip_protocol = "-1"
29-
to_port = 0
3026
}
3127

3228
resource "aws_vpc_security_group_ingress_rule" "ingress_rule_ipv6" {
3329
count = var.enable_ipv6 ? 1 : 0
3430
security_group_id = aws_security_group.permissive_sg.id
3531
cidr_ipv6 = "::/0"
36-
from_port = 0
3732
ip_protocol = "-1"
38-
to_port = 0
3933
}
4034

4135
resource "aws_vpc_security_group_egress_rule" "egress_rule_ipv6" {
4236
count = var.enable_ipv6 ? 1 : 0
4337
security_group_id = aws_security_group.permissive_sg.id
4438
cidr_ipv6 = "::/0"
45-
from_port = 0
4639
ip_protocol = "-1"
47-
to_port = 0
4840
}
4941

5042
resource "aws_launch_template" "asg_launch_template" {
@@ -60,8 +52,11 @@ resource "aws_launch_template" "asg_launch_template" {
6052
http_tokens = var.metadata_imdsv2_required ? "required" : "optional"
6153
}
6254

63-
iam_instance_profile {
64-
name = ( var.enable_cloudwatch ? aws_iam_instance_profile.instance_profile[0].name : "")
55+
dynamic "iam_instance_profile" {
56+
for_each = var.enable_cloudwatch ? [1] : []
57+
content {
58+
name = aws_iam_instance_profile.instance_profile[0].name
59+
}
6560
}
6661

6762
monitoring {

modules/custom_autoscale/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ resource "aws_security_group" "servers_security_group" {
55
vpc_id = var.vpc_id
66

77
ingress {
8-
from_port = 0
9-
to_port = 0
8+
from_port = 0
9+
to_port = 0
1010
protocol = "-1"
1111
cidr_blocks = ["0.0.0.0/0"]
1212
}

modules/tgw_gwlb_master/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ provider "aws" {}
3131
3232
module "example_module" {
3333
34-
source = "CheckPointSW/cloudguard-network-security/aws//modules/tgw_gwlb"
34+
source = "CheckPointSW/cloudguard-network-security/aws//modules/tgw_gwlb_master"
3535
version = "1.0.4"
3636
3737
// --- VPC Network Configuration --

0 commit comments

Comments
 (0)