AWSTemplateFormatVersion: 2010-09-09

Parameters:
  domainName:
    Type: String
    Description: "The public facing domain name (FQDN), must end in .mindhive.cloud"
  cloudFrontDomainName:
    Type: String
    Description: "The CloudFront domain, something like d84oxrlcfi0cb.cloudfront.net"

Resources:
  domain:
    Type: AWS::Route53::RecordSet
    Properties:
      Name: !Ref domainName
      HostedZoneId: Z2S4MPAS4M00TM  # mindhive.cloud
      Type: A
      AliasTarget:
        DNSName: !Ref cloudFrontDomainName
        HostedZoneId: Z2FDTNDATAQYW2  # Fixed for CloudFront
