blob: 156cbc547a7ba961a235ab9eae5a92e1bd85b623 [file] [log] [blame]
AWSTemplateFormatVersion: '2010-09-09'
Description: A stack for the Gerrit service Route53 routing.
Parameters:
ClusterStackName:
Description: Stack name of the Cluster
Type: String
Default: gerrit-cluster-stack
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
PrimariesGerritSubdomain:
Description: The subdomain of the load balancer serving requests to primary gerrit instances
Type: String
PrimariesGerritHostedZoneName:
Description: The zone name of the load balancer serving requests to primary gerrit instances
Type: String
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
PrimariesGerritDnsRecord:
Type: AWS::Route53::RecordSet
Properties:
Name:
!Join
- '.'
- - !Ref PrimariesGerritSubdomain
- !Ref PrimariesGerritHostedZoneName
HostedZoneName:
!Join
- ''
- - !Ref PrimariesGerritHostedZoneName
- '.'
Comment: DNS name for the load balancer serving requests to primary gerrit instances
Type: A
AliasTarget:
DNSName:
Fn::ImportValue:
!Join [':', [!Ref 'ClusterStackName', 'PrimariesGerritLoadBalancerDNSName']]
HostedZoneId:
Fn::ImportValue:
!Join [':', [!Ref 'ClusterStackName', 'PrimariesGerritCanonicalHostedZoneID']]
EvaluateTargetHealth: False