You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a terraform plan with an update to a composite monitor and a delete for individual monitor used by that composite monitor.
It should be able to successfully delete the individual monitor and update the composite monitor to not use that deleted monitor.
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
- destroy
Actual Behavior
Since composite monitor is still using a reference to the monitor ID that we are trying to delete it fails the terraform apply altogether.
No way to order the steps to make sure it updates the composite monitor before deleting inidividual monitor
Error: 400 Bad Request: {"errors":["Monitor is part of the following composite monitors] .....
Error: API error 401 Unauthorized: {"errors":["monitor [xxxxYYYY, [monitor-A] is referenced in monitor-B]"]}
The text was updated successfully, but these errors were encountered:
I have exact same issue.
However, even-though datadog_monitor is missing such an attribute, I think this is datadog side issue.
I'm not able to force delete the monitor via API: curl -X DELETE "https://api.datadoghq.com/api/v1/monitor/${monitor_id}?force=true&api_key=${api_key}&application_key=${app_key}"
{"errors":["Monitor is part of the following composite monitors: Test composite"]}
After communication with Datadog support, their engineering team fixed the API.
I opened a pull request to add force_delete parameter to datadog_monitor resource.
Terraform Version
Terraform v0.12.26
Affected Resource(s)
Debug Output
Expected Behavior
Given a terraform plan with an update to a composite monitor and a delete for individual monitor used by that composite monitor.
It should be able to successfully delete the individual monitor and update the composite monitor to not use that deleted monitor.
Actual Behavior
Since composite monitor is still using a reference to the monitor ID that we are trying to delete it fails the terraform apply altogether.
https://docs.datadoghq.com/api/v1/monitors/#delete-a-monitor
The text was updated successfully, but these errors were encountered: