germanbrew / terraform-provider-hetznerdns

Terraform provider for Hetzner DNS
https://registry.terraform.io/providers/germanbrew/hetznerdns/latest
Mozilla Public License 2.0
16 stars 0 forks source link

Resource Not Found does not remove record from state. #90

Closed jkroepke closed 2 months ago

jkroepke commented 2 months ago

On our system, it seems like some records are missing (thats fine)

The provider is mention that and tries to remove the staled resource from state. However. Nothing happens

╷ │ Warning: Resource Not Found │ │ with hetznerdns_record.opsstack_zone_delegations["cdt.dev@ns4-38.azure-dns.info."], │ on main.tf line 7, in resource "hetznerdns_record" "opsstack_zone_delegations": │ 7: resource "hetznerdns_record" "opsstack_zone_delegations" { │ │ DNS record with id "3555f7748abfac375b98e3471bd627f1" doesn't exist, removing it from state │ │ (and 2 more similar warnings elsewhere) ╵

kimdre commented 2 months ago

I can also reproduce this issue.

kimdre commented 2 months ago

Related lines are

https://github.com/germanbrew/terraform-provider-hetznerdns/blob/71801ea76b40cf51adbeb34301ac9e7185cf384a/internal/provider/record_resource.go#L266-L272