Skip to content

Commit

Permalink
Take out redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
alnoki committed Sep 2, 2024
1 parent 173ab4d commit be17a2b
Showing 1 changed file with 4 additions and 39 deletions.
43 changes: 4 additions & 39 deletions src/cloud-formation/indexer.cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
---
Conditions:
MaybeDeployAlb: !And
- !Condition 'MaybeDeployRestApi'
- !Condition 'MaybeDeployVpc'
- !Equals
- !Ref 'MaybeDeployAlb'
Expand Down Expand Up @@ -323,26 +322,12 @@ Resources:
Certificates:
- CertificateArn: !Ref 'AlbCertificate'
DefaultActions:
- TargetGroupArn: !Ref 'RestApiTargetGroup'
- TargetGroupArn: !Ref 'BrokerAlbTargetGroup'
Type: 'forward'
LoadBalancerArn: !Ref 'Alb'
Port: 443
Protocol: 'HTTPS'
Type: 'AWS::ElasticLoadBalancingV2::Listener'
# Application load balancer listener rule for WebSocket traffic.
AlbListenerWebsocketRule:
Condition: 'MaybeDeployAlb'
Properties:
Actions:
- TargetGroupArn: !Ref 'BrokerAlbTargetGroup'
Type: 'forward'
Conditions:
- Field: 'path-pattern'
Values:
- '/ws'
ListenerArn: !Ref 'AlbListener'
Priority: 1
Type: 'AWS::ElasticLoadBalancingV2::ListenerRule'
# Security group for the application load balancer.
AlbSecurityGroup:
Condition: 'MaybeDeployAlb'
Expand Down Expand Up @@ -610,12 +595,12 @@ Resources:
- 'PrivateRouteTableAssociationC'
- 'PrivateRouteThroughNatGateway'
# Proxy for a conditional dependency on the application load balancer
# listener WebSocket rule, which associates the broker target group with
# the application load balancer.
# listener, which associates the broker target group with the application
# load balancer.
Metadata:
ConditionalDependencyProxy: !If
- 'MaybeDeployAlb'
- !Ref 'AlbListenerWebsocketRule'
- !Ref 'AlbListener'
- ''
Properties:
Cluster: !Ref 'ContainerCluster'
Expand Down Expand Up @@ -1709,26 +1694,6 @@ Resources:
RestApiId: !Ref 'RestApi'
StageName: !Ref 'AWS::StackName'
Type: 'AWS::ApiGateway::Stage'
# Target group for the REST API endpoint.
RestApiTargetGroup:
Condition: 'MaybeDeployRestApi'
Properties:
HealthCheckPath: '/processor_status?select=last_success_version'
HealthCheckProtocol: 'HTTPS'
Port: 443
Protocol: 'HTTPS'
TargetType: 'ip'
Targets:
- Id: !Join
- ''
- - !Ref 'RestApi'
- '.execute-api.'
- !Ref 'AWS::Region'
- '.amazonaws.com/'
- !Ref 'RestApiStage'
Port: 443
VpcId: !Ref 'Vpc'
Type: 'AWS::ElasticLoadBalancingV2::TargetGroup'
# Virtual private cloud for internal networking.
Vpc:
Condition: 'MaybeDeployVpc'
Expand Down

0 comments on commit be17a2b

Please sign in to comment.