Skip to content

Commit

Permalink
feat: add egress rules
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloKakazu committed Sep 29, 2024
1 parent b53cde0 commit d2502ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ resource "aws_route_table" "private_route_table" {

route {
cidr_block = "0.0.0.0/0"
nat_gateway_id = aws_nat_gateway.nat.id
gateway_id = aws_nat_gateway.nat.id
}

tags = {
Expand Down Expand Up @@ -167,6 +167,13 @@ resource "aws_security_group" "default_security_group" {
cidr_blocks = ["0.0.0.0/0"]
}

egress {
from_port = 0
to_port = 0
protocol = "-1" # -1 means all protocols
cidr_blocks = ["0.0.0.0/0"] # Allow all outbound traffic
}

tags = {
Name = "default_security_group"
}
Expand Down

0 comments on commit d2502ea

Please sign in to comment.