forked from aws-samples/aws-refarch-drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-refarch-drupal-05-route53.yaml
51 lines (44 loc) · 1.53 KB
/
aws-refarch-drupal-05-route53.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
AWSTemplateFormatVersion: 2010-09-09
Description: Reference Architecture to host Drupal on AWS - Creates Route 53 record set (if selected)
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Route 53 Parameters
Parameters:
- DomainName
- DnsEndpoint
- DnsHostId
ParameterLabels:
DnsEndpoint:
default: DNS Endpoint
DnsHostId:
default: DNS Host Id
DomainName:
default: Site Domain
Parameters:
DnsEndpoint:
AllowedPattern: ^(?!http)(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
Description: The DNS endpoint - CloudFront DNS if using CloudFront else Public ELB DNS name.
Type: String
DnsHostId:
AllowedPattern: ^[A-Z0-9]{14}$
Description: The DNS host zone id - 'Z2FDTNDATAQYW2' if using CloudFront else Public ELB host zone id.
Type: String
DomainName:
AllowedPattern: ^(?!http)(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
Description: The main domain name of the Drupal site (e.g. example.com).
Type: String
Resources:
RecordSet:
Type: AWS::Route53::RecordSetGroup
Properties:
HostedZoneName: !Join ['', [!Ref DomainName, '.']]
RecordSets:
- Name: !Join ['', ['www.', !Ref DomainName, '.']]
Type: A
AliasTarget:
DNSName: !Ref DnsEndpoint
EvaluateTargetHealth: True
HostedZoneId: !Ref DnsHostId