From b91fcc09c2dd9be93d16637025b0dc964e906fba Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Sat, 17 Aug 2024 02:49:55 -0400 Subject: [PATCH] Setup account level CW Log filter in datadof account --- stacksets/datadog-shipping/logs-template.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stacksets/datadog-shipping/logs-template.yaml b/stacksets/datadog-shipping/logs-template.yaml index 4ebbe5f..ca6d7c4 100644 --- a/stacksets/datadog-shipping/logs-template.yaml +++ b/stacksets/datadog-shipping/logs-template.yaml @@ -143,4 +143,13 @@ Resources: CloudWatchLoggingOptions: Enabled: true LogGroupName: !Ref DeliveryStreamLogGroup - LogStreamName: !Ref BackupDeliveryLogStream \ No newline at end of file + LogStreamName: !Ref BackupDeliveryLogStream + + CloudWatchAccountPolicy: + Type: AWS::Logs::AccountPolicy + Properties: + PolicyName: Datadog-Firehose + PolicyDocument: !Sub '{ "RoleArn":"${CloudWatchLogsRole.Arn}", "DestinationArn":"${DatadogDeliveryStream.Arn}"}' + SelectionCriteria: !Sub 'LogGroupName NOT IN ["${DeliveryStreamLogGroup}", "${BackupDeliveryLogStream}"]' + PolicyType: "SUBSCRIPTION_FILTER_POLICY" + Scope: "ALL" \ No newline at end of file