From c7169a326516c30ce4ccb6c0f666c7ae50234d94 Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Wed, 16 Aug 2023 16:07:03 +0300 Subject: [PATCH] Handle gone gracefully in read for azurerm_web_application_firewall_policy Signed-off-by: Hasan Turken --- .../network/web_application_firewall_policy_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/network/web_application_firewall_policy_resource.go b/internal/services/network/web_application_firewall_policy_resource.go index 452017184df0..9f0ada606ccd 100644 --- a/internal/services/network/web_application_firewall_policy_resource.go +++ b/internal/services/network/web_application_firewall_policy_resource.go @@ -537,7 +537,7 @@ func resourceWebApplicationFirewallPolicyRead(d *pluginsdk.ResourceData, meta in resp, err := client.Get(ctx, *id) if err != nil { - if !response.WasNotFound(resp.HttpResponse) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] Web Application Firewall Policy %q does not exist - removing from state", d.Id()) d.SetId("") return nil