Skip to content

Commit 4c9ae6b

Browse files
simplify template
1 parent 1900ec6 commit 4c9ae6b

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

cicd/3-app/aiproxy/template.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ Parameters:
1919
# IsDevCondition: !Equals [!Ref BaseDomainName, "dev-code.org"]
2020

2121
Resources:
22-
Domain:
23-
Type: AWS::Route53::RecordSet
24-
Properties:
25-
HostedZoneName: !Sub "${BaseDomainName}."
26-
Name: !Sub "${SubdomainName}.${BaseDomainName}"
27-
Type: A
28-
AliasTarget:
29-
DNSName: !GetAtt LoadBalancer.DNSName # Reference the DNS name of the load balancer
30-
HostedZoneId: Z2FDTNDATAQYW2 # The hosted zone ID for Elastic Load Balancer in us-east-1
22+
# Domain:
23+
# Type: AWS::Route53::RecordSet
24+
# Properties:
25+
# HostedZoneName: !Sub "${BaseDomainName}."
26+
# Name: !Sub "${SubdomainName}.${BaseDomainName}"
27+
# Type: A
28+
# AliasTarget:
29+
# DNSName: !GetAtt LoadBalancer.DNSName # Reference the DNS name of the load balancer
3130

3231
LoadBalancer:
3332
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
@@ -48,11 +47,20 @@ Resources:
4847
Properties:
4948
DefaultActions:
5049
- Type: forward
51-
TargetGroupArn: !Ref ECSTargetGroup # Now within a forward configuration
50+
TargetGroupArn: !Ref ECSTargetGroup
5251
LoadBalancerArn: !Ref LoadBalancer
5352
Port: 80
5453
Protocol: HTTP
5554

55+
ECSTargetGroup:
56+
Type: AWS::ElasticLoadBalancingV2::TargetGroup
57+
Properties:
58+
Port: 5000
59+
Protocol: HTTP
60+
TargetType: ip
61+
# TODO: This copies geocoder, but we should probably have a separate VPC for this service.
62+
VpcId: !ImportValue VPC
63+
5664
ECSCluster:
5765
Type: "AWS::ECS::Cluster"
5866

@@ -85,15 +93,6 @@ Resources:
8593
# TODO: This copies geocoder, but we should probably have a separate VPC for this service.
8694
VpcId: !ImportValue VPC
8795

88-
ECSTargetGroup:
89-
Type: AWS::ElasticLoadBalancingV2::TargetGroup
90-
Properties:
91-
Port: 5000
92-
Protocol: HTTP
93-
TargetType: ip
94-
# TODO: This copies geocoder, but we should probably have a separate VPC for this service.
95-
VpcId: !ImportValue VPC
96-
9796
ECSTaskDefinition:
9897
Type: "AWS::ECS::TaskDefinition"
9998
Properties:

0 commit comments

Comments
 (0)