Skip to content

Commit b9a7065

Browse files
author
rohit-ng
committed
fix: restrict ingress for security groups
1 parent 9e1672b commit b9a7065

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ module "postgres_security_group" {
1010
{
1111
from_port = 0
1212
to_port = 5432
13-
protocol = "-1"
14-
cidr_blocks = "0.0.0.0/0"
13+
protocol = "tcp"
14+
cidr_blocks = data.aws_vpc.vpc.cidr_block
1515
},
1616
]
1717
egress_with_cidr_blocks = [{
@@ -71,7 +71,7 @@ module "ecs_node_security_group" {
7171
from_port = 0
7272
to_port = 0
7373
protocol = "-1"
74-
cidr_blocks = "0.0.0.0/0"
74+
cidr_blocks = data.aws_vpc.vpc.cidr_block
7575
}]
7676
egress_with_cidr_blocks = [{
7777
from_port = 0
@@ -141,7 +141,7 @@ module "ecs_task_security_group" {
141141
from_port = 0
142142
to_port = 0
143143
protocol = "-1"
144-
cidr_blocks = "0.0.0.0/0"
144+
cidr_blocks = data.aws_vpc.vpc.cidr_block
145145
},
146146
]
147147
egress_with_cidr_blocks = [{

0 commit comments

Comments
 (0)