From 41b6695f6107912e74901d85a3e2141d81bf2b35 Mon Sep 17 00:00:00 2001 From: zjhe Date: Fri, 19 May 2023 14:05:46 +0800 Subject: [PATCH] fix nil panic by correcting nil check expression --- .../services/containers/kubernetes_cluster_data_source.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/containers/kubernetes_cluster_data_source.go b/internal/services/containers/kubernetes_cluster_data_source.go index 5aa4ed495fc0..dcc5279b968f 100644 --- a/internal/services/containers/kubernetes_cluster_data_source.go +++ b/internal/services/containers/kubernetes_cluster_data_source.go @@ -896,12 +896,12 @@ func flattenKubernetesClusterDataSourceStorageProfile(input *managedclusters.Man } diskVersion := "" - if input.FileCSIDriver != nil { + if input.DiskCSIDriver != nil { diskVersion = *input.DiskCSIDriver.Version } fileEnabled := true - if input.DiskCSIDriver != nil { + if input.FileCSIDriver != nil { fileEnabled = *input.FileCSIDriver.Enabled }