From 476c821360874b53c8c99186dbd70af213244535 Mon Sep 17 00:00:00 2001 From: jackofallops Date: Wed, 30 Mar 2022 14:53:33 +0100 Subject: [PATCH] fixup kind validation for CustomImporter --- internal/services/appservice/windows_function_app_resource.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/services/appservice/windows_function_app_resource.go b/internal/services/appservice/windows_function_app_resource.go index 02ba8a6188af..e4113764f044 100644 --- a/internal/services/appservice/windows_function_app_resource.go +++ b/internal/services/appservice/windows_function_app_resource.go @@ -826,7 +826,8 @@ func (r WindowsFunctionAppResource) CustomImporter() sdk.ResourceRunFunc { if err != nil || sp.Kind == nil { return fmt.Errorf("reading Service Plan for Windows %s: %+v", id, err) } - if strings.Contains(strings.ToLower(*sp.Kind), "linux") || !(strings.Contains(strings.ToLower(*sp.Kind), "elastic") || strings.Contains(strings.ToLower(*sp.Kind), "functionapp") || strings.Contains(strings.ToLower(*sp.Kind), "app")) { + + if strings.Contains(strings.ToLower(*sp.Kind), "linux") { return fmt.Errorf("specified Service Plan is not a Windows Functionapp plan") }