-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.hostedzone.yaml
131 lines (108 loc) · 3.66 KB
/
template.hostedzone.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
AWSTemplateFormatVersion: 2010-09-09
Description: >-
This provides the hosted zone and SSL certs for external Cumulus URLs.
Parameters:
Domain:
Type: String
Default: smartcumulus.org
Resources:
CumulusHostedZone:
Type: AWS::Route53::HostedZone
Properties:
Name: !Ref Domain
# See README.md for notes about successfully deploying ACM certs
# Root and www should redirect to the prod dashboard domain
AcmRootCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Ref Domain
DomainValidationOptions:
- DomainName: !Ref Domain
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
AcmWwwCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "www.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "www.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
# Aggregator
AcmAggCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "aggregator.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "aggregator.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
AcmStagingAggCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "staging.aggregator.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "staging.aggregator.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
AcmDevAggCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "dev.aggregator.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "dev.aggregator.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
#Upload API
AcmApiCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "api.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "api.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
AcmStagingApiCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "staging.api.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "staging.api.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
AcmDevApiCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Sub "dev.api.${Domain}"
DomainValidationOptions:
- DomainName: !Sub "dev.api.${Domain}"
HostedZoneId: !Ref CumulusHostedZone
ValidationMethod: DNS
Outputs:
RootCertificateArn:
Description: "ACM Root Certificate ARN"
Value: !Ref AcmRootCertificate
WwwCertificateArn:
Description: "ACM Www Certificate ARN"
Value: !Ref AcmWwwCertificate
AggCertificateArn:
Description: "ACM Aggregator Certificate ARN"
Value: !Ref AcmAggCertificate
AggStagingCertificateArn:
Description: "ACM Staging Aggregator Certificate ARN"
Value: !Ref AcmStagingAggCertificate
AggDevCertificateArn:
Description: "ACM Dev Aggregator Certificate ARN"
Value: !Ref AcmDevAggCertificate
ApiCertificateArn:
Description: "ACM Aggregator Certificate ARN"
Value: !Ref AcmApiCertificate
ApiStagingCertificateArn:
Description: "ACM Staging Aggregator Certificate ARN"
Value: !Ref AcmStagingApiCertificate
ApiDevCertificateArn:
Description: "ACM Dev Aggregator Certificate ARN"
Value: !Ref AcmDevApiCertificate
CumulusHostedZoneId:
Description: "Cumulus Hosted Zone ID"
Value: !Ref CumulusHostedZone