AWSTemplateFormatVersion: 2010-09-09 Description: 'This template deploys an internal Route53 hosted zone used for the Sitecore roles (qs-1t2fuci7c)' Parameters: InternalR53DNS: Type: String Description: 'Internal Route 53 DNS FQDN.' VPCID: Type: String Description: 'The VPC ID.' LoadBalancerInternalDNS: Type: String Description: 'Internal Application Load Balancer DNS name.' IntVPCR53Zone: Type: String Description: 'Internal VPC Route 53 Zone ID.' SOLRUrl: Type: String Description: 'Solr URL for the Sitecore deployment' Conditions: CreateR53Zone: !Equals [!Ref 'IntVPCR53Zone', ''] # If No internal R53 zone is provided, this is true CreateDevSolr: !Equals [!Ref 'SOLRUrl', ''] Resources: # Internal DNS Configuration InternalR53: Type: AWS::Route53::HostedZone Condition: CreateR53Zone Properties: Name: !Ref InternalR53DNS VPCs: - VPCId: !Ref VPCID VPCRegion: !Sub ${AWS::Region} SolrDevRecord: Type: AWS::Route53::RecordSet Condition: CreateDevSolr # Only create record if no solr URL is provided Properties: HostedZoneId: !If [CreateR53Zone, !Ref InternalR53, !Ref IntVPCR53Zone] Name: !Sub 'solrdev.${InternalR53DNS}' Type: CNAME TTL: 900 ResourceRecords: - !Ref LoadBalancerInternalDNS Outputs: R53IntHostedID: Description: ID of the internal R53 Hosted Zone Value: !If [CreateR53Zone, !Ref InternalR53, !Ref IntVPCR53Zone] InternalDNSFQDN: Description: The internal VPC FQDN for the Sitecore deployment Value: !Ref InternalR53DNS