diff --git a/stacksets/dns/template.yaml b/stacksets/dns/template.yaml new file mode 100644 index 0000000..5386194 --- /dev/null +++ b/stacksets/dns/template.yaml @@ -0,0 +1,81 @@ +AWSTemplateFormatVersion: '2010-09-09' +#Transform: AWS::Serverless-2016-10-31 +Description: DNS Domain + +Resources: + ServerlessOps: + Type: "AWS::Route53::HostedZone" + Properties: + Name: "serverlessops.io" + HostedZoneConfig: + Comment: ServerlessOps + + ServerlessOpsRR: + Type: "AWS::Route53::RecordSetGroup" + Properties: + Comment: "Apex Records" + HostedZoneId: !Ref ServerlessOps + RecordSets: + - Name: "serverlessops.io." + Type: "MX" + TTL: 300 + ResourceRecords: + - 1 aspmx.l.google.com + - 5 alt1.aspmx.l.google.com + - 5 alt2.aspmx.l.google.com + - 10 alt3.aspmx.l.google.com + - 10 alt4.aspmx.l.google.com + - 15 n2235kmtje5chj5uz63i3sluem7gtehtp5dlmladr2nfntojbqpq.mx-verification.google.com. + - Name: "serverlessops.io" + Type: "TXT" + TTL: 14400 + ResourceRecords: + - "\"v=spf1 include:_spf.google.com include:277116.spf08.hubspotemail.net ~all\"" + + + # WWW + ServerlessOpsWww: + Type: "AWS::Route53::RecordSet" + Properties: + Comment: "Website" + HostedZoneId: !Ref ServerlessOps + Name: "www.serverlessops.io." + Type: "CNAME" + TTL: 3600 + ResourceRecords: + - 277116.group16.sites.hubspot.net + + # Hubspot + ServerlessOpsDomainKeyHs1: + Type: "AWS::Route53::RecordSet" + Properties: + Comment: "HubSpot domain key" + HostedZoneId: !Ref ServerlessOps + Name: "hs1._domainkey.serverlessops.io." + Type: "CNAME" + TTL: 3600 + ResourceRecords: + - serverlessops-io.hs01a.dkim.hubspotemail.net + + ServerlessOpsDomainKeyHs2: + Type: "AWS::Route53::RecordSet" + Properties: + Comment: "HubSpot domain key" + HostedZoneId: !Ref ServerlessOps + Name: "hs2._domainkey.serverlessops.io." + Type: "CNAME" + TTL: 3600 + ResourceRecords: + - serverlessops-io.hs01b.dkim.hubspotemail.net + + ServerlessOpsDomainKeySmtpapi: + Type: "AWS::Route53::RecordSet" + Properties: + Comment: "HubSpot domain key" + HostedZoneId: !Ref ServerlessOps + Name: "smtpapi._domainkey.serverlessops.io." + Type: "TXT" + TTL: 3600 + # Those escape secquences are necessary. + ResourceRecords: + - "\"k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPtW5iwpXVPiH5FzJ7Nrl8USzuY9zqqzjE0D1r04xDN6qwziDnmgcFNNfMewVKN2D1O+2J9N14hRprzByFwfQW76yojh54Xu3uSbQ3JP0A7k8o8GutRF8zbFUA8n0ZH2y0cIEjMliXY4W4LwPA7m4q0ObmvSjhd63O9d8z1XkUBwIDAQAB\"" \ No newline at end of file diff --git a/template.yaml b/template.yaml index 22a67c4..9f2cc90 100644 --- a/template.yaml +++ b/template.yaml @@ -14,6 +14,11 @@ Resources: Properties: Location: "./stacksets/billing/template.yaml" + DnsStack: + Type: AWS::Serverless::Application + Properties: + Location: "./stacksets/dns/template.yaml" + OuStack: Type: AWS::Serverless::Application Properties: