logzio/terraform-provider-logzio

Provider does not update the state when alert is deleted externally

Closed this issue · 3 comments

alonz commented

Steps to reproduce:

  1. Create an alert using terraform
  2. Delete the alert manually (API / Web interface, e.g externally to terraform)
  3. Run terraform plan / apply command again

current behavior:
terraform command fails with

Error: API call GetAlertV2 failed with missing alert ...., data: {"errorCode":"Alerts/ALERT_NOT_FOUND","message":"alert id 1954709 not found","requestId":"b548481e-83df-40d8-b492-7fbb6715c6b5","parameters":{"alert-id":...}}

and require to manually remove the state using terraform state rm ....

Expected behavior:
upon encountering ALERT_NOT_FOUND response from API, the state should be updated accordingly so terraform plan will include the creation of the missing alert resource

Hi @alonz thanks for informing us. We'll work on a fix for this issue.

Hi @mirii1994 we met the same issue

Hi @alonz , we released v1.10.0 that should handle this issue.
Please let us know if the update solves it.