germanbrew / terraform-provider-hetznerdns

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

fix: remove stale resources from state #91

Closed kimdre closed 4 months ago

kimdre commented 4 months ago

Stale resources will now get deleted from the state on Read execution instead of showing a Warning: Resource Not Found

jkroepke commented 4 months ago

Is this testable?

kimdre commented 4 months ago

Is this testable?

Should be no problem. I will add a test.

kimdre commented 4 months ago

@jkroepke The TestAccPrimaryServer_StalePrimaryServersResources test fails with a runtime error. Could you maybe check if you can find the error? The other two test are working fine.

jkroepke commented 4 months ago

Leider unsauber geschrieben.

https://github.com/germanbrew/terraform-provider-hetznerdns/blob/71801ea76b40cf51adbeb34301ac9e7185cf384a/internal/api/primary_server.go#L36-L38

gibt auch nil bei not found zurück, aber auch keinen Fehler.

Daher Nil Pointer panic

kimdre commented 4 months ago

Should be fixed now.