-
Notifications
You must be signed in to change notification settings - Fork 0
/
route_53.yaml
44 lines (38 loc) · 1.19 KB
/
route_53.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
AWSTemplateFormatVersion: 2010-09-09
Description: Route 53 reusable template with ALB alias
Parameters:
MyWebDomain:
Description: "A reference to the Webserver Fully Qualified Domain Name domain name www.example.com"
Type: String
Default: ""
MyHostedZone:
Description: "A reference to the Hosted Zone example.com"
Type: String
Default: ""
MyWebALBDNSName:
Description: "A reference to the Webserver ELB DNS Name A Record"
Type: String
Default: ""
MyWebALBHostedZoneId:
Description: "A reference to the Webserver ELB (Canonical) Hosted Zone ID"
Type: String
Default: "Z35SXDOTRQ7X7K"
AllowedValues:
- Z35SXDOTRQ7X7K # us-east-1
- Z3AADJGX6KTTL2 # us-east-2
Resources:
MyRoute53:
Type: "AWS::Route53::RecordSetGroup"
Properties:
HostedZoneName: !Sub "${MyHostedZone}."
Comment: "Zone apex alias targeted to myELB LoadBalancer."
RecordSets:
- Name: !Sub "${MyWebDomain}."
Type: 'A'
AliasTarget:
HostedZoneId: !Ref "MyWebALBHostedZoneId"
DNSName: !Ref "MyWebALBDNSName"
Outputs:
MyRoute53:
Description: "A reference to the Route53"
Value: !Ref MyRoute53