ojongerius / terraform-provider-datadog

A Terraform plugin to manage Datadog resources.
Mozilla Public License 2.0
29 stars 6 forks source link

Fix dashboard synchronisation #3

Closed ojongerius closed 9 years ago

ojongerius commented 9 years ago

If a dashboard gets deleted via an external source, the API will return a '404 Not Found'. Refreshing the resource does not catch this (valid) responds and errors out:

> terraform refresh
datadog_graph.baz: Refreshing state... (ID: 1438235042)
datadog_monitor.test_monitor: Refreshing state... (ID: 240870__240871)
datadog_dashboard.foo: Refreshing state... (ID: 60697)
Error refreshing state: 2 error(s) occurred:

* 1 error(s) occurred:

* Error retrieving dashboard: API error: 404 Not Found
* Error retrieving associated dashboard: API error: 404 Not Found
ojongerius commented 9 years ago

Fixed by https://github.com/ojongerius/terraform-provider-datadog/commit/5818ff16522eb9a2a6691dfa3d9d66458b3d0148, https://github.com/ojongerius/terraform-provider-datadog/commit/ebb876d8a9c44fe022d69d7f411e2b9f6b460feb and https://github.com/ojongerius/terraform-provider-datadog/commit/5311849b69bbabc42f4e5d8b289a64b0c9320ead.