From 08b343283e5594efa1efd075eabb02943a47f14a Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:57:26 +0800 Subject: [PATCH 1/2] bugfix #23290 Signed-off-by: ziyeqf <51212351+ziyeqf@users.noreply.github.com> --- .../services/appconfiguration/app_configuration_resource.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/services/appconfiguration/app_configuration_resource.go b/internal/services/appconfiguration/app_configuration_resource.go index ef9a52ed8462..437b399c47c1 100644 --- a/internal/services/appconfiguration/app_configuration_resource.go +++ b/internal/services/appconfiguration/app_configuration_resource.go @@ -651,7 +651,13 @@ func expandAppConfigurationEncryption(input []interface{}) *configurationstores. return nil } + raw := input[0] + if raw == nil { + return nil + } + encryptionParam := input[0].(map[string]interface{}) + result := &configurationstores.EncryptionProperties{ KeyVaultProperties: &configurationstores.KeyVaultProperties{}, } From d73e80619eb5b09efc6af8ce5b00e4aea96ea81c Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:16:31 +0800 Subject: [PATCH 2/2] update per comment Signed-off-by: ziyeqf <51212351+ziyeqf@users.noreply.github.com> --- .../appconfiguration/app_configuration_resource.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/services/appconfiguration/app_configuration_resource.go b/internal/services/appconfiguration/app_configuration_resource.go index 437b399c47c1..4c1bd7415e50 100644 --- a/internal/services/appconfiguration/app_configuration_resource.go +++ b/internal/services/appconfiguration/app_configuration_resource.go @@ -647,12 +647,7 @@ type flattenedAccessKeys struct { } func expandAppConfigurationEncryption(input []interface{}) *configurationstores.EncryptionProperties { - if len(input) == 0 { - return nil - } - - raw := input[0] - if raw == nil { + if len(input) == 0 || input[0] == nil { return nil }