Skip to content

Commit ade0dfa

Browse files
author
rakeshclouddevops
committed
updated sg
1 parent 1451c98 commit ade0dfa

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

example/complete/example.tf

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,35 @@ module "security_group" {
4545
]
4646

4747
## EGRESS Rules
48+
# new_sg_egress_rules_with_cidr_blocks = [
49+
# {
50+
# rule_count = 1
51+
# from_port = 0
52+
# protocol = "-1"
53+
# to_port = 0
54+
# cidr_blocks = ["0.0.0.0/0"]
55+
# description = "Allow all outbound traffic."
56+
# }
57+
# ]
4858
new_sg_egress_rules_with_cidr_blocks = [
4959
{
5060
rule_count = 1
51-
from_port = 0
52-
protocol = "-1"
53-
to_port = 0
54-
cidr_blocks = ["0.0.0.0/0"]
55-
description = "Allow all outbound traffic."
61+
from_port = 80
62+
protocol = "tcp"
63+
to_port = 80
64+
cidr_blocks = ["0.0.0.0/0"] # Allow only HTTP outbound
65+
description = "Allow outbound HTTP traffic."
66+
},
67+
{
68+
rule_count = 1
69+
from_port = 443
70+
protocol = "tcp"
71+
to_port = 443
72+
cidr_blocks = ["0.0.0.0/0"] # Allow only HTTPS outbound
73+
description = "Allow outbound HTTPS traffic."
5674
}
5775
]
76+
5877
}
5978

6079

0 commit comments

Comments
 (0)