-
Notifications
You must be signed in to change notification settings - Fork 11
/
apps-400A.yml
198 lines (186 loc) · 9.94 KB
/
apps-400A.yml
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# stacks/apps-400A.yml
AWSTemplateFormatVersion: "2010-09-09"
Description: >-
This is a wrapper-stack for application-specific stacks. It creates stacks
that are roughly equivalent in terms of dependency priority and order amongst
all the app stacks being created.
Parameters:
TemplateUrlPrefix: { Type: String }
EnvironmentType: { Type: String }
EnvironmentTypeAbbreviation: { Type: String }
EnvironmentTypeLowercase: { Type: String }
RegionMode: { Type: String }
RootStackName: { Type: String }
RootStackId: { Type: String }
NestedChangeSetScrubbingResourcesState: { Type: String }
VpcId: { Type: AWS::EC2::VPC::Id }
DeploymentPackageBucketName: { Type: String }
TheCountLogsFileSystemId: { Type: String }
EcsClusterArn: { Type: String }
AlbFullName: { Type: String }
AlbHttpsListenerArn: { Type: String }
AlbInsecureHttpListenerArn: { Type: String }
NewRelicApiKeyPrxLite: { Type: String }
SharedAuroraMysqlEndpoint: { Type: String }
SharedAuroraMysqlPort: { Type: String }
SharedAuroraPostgresqlEndpoint: { Type: String }
SharedAuroraPostgresqlPort: { Type: String }
AnnounceResourcePrefix: { Type: String }
PorterJobExecutionSnsTopicArn: { Type: AWS::SSM::Parameter::Value<String> }
S3SigningEndpointUrl: { Type: String }
S3SigningAccessKeyId: { Type: String }
AmazonSesSmtpCredentialsGeneratorServiceToken: { Type: String }
ExchangeHostname: { Type: String }
TheCastleSharedAlbListenerRulePriorityPrefix: { Type: String }
WfmtSharedAlbListenerRulePriorityPrefix: { Type: String }
WfmtHostname: { Type: String }
Conditions:
EnableNestedChangeSetScrubbingResources: !Equals [!Ref NestedChangeSetScrubbingResourcesState, Enabled]
IsProduction: !Equals [!Ref EnvironmentType, Production]
Resources:
NestedChangeSetScrubber: { Type: AWS::SNS::Topic, Condition: EnableNestedChangeSetScrubbingResources }
TheCastleStack:
Type: AWS::CloudFormation::Stack
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
Parameters:
NestedChangeSetScrubbingResourcesState: !Ref NestedChangeSetScrubbingResourcesState
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
EnvironmentType: !Ref EnvironmentType
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
EnvironmentTypeLowercase: !Ref EnvironmentTypeLowercase
RegionMode: !Ref RegionMode
VpcId: !Ref VpcId
EcsClusterArn: !Ref EcsClusterArn
AlbFullName: !Ref AlbFullName
AlbHttpsListenerArn: !Ref AlbHttpsListenerArn
AlbInsecureHttpListenerArn: !Ref AlbInsecureHttpListenerArn
AlbListenerRulePriorityPrefix: !Ref TheCastleSharedAlbListenerRulePriorityPrefix
TheCountLogsFileSystemId: !Ref TheCountLogsFileSystemId
EcrImageTag: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/The_Castle/pkg/docker-image-tag
NewRelicApiKeyPrxLite: !Ref NewRelicApiKeyPrxLite
SharedAuroraMysqlEndpoint: !Ref SharedAuroraMysqlEndpoint
SharedAuroraMysqlPort: !Ref SharedAuroraMysqlPort
ExchangeHostname: !Ref ExchangeHostname
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:application, Value: The Castle }
TemplateURL: !Sub ${TemplateUrlPrefix}/the-castle.yml
TimeoutInMinutes: 30
DovetailCdnUsageStack:
Type: AWS::CloudFormation::Stack
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
Parameters:
NestedChangeSetScrubbingResourcesState: !Ref NestedChangeSetScrubbingResourcesState
EnvironmentType: !Ref EnvironmentType
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
CodeS3Bucket: !Ref DeploymentPackageBucketName
CodeS3ObjectKey: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-CDN_Usage/pkg/s3-object-key
AthenaDb: cloudfront_logs
AthenaTable: !If [IsProduction, dovetail3_cdn_production, dovetail3_cdn_staging]
BigQueryClientConfig: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-CDN_Usage/big-query-client-config
BigQueryDataset: !If [IsProduction, production, staging]
DovetailCdnLogBucket: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-CDN_Usage/dovetail-cdn-log-bucket
DovetailCdnLogPrefix: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-CDN_Usage/dovetail-cdn-log-prefix
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:family, Value: Dovetail }
- { Key: prx:dev:application, Value: CDN Usage }
TemplateURL: !Sub ${TemplateUrlPrefix}/dovetail-cdn-usage.yml
TimeoutInMinutes: 10
DovetailMetricsExportStack:
Type: AWS::CloudFormation::Stack
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
Parameters:
NestedChangeSetScrubbingResourcesState: !Ref NestedChangeSetScrubbingResourcesState
EnvironmentType: !Ref EnvironmentType
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
RegionMode: !Ref RegionMode
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
CodeS3Bucket: !Ref DeploymentPackageBucketName
CodeS3ObjectKey: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Metrics_Export/pkg/s3-object-key
BigQueryLayerS3ObjectKey: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Metrics_Export/bigquery-layer/pkg/s3-object-key
BigQueryClientConfig: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Metrics_Export/big-query-client-config
# Because Metrics Export is intended to send files to third parties,
# the Porter jobs it creates are often writing files to S3 buckets that
# we don't control, which have granted access to a specific IAM role.
# Switching to Porter in another region would change which IAM role is
# being used, and require the third parties to update the policies on
# their buckets, so for now this is locked to Porter in us-east-1,
# regardless of which region Metric Export is running in.
PorterJobExecutionSnsTopicArn: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/porter-job-execution-topic-arn-us-east-1
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:family, Value: Dovetail }
- { Key: prx:dev:application, Value: Metrics Export }
TemplateURL: !Sub ${TemplateUrlPrefix}/dovetail-metrics-export.yml
TimeoutInMinutes: 10
WfmtStack:
Type: AWS::CloudFormation::Stack
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
Parameters:
NestedChangeSetScrubbingResourcesState: !Ref NestedChangeSetScrubbingResourcesState
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
EnvironmentType: !Ref EnvironmentType
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
EnvironmentTypeLowercase: !Ref EnvironmentTypeLowercase
RegionMode: !Ref RegionMode
VpcId: !Ref VpcId
EcsClusterArn: !Ref EcsClusterArn
AlbFullName: !Ref AlbFullName
AlbHttpsListenerArn: !Ref AlbHttpsListenerArn
AlbListenerRulePriorityPrefix: !Ref WfmtSharedAlbListenerRulePriorityPrefix
AmazonSesSmtpCredentialsGeneratorServiceToken: !Ref AmazonSesSmtpCredentialsGeneratorServiceToken
EcrImageTag: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/WFMT/pkg/docker-image-tag
NewRelicApiKeyPrxLite: !Ref NewRelicApiKeyPrxLite
SharedAuroraPostgresqlEndpoint: !Ref SharedAuroraPostgresqlEndpoint
SharedAuroraPostgresqlPort: !Ref SharedAuroraPostgresqlPort
WfmtHostname: !Ref WfmtHostname
WfmtServicesS3BucketArn: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/WFMT/${AWS::Region}/s3-bucket-arn
S3SigningEndpointUrl: !Ref S3SigningEndpointUrl
S3SigningAccessKeyId: !Ref S3SigningAccessKeyId
AnnounceResourcePrefix: !Ref AnnounceResourcePrefix
PorterJobExecutionSnsTopicArn: !Ref PorterJobExecutionSnsTopicArn
ExchangeHostname: !Ref ExchangeHostname
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:application, Value: WFMT }
TemplateURL: !Sub ${TemplateUrlPrefix}/wfmt.yml
TimeoutInMinutes: 30
Outputs:
TheCastleTargetGroupFullName:
Value: !GetAtt TheCastleStack.Outputs.TargetGroupFullName
WfmtTargetGroupFullName:
Value: !GetAtt WfmtStack.Outputs.TargetGroupFullName