diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource.go b/internal/services/containers/kubernetes_cluster_node_pool_resource.go index f5bf4cf6dae49..db25ca0de6e13 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource.go @@ -700,8 +700,12 @@ func resourceKubernetesClusterNodePoolCreate(d *pluginsdk.ResourceData, meta int if subnetID != nil { // Wait for vnet to come back to Succeeded before releasing any locks - timeout, _ := ctx.Deadline() + timeout, ok := ctx.Deadline() + if !ok { + return fmt.Errorf("internal-error: context had no deadline") + } + // TODO: refactor this into a `custompoller` within the `network` package stateConf := &pluginsdk.StateChangeConf{ Pending: []string{string(subnets.ProvisioningStateUpdating)}, Target: []string{string(subnets.ProvisioningStateSucceeded)}, diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go b/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go index 903d2e25b2583..5f2bd4838f890 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go @@ -2979,7 +2979,7 @@ resource "azurerm_virtual_network" "test" { } resource "azurerm_subnet" "test" { - count = 20 + count = 8 name = "acctestsubnet%d${count.index}" resource_group_name = azurerm_resource_group.test.name virtual_network_name = azurerm_virtual_network.test.name