From 881f2f5719575965ee3193304221d07398c77d47 Mon Sep 17 00:00:00 2001 From: James Hamlin Date: Wed, 25 May 2016 19:37:44 -0700 Subject: [PATCH 1/2] Create a HostedZone for sheltertech.org Signed-off-by: James Hamlin --- regions/us-east-1.yml | 6 ++++++ templates/HostedZone.json | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 templates/HostedZone.json diff --git a/regions/us-east-1.yml b/regions/us-east-1.yml index 6d53411..d73062b 100644 --- a/regions/us-east-1.yml +++ b/regions/us-east-1.yml @@ -34,6 +34,12 @@ defaults: stacks: + - name: SheltertechHostedZone + template_name: HostedZone + parameters: + Name: sheltertech.org + Description: "Root HostedZone for the organization's website." + - name: IAMInfrastructureGroup capabilities: CAPABILITY_IAM diff --git a/templates/HostedZone.json b/templates/HostedZone.json new file mode 100644 index 0000000..65b9b67 --- /dev/null +++ b/templates/HostedZone.json @@ -0,0 +1,25 @@ +{ + "AWSTemplateFormatVersion" : "2010-09-09", + "Description" : "This template is used to create HostedZones", + "Parameters" : { + "Name": { + "Description": "The name of the HostedZone (i.e. the root host).", + "Type": "String" + }, + "Description": { + "Description": "A descripton of the HostedZone.", + "Type": "String" + } + }, + "Resources": { + "HostedZone": { + "Type": "AWS::Route53::HostedZone", + "Properties": { + "Name": { "Ref": "Name" }, + "HostedZoneConfig": { + "Comment": { "Ref": "Description" } + } + } + } + } +} From 41e17276c49229b09b2cbf65ec561342264d6e6d Mon Sep 17 00:00:00 2001 From: James Hamlin Date: Wed, 25 May 2016 21:05:39 -0700 Subject: [PATCH 2/2] wip Signed-off-by: James Hamlin --- regions/us-east-1.yml | 6 +---- templates/HostedZone.json | 25 -------------------- templates/SheltertechDNS.json | 43 +++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 30 deletions(-) delete mode 100644 templates/HostedZone.json create mode 100644 templates/SheltertechDNS.json diff --git a/regions/us-east-1.yml b/regions/us-east-1.yml index d73062b..d645230 100644 --- a/regions/us-east-1.yml +++ b/regions/us-east-1.yml @@ -34,11 +34,7 @@ defaults: stacks: - - name: SheltertechHostedZone - template_name: HostedZone - parameters: - Name: sheltertech.org - Description: "Root HostedZone for the organization's website." + - name: SheltertechDNS - name: IAMInfrastructureGroup capabilities: CAPABILITY_IAM diff --git a/templates/HostedZone.json b/templates/HostedZone.json deleted file mode 100644 index 65b9b67..0000000 --- a/templates/HostedZone.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "AWSTemplateFormatVersion" : "2010-09-09", - "Description" : "This template is used to create HostedZones", - "Parameters" : { - "Name": { - "Description": "The name of the HostedZone (i.e. the root host).", - "Type": "String" - }, - "Description": { - "Description": "A descripton of the HostedZone.", - "Type": "String" - } - }, - "Resources": { - "HostedZone": { - "Type": "AWS::Route53::HostedZone", - "Properties": { - "Name": { "Ref": "Name" }, - "HostedZoneConfig": { - "Comment": { "Ref": "Description" } - } - } - } - } -} diff --git a/templates/SheltertechDNS.json b/templates/SheltertechDNS.json new file mode 100644 index 0000000..fb5fc3a --- /dev/null +++ b/templates/SheltertechDNS.json @@ -0,0 +1,43 @@ +{ + "AWSTemplateFormatVersion" : "2010-09-09", + "Description" : "This template is used to manage DNS for sheltertech.org", + "Resources": { + "HostedZone": { + "Type": "AWS::Route53::HostedZone", + "Properties": { + "Name": "sheltertech.org", + "HostedZoneConfig": { + "Comment": "HostedZone for sheltertech.org." + } + } + }, + "SheltertechCNAME" : { + "Type" : "AWS::Route53::RecordSet", + "DependsOn": "HostedZone", + "Properties" : { + "HostedZoneName" : "sheltertech.org.", + "Comment" : "CNAME to sheltertech S3 Bucket website", + "Name" : "sheltertech.org.", + "Type" : "A", + "AliasTarget" : { + "DNSName" : "sheltertech.org.s3-website-us-east-1.amazonaws.com", + "HostedZoneId" : { "Ref" : "HostedZone" } + } + } + }, + "WWWSheltertechCNAME" : { + "Type" : "AWS::Route53::RecordSet", + "DependsOn": "HostedZone", + "Properties" : { + "HostedZoneName" : "sheltertech.org.", + "Comment" : "www.sheltertech.org CNAME", + "Name" : "www.sheltertech.org.", + "Type" : "A", + "AliasTarget" : { + "DNSName" : "www.sheltertech.org.s3-website-us-east-1.amazonaws.com", + "HostedZoneId" : { "Ref" : "HostedZone" } + } + } + } + } +}