laurmurclar/datadog-to-terraform

❗️Conversion for "priority" not found

Closed this issue · 1 comments

Describe the bug
I tried to configure a monitor in Datadog and use this plugin in firefox to convert to terraform. Here was the JSON I copied from Datadog's export:

{
	"id": 30072632,
	"name": "Concurrent lambda invocations >80% of unreserved concurrency limit",
	"type": "metric alert",
	"query": "max(last_15m):avg:aws.lambda.unreserved_concurrent_executions.maximum{account:xxxx} > 800",
	"message": "The number of unreserved concurrent Lambda executions has exceeded 80% of our account limit in {{account}}. If the limit is reached Lambda executions will start to be throttled by AWS. We should determine if there's a function being executed more often than expected or if we should request a limit increase for the account. ",
	"tags": [],
	"options": {
		"notify_audit": true,
		"locked": false,
		"timeout_h": 0,
		"new_host_delay": 300,
		"require_full_window": true,
		"notify_no_data": false,
		"renotify_interval": "0",
		"evaluation_delay": 300,
		"escalation_message": "",
		"no_data_timeframe": null,
		"include_tags": true,
		"thresholds": {
			"critical": 800
		}
	},
	"priority": 1
}

When I tried to convert, I received the following error message: ❗️Conversion for "priority" not found

If I remove the priority key from the JSON the HCL is generated correctly.

It seems like this might be a new property added to Datadog since this extension was last released? It looks like it is supported in the terraform provider:

priority (Number)

Expected behavior
I expect that this property would be supported and generate the correct terraform configuration.

Screenshots

System info (please complete the following information):

  • OS: MacOs Big Sur
  • Browser: Firefox
  • Version: 84.0.2

Thank you for the perfectly detailed issue! Really appreciate it. I'll fix and release this tomorrow :)