From e9d4380d6dfb9e2c2131220fae65930f4e4c7f29 Mon Sep 17 00:00:00 2001 From: Heng Lu <79895375+ms-henglu@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:33:42 +0800 Subject: [PATCH] `azurerm_kubernetes_cluster_node_pool` - respect pod disruption budget when delete the node pool (#26471) --- .../containers/kubernetes_cluster_node_pool_resource.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource.go b/internal/services/containers/kubernetes_cluster_node_pool_resource.go index 83341cdd0947..d0d865fbf3df 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource.go @@ -1122,10 +1122,7 @@ func resourceKubernetesClusterNodePoolDelete(d *pluginsdk.ResourceData, meta int return err } - ignorePodDisruptionBudget := true - err = client.DeleteThenPoll(ctx, *id, agentpools.DeleteOperationOptions{ - IgnorePodDisruptionBudget: &ignorePodDisruptionBudget, - }) + err = client.DeleteThenPoll(ctx, *id, agentpools.DefaultDeleteOperationOptions()) if err != nil { return fmt.Errorf("deleting %s: %+v", *id, err) }