From 9c4bdcacfa6908181b18a831d0a68af696b36ad3 Mon Sep 17 00:00:00 2001 From: chenhanzhang Date: Wed, 25 Sep 2024 23:55:33 +0800 Subject: [PATCH] resource/alicloud_nlb_listener: Improved error handle when destroying nlb listener. --- alicloud/resource_alicloud_nlb_listener.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alicloud/resource_alicloud_nlb_listener.go b/alicloud/resource_alicloud_nlb_listener.go index cad85457d631..1748734e3872 100644 --- a/alicloud/resource_alicloud_nlb_listener.go +++ b/alicloud/resource_alicloud_nlb_listener.go @@ -529,6 +529,9 @@ func resourceAliCloudNlbListenerDelete(d *schema.ResourceData, meta interface{}) }) if err != nil { + if IsExpectedErrors(err, []string{"ResourceNotFound.listener"}) { + return nil + } return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) }