Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Created March 22, 2019 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save techthoughts2/f6b2551ac4572de780290843c1fc9e73 to your computer and use it in GitHub Desktop.
Save techthoughts2/f6b2551ac4572de780290843c1fc9e73 to your computer and use it in GitHub Desktop.
Creates an Amazon Route 53 hosted zone
AWSTemplateFormatVersion: '2010-09-09'
Description: Creates an Amazon Route 53 hosted zone
Parameters:
DomainName:
Type: String
Description: The DNS name of an Amazon Route 53 hosted zone e.g. jevsejev.io
AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?<!-)
ConstraintDescription: must be a valid DNS zone name.
Resources:
DNS:
Type: AWS::Route53::HostedZone
Properties:
HostedZoneConfig:
Comment: !Join ['', ['Hosted zone for ', !Ref 'DomainName']]
Name: !Ref 'DomainName'
HostedZoneTags:
- Key: Purpose
Value: fermi
Outputs:
fermiNS:
Description: NameServers
Value: !Join [',', !GetAtt DNS.NameServers]
Export:
Name: fermiNS
HostedZoneName:
Description: 'The fully qualified domain name'
Value: !Ref DomainName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment