blob: ee2bea9bbf0c12662ce31b46484b8cd9842fcbd2 [file] [log] [blame]
AWSTemplateFormatVersion: '2010-09-09'
Description: A stack for the Gerrit service Route53 routing.
Parameters:
PrimaryServiceStackName:
Description: Stack name of the ECS Primary Gerrit service
Type: String
Default: gerrit-service-primary
ReplicaServiceStackName:
Description: Stack name of the ECS Replica Gerrit service
Type: String
Default: gerrit-service-replica
Resources:
PrimaryHTTPDnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'HttpSubdomain']]
- Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'HostedZoneName']]
HostedZoneName:
!Join
- ''
- - Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'HostedZoneName']]
- '.'
Comment: DNS name for Load Balancer serving HTTP requests to primary gerrit
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'PrimaryServiceStackName', 'GerritHTTPLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'PrimaryServiceStackName', 'GerritHTTPCanonicalHostedZoneID']]
EvaluateTargetHealth: False
PrimarySSHDnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'SshSubdomain']]
- Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'HostedZoneName']]
HostedZoneName:
!Join
- ''
- - Fn::ImportValue: !Join [':', [!Ref 'PrimaryServiceStackName', 'HostedZoneName']]
- '.'
Comment: DNS name for Load Balancer serving SSH requests to primary gerrit
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'PrimaryServiceStackName', 'GerritSSHLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'PrimaryServiceStackName', 'GerritSSHCanonicalHostedZoneID']]
EvaluateTargetHealth: False