Skip to content

Commit

Permalink
fixing security rule, previously couldn't fetch image
Browse files Browse the repository at this point in the history
  • Loading branch information
jpl-btlunsfo committed Oct 12, 2024
1 parent a5c6d03 commit 52ed304
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions terraform-unity/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ resource "aws_vpc_security_group_ingress_rule" "ecs_alb_ingress_sg_rule" {
referenced_security_group_id = aws_security_group.ecs_alb_sg.id
}

# Add a new egress rule to the ECS's security group, allowing ECS to fetch the container image
resource "aws_vpc_security_group_egress_rule" "ecs_alb_egress_sg_rule" {
security_group_id = aws_security_group.ecs_sg.id
to_port = 443
from_port = 443
ip_protocol = "tcp"
cidr_ipv4 = "0.0.0.0/0"
}

# Add a new ingress rule to the ECS ALB's security group, opening it up to other connections
#tfsec:ignore:AVD-AWS-0107
resource "aws_vpc_security_group_ingress_rule" "alb_all_ingress_sg_rule" {
Expand Down

0 comments on commit 52ed304

Please sign in to comment.