MCPcopy Index your code
hub / github.com/amnk/dd2tf

github.com/amnk/dd2tf @v0.1c

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1c ↗ · + Follow
59 symbols 107 edges 7 files 8 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status

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):

dep ensure
go generate && go build

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.

Extension points exported contracts — how you extend this code

DatadogElement (Interface)
(no doc) [3 implementers]
main.go

Core symbols most depended-on inside this repo

String
called by 27
monitors.go
bindataRead
called by 3
tpl.go
Asset
called by 3
tpl.go
_filePath
called by 3
tpl.go
getName
called by 3
main.go
renderElement
called by 3
main.go
ModTime
called by 2
tpl.go
getElement
called by 2
main.go

Shape

Method 27
Function 22
Struct 9
Interface 1

Languages

Go100%

Modules by API surface

tpl.go24 symbols
main.go15 symbols
screenboards.go6 symbols
monitors.go6 symbols
dashboards.go6 symbols
screenboards_test.go1 symbols
dashboards_test.go1 symbols

For agents

$ claude mcp add dd2tf \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact