Skip to content

Instantly share code, notes, and snippets.

@webratz
Last active February 4, 2022 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webratz/7ff822119dee2af8ba4adb1cc5a80e3c to your computer and use it in GitHub Desktop.
Save webratz/7ff822119dee2af8ba4adb1cc5a80e3c to your computer and use it in GitHub Desktop.
datadog integrarions in other region
#!/usr/bin/env bash
export AWS_PAGER=""
AWS_REGION="eu-central-1"
DATADOG_RESOURCE_NAME="Datadog::Dashboards::Dashboard"
FOLDER="datadog-dashboards-dashboard"
VERSION="2.0.2"
aws cloudformation register-type \
--region "${AWS_REGION}" \
--type RESOURCE \
--type-name "${DATADOG_RESOURCE_NAME}" \
--schema-handler-package "s3://datadog-cloudformation-resources/${FOLDER}/${FOLDER}-${VERSION}.zip"
# you may need to wait for a while until you can proceed. you can check the status like this
# aws cloudformation describe-type-registration \
# --region "${AWS_REGION}" \
# --registration-token "MYTOKEN"
aws cloudformation list-type-versions \
--region "${AWS_REGION}" \
--type RESOURCE \
--type-name "${DATADOG_RESOURCE_NAME}"
aws cloudformation set-type-default-version \
--region "${AWS_REGION}" \
--type RESOURCE \
--version-id "00000001" \
--type-name "${DATADOG_RESOURCE_NAME}"
aws cloudformation list-types \
--region "${AWS_REGION}" \
--visibility "PRIVATE" \
--type RESOURCE
aws cloudformation set-type-configuration \
--type-name "${DATADOG_RESOURCE_NAME}" \
--type RESOURCE \
--configuration '{"DatadogCredentials": {"ApiURL": "https://api.datadoghq.eu", "ApiKey": "{{resolve:secretsmanager:Datadog:SecretString:APIKey}}", "ApplicationKey": "{{resolve:secretsmanager:Datadog:SecretString:AppKey}}"}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment