Skip to content

Commit 65ec260

Browse files
serve via https
1 parent e6f354b commit 65ec260

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

cicd/3-app/aiproxy/template.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Resources:
6666
- !ImportValue VPC-PublicSubnetD
6767
- !ImportValue VPC-PublicSubnetE
6868

69-
Listener:
69+
HttpListener:
7070
Type: AWS::ElasticLoadBalancingV2::Listener
7171
Properties:
7272
DefaultActions:
@@ -76,6 +76,27 @@ Resources:
7676
Port: 80
7777
Protocol: HTTP
7878

79+
HttpsListener:
80+
Type: AWS::ElasticLoadBalancingV2::Listener
81+
Properties:
82+
DefaultActions:
83+
- Type: forward
84+
TargetGroupArn: !Ref TargetGroup
85+
LoadBalancerArn: !Ref LoadBalancer
86+
Port: 443
87+
Protocol: HTTPS
88+
Certificates:
89+
- CertificateArn: !Ref HttpsCertificate
90+
91+
HttpsCertificate:
92+
Type: AWS::CertificateManager::Certificate
93+
Properties:
94+
DomainName: !Sub "${SubdomainName}.${BaseDomainName}"
95+
DomainValidationOptions:
96+
- DomainName: !Sub "${SubdomainName}.${BaseDomainName}"
97+
HostedZoneId: !Ref HostedZone
98+
ValidationMethod: DNS
99+
79100
TargetGroup:
80101
Type: AWS::ElasticLoadBalancingV2::TargetGroup
81102
Properties:

0 commit comments

Comments
 (0)