blob: 5048f7587dbbdb88228ac65f398c83a6e8d12e1b [file] [log] [blame]
AWSTemplateFormatVersion: '2010-09-09'
Description: A stack for the Gerrit service Route53 routing.
Parameters:
Primary1ServiceStackName:
Description: Stack name of the ECS Primary Gerrit service
Type: String
Default: gerrit-service-primary-1
Primary2ServiceStackName:
Description: Stack name of the ECS Primary Gerrit service
Type: String
Default: gerrit-service-primary-2
LBServiceStackName:
Description: Stack name of the ECS LB service
Type: String
Default: gerrit-service
Resources:
Primary1DnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - Fn::ImportValue: !Join [':', [!Ref 'Primary1ServiceStackName', 'Subdomain']]
- Fn::ImportValue: !Join [':', [!Ref 'Primary1ServiceStackName', 'HostedZoneName']]
HostedZoneName:
!Join
- ''
- - Fn::ImportValue: !Join [':', [!Ref 'Primary1ServiceStackName', 'HostedZoneName']]
- '.'
Comment: DNS name for Gerrit Primary.
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'Primary1ServiceStackName', 'PublicLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'Primary1ServiceStackName', 'CanonicalHostedZoneID']]
EvaluateTargetHealth: False
Primary2DnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - Fn::ImportValue: !Join [':', [!Ref 'Primary2ServiceStackName', 'Subdomain']]
- Fn::ImportValue: !Join [':', [!Ref 'Primary2ServiceStackName', 'HostedZoneName']]
HostedZoneName:
!Join
- ''
- - Fn::ImportValue: !Join [':', [!Ref 'Primary2ServiceStackName', 'HostedZoneName']]
- '.'
Comment: DNS name for Gerrit Primary.
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'Primary2ServiceStackName', 'PublicLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'Primary2ServiceStackName', 'CanonicalHostedZoneID']]
EvaluateTargetHealth: False
LBDnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - Fn::ImportValue: !Join [':', [!Ref 'LBServiceStackName', 'Subdomain']]
- Fn::ImportValue: !Join [':', [!Ref 'LBServiceStackName', 'HostedZoneName']]
HostedZoneName:
!Join
- ''
- - Fn::ImportValue: !Join [':', [!Ref 'LBServiceStackName', 'HostedZoneName']]
- '.'
Comment: DNS name for Gerrit LB.
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'LBServiceStackName', 'PublicLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'LBServiceStackName', 'CanonicalHostedZoneID']]
EvaluateTargetHealth: False