Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions aws_account_level_logs/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Parameters:
Type: CommaDelimitedList
ConstraintDescription: Regions is required
Default: ''
SelectionCriteria:
Description: >-
Optional subscription selection criteria.
Type: String
Default: "LogGroupName NOT IN [\"MyLogGroup\", \"MyAnotherLogGroup\"]"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Default used as the actual default value, or use to show an example value? If it becomes the actual default value, maybe we need to move this into the description.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the actual default value. I would prefer the default be a blank string, but that would create drift for other people using the template without SelectionCriteria set.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically I think what we would set it to is !Ref "AWS::NoValue" if no value was given

Resources:
DatadogAccountLevelLogsStackSetAdministrationRole:
Type: AWS::IAM::Role
Expand Down Expand Up @@ -285,6 +290,8 @@ Resources:
ParameterValue: !GetAtt CloudWatchLogsRole.Arn
- ParameterKey: FirehoseLogsRoleArn
ParameterValue: !GetAtt FirehoseLogsRole.Arn
- ParameterKey: SelectionCriteria
ParameterValue: !Ref SelectionCriteria
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down
7 changes: 6 additions & 1 deletion aws_account_level_logs/single-region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ Parameters:
Type: String
AllowedPattern: .+
ConstraintDescription: DatadogHttpEndpointUrl is required
SelectionCriteria:
Description: >-
Optional subscription selection criteria.
Type: String
Default: "LogGroupName NOT IN [\"MyLogGroup\", \"MyAnotherLogGroup\"]"

Resources:

Expand Down Expand Up @@ -93,6 +98,6 @@ Resources:
- "\", \"DestinationArn\":\""
- Fn::GetAtt: "DatadogDeliveryStream.Arn"
- "\", \"FilterPattern\": \"\", \"Distribution\": \"Random\"}"
SelectionCriteria: "LogGroupName NOT IN [\"MyLogGroup\", \"MyAnotherLogGroup\"]"
SelectionCriteria: !Ref SelectionCriteria
PolicyType: "SUBSCRIPTION_FILTER_POLICY"
Scope: "ALL"