Skip to content

Commit

Permalink
updated Python Fargate Service load balance example for security grou…
Browse files Browse the repository at this point in the history
…ps (#192)
  • Loading branch information
dchristian3188 authored and mergify[bot] committed Dec 13, 2019
1 parent e2cc15c commit 55fe2e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/ecs/fargate-load-balanced-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
}
)

fargate_service.service.connections.security_groups[0].add_ingress_rule(
peer = ec2.Peer.ipv4(vpc.vpc_cidr_block),
connection = ec2.Port.tcp(80),
description="Allow http inbound from VPC"
)

core.CfnOutput(
self, "LoadBalancerDNS",
value=fargate_service.load_balancer.load_balancer_dns_name
Expand Down

0 comments on commit 55fe2e9

Please sign in to comment.