From ebab1e7154b82348cfe37470766f2da1c8a53b04 Mon Sep 17 00:00:00 2001 From: Steph Date: Tue, 23 Aug 2022 07:05:14 +0200 Subject: [PATCH] nil check first element when expanding upgrade settings --- .../containers/kubernetes_cluster_node_pool_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/containers/kubernetes_cluster_node_pool_resource.go b/internal/services/containers/kubernetes_cluster_node_pool_resource.go index 611a67904d08..7918f71ec551 100644 --- a/internal/services/containers/kubernetes_cluster_node_pool_resource.go +++ b/internal/services/containers/kubernetes_cluster_node_pool_resource.go @@ -918,7 +918,7 @@ func upgradeSettingsForDataSourceSchema() *pluginsdk.Schema { func expandUpgradeSettings(input []interface{}) *containerservice.AgentPoolUpgradeSettings { setting := &containerservice.AgentPoolUpgradeSettings{} - if len(input) == 0 { + if len(input) == 0 || input[0] == nil { return setting }