Skip to content

Commit

Permalink
chore: optimize (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
  • Loading branch information
ran-isenberg and Ran Isenberg authored Aug 1, 2024
1 parent 63a2b5b commit 31b04d7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cdk/service/chat_bot_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ def __init__(self, scope: Construct, identifier: str, waf_acl: wafv2.CfnWebACL,
enforce_ssl=True,
)

# Security group for the Fargate service
security_group = ec2.SecurityGroup(self, 'ChatSecurityGroup', vpc=vpc)

# Allow inbound traffic on 443 (HTTPS) from any IP
security_group.add_ingress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443), 'Allow HTTPS traffic from the internet')
security_group.add_ingress_rule(ec2.Peer.any_ipv6(), ec2.Port.tcp(443), 'Allow HTTPS traffic from the internet (IPv6)')

# Create a Fargate service and make it publicly accessible
fargate_service = ecs_patterns.ApplicationLoadBalancedFargateService(
self,
Expand All @@ -148,7 +141,6 @@ def __init__(self, scope: Construct, identifier: str, waf_acl: wafv2.CfnWebACL,
domain_name=self.network_assets.full_domain,
domain_zone=route53.HostedZone.from_lookup(self, 'BaseZone', domain_name=self.network_assets.domain_name),
desired_count=1,
security_groups=[security_group],
load_balancer_name='chatbot-application-lb',
redirect_http=True,
circuit_breaker=ecs.DeploymentCircuitBreaker(enable=True, rollback=True),
Expand Down

0 comments on commit 31b04d7

Please sign in to comment.