Skip to content

flavio-cadete-cko/datadog-to-terraform

 
 

Repository files navigation

Datadog to Terraform Converter

Converts Datadog monitor and dashboard JSON into Terraform alarm code.

Installation

Chrome Extension | Firefox Add-on

How to Use

  1. Create your monitor or dashboard in the Datadog UI and copy the JSON.
  2. Open the extension, fill in the resource name and paste in the JSON.
  3. Paste the resulting code into your terraform file and run terraform fmt (you can automate this with editor plugins)

And that's it.

Click to enlarge:


CLI version

  1. Create your monitor or dashboard in the Datadog UI and copy the JSON.
  2. Two possibilities:
  • Use standard input
    • Run yarn convert in the terminal
    • Paste the JSON, terminating input with CTRL-D
  • Use a file:
    • Save JSON to a file, say dashboard.json
    • Run yarn convert dashboard.json

Contributing

We'd love for folks to contribute! Feel free to add your own ideas or take a look at the issues for inspiration. The Contributing Guide explains development setup and the release process.

Packages

No packages published

Languages

  • JavaScript 94.6%
  • HTML 5.4%