Provider does not update the state when alert is deleted externally
Closed this issue · 3 comments
alonz commented
Steps to reproduce:
- Create an alert using terraform
- Delete the alert manually (API / Web interface, e.g externally to terraform)
- 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
Gelevb commented
Hi @mirii1994 we met the same issue