Skip to content

Commit

Permalink
azurerm_windows_function_app - fix import check for Service Plan `k…
Browse files Browse the repository at this point in the history
…ind` (#16164)
  • Loading branch information
jackofallops authored Mar 31, 2022
1 parent b3dcf24 commit 2375751
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 2375751

Please sign in to comment.