Skip to content

Commit 3b1a9ec

Browse files
authored
Merge pull request #4 from ServerlessOpsIO/update/datadog-template
Update/datadog template
2 parents c66901f + 3bb816f commit 3b1a9ec

File tree

5 files changed

+36
-22
lines changed

5 files changed

+36
-22
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ This solution deploys a set of AWS resources across your AWS Organization to ena
3535
- **`stacksets/metrics/stackset.yaml`**, **`stacksets/metrics/oam-link-template.yaml`**, and **`stacksets/metrics/cw-cross-account-sharing-template.yaml`**: Deploy OAM Links and cross-account sharing roles to enable metric sharing from member accounts to the central account.
3636
- **`stacksets/datadog-shipping/stackset.yaml`** and related templates: Deploy resources in the central account to receive logs/metrics and forward them to Datadog.
3737
- **Root-level templates** (e.g., `template.yaml`, `stacksets-shipping-template.yaml`): Compose and orchestrate the deployment of the above stacksets and templates for a full organization-wide rollout.
38+
39+
## Datadog template Updates
40+
41+
Due to a limitation in AWS SAM's `package` command in `template.yaml` the `DatadogIntegrationStack` `Location` parameter must be kept in sync manually with the `DatadogTemplateUrl` value.

cfn-parameters.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"DatadogApiKey": $secrets.DATADOG_API_KEY,
99
"DatadogAppKey": $secrets.DATADOG_APP_KEY,
1010
"DataDogLogsDestinationArn": $secrets.DATADOG_LOGS_DESTINATION_ARN,
11-
"DatadogSite": "us5.datadoghq.com"
11+
"DatadogSite": "us5.datadoghq.com",
12+
"DatadogTemplateUrl": $vars.DATADOG_TEMPLATE_URL
1213
}

stacksets-shipping-template.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Parameters:
1313
Type: String
1414
ObservabilityOu:
1515
Type: String
16+
DatadogTemplateUrl:
17+
Type: String
1618
DatadogSite:
1719
Type: String
1820
DatadogApiKey:
@@ -28,17 +30,18 @@ Parameters:
2830
Type: String
2931

3032
Resources:
31-
# DatadogIntegrationStackSet:
32-
# Type: AWS::Serverless::Application
33-
# Properties:
34-
# Location: "./stacksets/datadog-integration/stackset.yaml"
35-
# Parameters:
36-
# DeploymentOrgId: !Ref AwsOrgRootId
37-
# TargetRegions: !Ref TargetRegions
38-
# DatadogApiKey: !Ref DatadogApiKey
39-
# DatadogAppKey: !Ref DatadogAppKey
40-
# DatadogSite: !Ref DatadogSite
41-
# DisableMetricCollection: 'false'
33+
DatadogIntegrationStackSet:
34+
Type: AWS::Serverless::Application
35+
Properties:
36+
Location: "./stacksets/datadog-integration/stackset.yaml"
37+
Parameters:
38+
DeploymentOrgId: !Ref AwsOrgRootId
39+
TargetRegions: !Ref TargetRegions
40+
DatadogTemplateUrl: !Ref DatadogTemplateUrl
41+
DatadogApiKey: !Ref DatadogApiKey
42+
DatadogAppKey: !Ref DatadogAppKey
43+
DatadogSite: !Ref DatadogSite
44+
DisableMetricCollection: 'false'
4245

4346
LogShippingStackSet:
4447
Type: AWS::Serverless::Application

stacksets/datadog-integration/stackset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Parameters:
77
Type: CommaDelimitedList
88
TargetRegions:
99
Type: CommaDelimitedList
10+
DatadogTemplateUrl:
11+
Type: String
1012
DatadogSite:
1113
Type: String
1214
DatadogApiKey:
@@ -51,4 +53,4 @@ Resources:
5153
FailureToleranceCount: 1
5254
MaxConcurrentCount: 5
5355
PermissionModel: SERVICE_MANAGED
54-
TemplateURL: https://datadog-cloudformation-template.s3.amazonaws.com/aws/main_organizations.yaml
56+
TemplateURL: !Ref DatadogTemplateUrl

template.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Parameters:
1111
Type: String
1212
ObservabilityOu:
1313
Type: String
14+
# WARNING: due to a limitation of AWS SAM's `package` command the DatadogIntegrationStack
15+
# Location parameter must be kept in sync manually.
16+
DatadogTemplateUrl:
17+
Type: String
1418
DatadogSite:
1519
Type: String
1620
DatadogApiKey:
@@ -26,15 +30,15 @@ Parameters:
2630
Type: String
2731

2832
Resources:
29-
# DatadogIntegrationStack:
30-
# Type: AWS::Serverless::Application
31-
# Properties:
32-
# Location: "https://datadog-cloudformation-template.s3.amazonaws.com/aws/main_organizations.yaml"
33-
# Parameters:
34-
# DatadogApiKey: !Ref DatadogApiKey
35-
# DatadogAppKey: !Ref DatadogAppKey
36-
# DatadogSite: !Ref DatadogSite
37-
# DisableMetricCollection: 'false'
33+
DatadogIntegrationStack:
34+
Type: AWS::Serverless::Application
35+
Properties:
36+
Location: "https://datadog-cloudformation-template-quickstart.s3.amazonaws.com/aws/v4.1.3/main_orgnizations.yaml"
37+
Parameters:
38+
DatadogApiKey: !Ref DatadogApiKey
39+
DatadogAppKey: !Ref DatadogAppKey
40+
DatadogSite: !Ref DatadogSite
41+
DisableMetricCollection: 'false'
3842

3943
LogShippingStack:
4044
Type: AWS::Serverless::Application

0 commit comments

Comments
 (0)