datadog-to-terraform icon indicating copy to clipboard operation
datadog-to-terraform copied to clipboard

Not able to convert the new keywords which is defined in datadog json such as formulas, response_type, name

Open surajtikoo opened this issue 4 years ago • 4 comments

Describe the bug As per the new datadog dashboard, few attributes are not able to convert by the datadog converter plugin

To Reproduce Use the below JSON to reproduce the problem

{ "title": "An example screenboard which causes the issue" }

{ "title": "test.dev.edit", "description": "", "widgets": [ { "id": 6724092998888202, "layout": { "x": 8, "y": 20, "width": 8, "height": 6 }, "definition": { "title_size": "16", "title_align": "left", "type": "query_value", "requests": [ { "formulas": [ { "formula": "query1" } ], "response_format": "scalar", "queries": [ { "query": "avg:test.stats-cancellation}.rollup(86400)", "data_source": "metrics", "name": "query1", "aggregator": "last" } ] } ], "autoscale": false, "precision": 0 } } ], "template_variables": [ { "name": "DashEnv", "default": "prod2", "prefix": "environment" } ], "layout_type": "free", "is_read_only": false, "notify_list": [], "id": "a9e-yvm-s3z" } Expected terraform code It should be able to convert.

resource "datadog_dashboard" "not broken, woo!" { ... }

Screenshots If applicable, add screenshots to help explain your problem. image

Additional context Add any other context about the problem here.

surajtikoo avatar Jul 30 '21 08:07 surajtikoo

See PR #62

fgm avatar Aug 18 '21 12:08 fgm

same issue with key 'query_config'

Truncated example:

{
	"id": 1,
	"name": "foo",
	"options": {
		"queryConfig": {
			"track": "logs",
			"timeRange": {
				"to": 1630423439532,
				"live": true,
				"from": 1627831439532
			},
			"queryString": "example query",
			"indexes": [],
			"live": true,
			"queryIsFailed": false
		},
	},
}

caleb15 avatar Jan 14 '22 03:01 caleb15

same issue with show_title ❗️Can't convert key 'show_title'

"widgets": [{ "id": 8450562588885112, "definition": { "title": "About Postgres", "title_align": "center", "type": "group", "show_title": false, }}

millad90s avatar Feb 10 '22 10:02 millad90s

@millad90s Does it work with PR #62 applied ?

fgm avatar Feb 25 '22 10:02 fgm