Skip to content
Open
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
25 changes: 22 additions & 3 deletions aws/logs_monitoring/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ Parameters:
Type: String
Default: ""
Description: The name of the forwarder bucket to create. If not provided, AWS will generate a unique name.
StaticExportsPrefix:
Type: String
Default: ""
Description: "Sets a static prefix the stack exports rather than prefixing with the stack name (useful when deploying via StackSets)"
Conditions:
IsAWSChina:
Fn::Equals:
Expand Down Expand Up @@ -378,6 +382,11 @@ Conditions:
- Fn::Equals:
- Ref: DdForwarderBucketName
- ""
SetStaticExportsPrefix:
Fn::Not:
- Fn::Equals:
- Ref: StaticExportsPrefix
- ""
Rules:
MustSetDdApiKey:
Assertions:
Expand Down Expand Up @@ -941,22 +950,31 @@ Outputs:
- Arn
Export:
Name:
Fn::Sub: ${AWS::StackName}-ForwarderArn
Fn::If:
- SetStaticExportsPrefix
- Fn::Sub: ${StaticExportsPrefix}-ForwarderArn
- Fn::Sub: ${AWS::StackName}-ForwarderArn
DdApiKeySecretArn:
Description: ARN of SecretsManager Secret with Datadog API Key
Value:
Ref: DdApiKeySecret
Export:
Name:
Fn::Sub: ${AWS::StackName}-ApiKeySecretArn
Fn::If:
- SetStaticExportsPrefix
- Fn::Sub: ${StaticExportsPrefix}-ApiKeySecretArn
- Fn::Sub: ${AWS::StackName}-ApiKeySecretArn
Condition: CreateDdApiKeySecret
ForwarderBucketName:
Description: Name of the S3 bucket used by the Forwarder
Value:
Ref: ForwarderBucket
Export:
Name:
Fn::Sub: ${AWS::StackName}-ForwarderBucketName
Fn::If:
- SetStaticExportsPrefix
- Fn::Sub: ${StaticExportsPrefix}-ForwarderBucketName
- Fn::Sub: ${AWS::StackName}-ForwarderBucketName
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down Expand Up @@ -1019,6 +1037,7 @@ Metadata:
- DdTraceIntakeUrl
- AdditionalTargetLambdaArns
- DdForwarderBucketName
- StaticExportsPrefix
ParameterLabels:
DdApiKey:
default: "DdApiKey *"
Expand Down