Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Latest commit

 

History

History
41 lines (31 loc) · 1.05 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.05 KB

A simple utility to convert DataDog dashboards and/or monitors to Terraform format.

Requires DATADOG_API_KEY and DATADOG_APP_KEY environment variables.

Useful, if you had all dashboards configured adhoc and now want to follow DevOps style :)

How to build

Just run (GOPATH and sometimes GOBIN have to be set):

cd src
go build && ./dd2tf

Examples

Export all dashboards:

DATADOG_API_KEY=xxx DATADOG_APP_KEY=xxx ./dd2tf dashboards --all

Export one particular dashboard (where 1111 is the ID of the dashboard):

DATADOG_API_KEY=xxx DATADOG_APP_KEY=xxx ./dd2tf dashboards --ids 111

Write dashboards to corresponding files:

DATADOG_API_KEY=xxx DATADOG_APP_KEY=xxx ./dd2tf dashboards --files --all

Datadog monitor can be exported with this command:

DATADOG_API_KEY=xxx DATADOG_APP_KEY=xxx ./dd2tf monitors --ids 1706011

And Datadog Screenboard:

DATADOG_API_KEY=xxx DATADOG_APP_KEY=xxx ./dd2tf screenboards --all

You can find api/app keys in settings, under Integrations -> API section.