Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Tool to fetch Datadog Dashboards and convert HCL for state management

Notifications You must be signed in to change notification settings

promiseofcake/datadog-fetch-hcl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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