dynatrace-oss / terraform-provider-dynatrace

Apache License 2.0
70 stars 35 forks source link

Dashboards & Dashboard Presets timing issue #435

Closed Dynatrace-Reinhard-Pilz closed 6 months ago

Dynatrace-Reinhard-Pilz commented 7 months ago

Applying the resource dynatrace_dashboards_presets immediately after a dynatrace_json_dashboard has been created frequently fails. It looks like it takes a while until newly created Dashboards are ready to get referenced.

Planned solution: CREATE of dynatrace_json_dashboard should wait until attempts to define dynatrace_dashboards_presets reliably are getting accepted by the REST API. It's likely not enough to wait for just ONE attempt to be successful - these kinds of timing issues are very often related to cluster nodes not having received the update.

kishikawa12 commented 7 months ago

Possible solution: Similar to mgmz fix in #437, run a validate call against a generic dynatrace_dashboards_presets of the newly created dashboard until it returns successful. Permissions would be different, so if the token doesn't have permissions the additional validation wouldn't be present.