Open stobias123 opened 2 years ago
You should be able to set force_delete
on the child monitor which should allow it to recreate even if referenced in composite monitors. This might need to happen in 2 steps: 1) apply force_delete on the resource 2) update the monitor to trigger recreation. Terraform sdk seem to ignore new fields when ForceNew
is triggered.
We've had to re-create lots of monitors after the
events
alert type deprecation in favor ofevents-v2
.Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
datadog_monitor
Terraform Configuration Files
Expected Behavior
Since there is a dependency on
datadog_monitor.recreated_monitior
fromdatadog_monitor.composite
, I expectdatadog_monitor
of typecomposite
to trigger destroy/recreate whenquery
value changes.Actual Behavior
When changing the below
recreated_monitor
toevents-v2
, aterraform plan
shows thatdatadog_monitior.recreated_monitor
must be replaced, this is expected.But on destroy, we get the below error.
Steps to Reproduce
Create monitors as described above. Taint the
recreated_monitor
resource. Observe api failure onterraform apply