Last active
February 4, 2022 11:50
-
-
Save webratz/7ff822119dee2af8ba4adb1cc5a80e3c to your computer and use it in GitHub Desktop.
datadog integrarions in other region
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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