-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
60 lines (55 loc) · 1.64 KB
/
template.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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS account observability stack
Parameters:
AwsOrgId:
Type: String
AwsOrgRootId:
Type: String
ManagementOu:
Type: String
ObservabilityOu:
Type: String
DatadogSite:
Type: String
DatadogApiKey:
Type: String
NoEcho: 'true'
DatadogAppKey:
Type: String
NoEcho: 'true'
DataDogLogsDestinationArn:
Type: String
NoEcho: 'true'
AwsOamSinkArn:
Type: String
Resources:
DatadogIntegrationStack:
Type: AWS::Serverless::Application
Properties:
Location: "https://datadog-cloudformation-template.s3.amazonaws.com/aws/main_organizations.yaml"
Parameters:
DatadogApiKey: !Ref DatadogApiKey
DatadogAppKey: !Ref DatadogAppKey
DatadogSite: !Ref DatadogSite
DisableMetricCollection: 'true'
LogShippingStack:
Type: AWS::Serverless::Application
Properties:
Location: "./stacksets/logging/template.yaml"
Parameters:
DestinationArn: !Ref DataDogLogsDestinationArn
MetricsSinkStack:
Type: AWS::Serverless::Application
Properties:
Location: "./stacksets/metrics/oam-link-template.yaml"
Parameters:
AwsOamSinkArn: !Ref AwsOamSinkArn
CwCrossAccountShareStack:
Type: AWS::Serverless::Application
Properties:
Location: "./stacksets/metrics/cw-cross-account-sharing-template.yaml"
Parameters:
ObservabilityOuPath: !Sub "${AwsOrgId}/${AwsOrgRootId}/${ManagementOu}/${ObservabilityOu}"
Policy: View-Access-for-all-services
MonitoringAccountId: !Select [ "4", !Split [ ":", !Ref AwsOamSinkArn ] ]