Skip to content

Commit dff32c2

Browse files
author
rakeshclouddevops
committed
updated sg
1 parent cd2d60a commit dff32c2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

example/complete/example.tf

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,34 @@ module "security_group" {
4343
description = "Allow PostgreSQL traffic."
4444
}
4545
]
46-
4746
new_sg_egress_rules_with_cidr_blocks = [
4847
{
4948
rule_count = 1
50-
from_port = 443
51-
protocol = "tcp"
52-
to_port = 443
53-
cidr_blocks = ["0.0.0.0/0"] # Allow only HTTPS outbound traffic
54-
description = "Allow outbound HTTPS traffic."
49+
from_port = 0
50+
protocol = "-1"
51+
to_port = 0
52+
cidr_blocks = [module.vpc.vpc_cidr_block] # Allow all outbound traffic within the VPC
53+
description = "Allow all outbound traffic within the VPC."
5554
}
5655
]
5756

57+
58+
59+
## EGRESS Rules
60+
# new_sg_egress_rules_with_cidr_blocks = [
61+
# {
62+
# rule_count = 1
63+
# from_port = 0
64+
# protocol = "-1"
65+
# to_port = 0
66+
# cidr_blocks = ["0.0.0.0/0"]
67+
# description = "Allow all outbound traffic."
68+
# }
69+
# ]
70+
5871
}
5972

73+
6074
# Define Subnet module
6175
module "public_subnet" {
6276
source = "clouddrove/subnet/aws"

0 commit comments

Comments
 (0)