promiseofcake / datadog-fetch-hcl

Tool to fetch Datadog Dashboards and convert HCL for state management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

datadog-fetch-hcl

Tool to fetch Datadog Dashboards and output an HCL representation of them to stdout.

Useful for managing Dashboard state in: TerraForm

installation

go get github.com/promiseofcake/datadog-fetch-hcl

usage

Ensure your Datadog API / APP keys are exported

export DATADOG_API_KEY=foo
export DATADOG_APP_KEY=bar

Run via the following, you can redirect to a .tf file as you wish.

datadog-fetch-hcl -id <dashboard id> -title <resource title>

limitations

Hackery:

  • Resource title is passed in via CLI, not pulled from the remote dashboard (due to HCL encoder limitations)

Missing features:

  • Datadog events overlays
  • Precision / Aggreation metrics
  • Probably lots else

About

Tool to fetch Datadog Dashboards and convert HCL for state management


Languages

Language:Go 90.6%Language:HCL 7.8%Language:Shell 1.6%