diff --git a/internal/services/containers/kubernetes_cluster_network_resource_test.go b/internal/services/containers/kubernetes_cluster_network_resource_test.go index 0631e65f477c2..5be8beab3393d 100644 --- a/internal/services/containers/kubernetes_cluster_network_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_network_resource_test.go @@ -867,13 +867,6 @@ func TestAccKubernetesCluster_networkPluginModeUpdate(t *testing.T) { ), }, data.ImportStep(), - { - Config: r.networkPluginBase(data), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), }) } diff --git a/internal/services/containers/kubernetes_cluster_resource.go b/internal/services/containers/kubernetes_cluster_resource.go index 80a0a5228387d..b538f5d4266b6 100644 --- a/internal/services/containers/kubernetes_cluster_resource.go +++ b/internal/services/containers/kubernetes_cluster_resource.go @@ -93,6 +93,9 @@ func resourceKubernetesCluster() *pluginsdk.Resource { } return nil }, + pluginsdk.ForceNewIfChange("network_profile.0.network_plugin_mode", func(ctx context.Context, _, new, meta interface{}) bool { + return new.(string) != string(managedclusters.NetworkPluginModeOverlay) || new != "Overlay" + }), ), Timeouts: &pluginsdk.ResourceTimeout{