Skip to content

Commit f5e44f5

Browse files
author
rakeshclouddevops
committed
updated sg
1 parent ade0dfa commit f5e44f5

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

example/complete/example.tf

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ module "security_group" {
4343
description = "Allow PostgreSQL traffic."
4444
}
4545
]
46+
new_sg_egress_rules_with_cidr_blocks = [
47+
{
48+
rule_count = 1
49+
from_port = 443
50+
protocol = "tcp"
51+
to_port = 443
52+
cidr_blocks = ["0.0.0.0/0"] # Allow only HTTPS outbound traffic
53+
description = "Allow outbound HTTPS traffic."
54+
}
55+
]
56+
4657

4758
## EGRESS Rules
4859
# new_sg_egress_rules_with_cidr_blocks = [
@@ -55,24 +66,6 @@ module "security_group" {
5566
# description = "Allow all outbound traffic."
5667
# }
5768
# ]
58-
new_sg_egress_rules_with_cidr_blocks = [
59-
{
60-
rule_count = 1
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."
74-
}
75-
]
7669

7770
}
7871

0 commit comments

Comments
 (0)