diff --git a/azurerm/resource_arm_app_service_plan.go b/azurerm/resource_arm_app_service_plan.go
index <HASH>..<HASH> 100644
--- a/azurerm/resource_arm_app_service_plan.go
+++ b/azurerm/resource_arm_app_service_plan.go
@@ -270,8 +270,10 @@ func expandAppServicePlanProperties(d *schema.ResourceData, name string) *web.Ap
 	config := configs[0].(map[string]interface{})
 
 	appServiceEnvironmentId := config["app_service_environment_id"].(string)
-	properties.HostingEnvironmentProfile = &web.HostingEnvironmentProfile{
-		ID: utils.String(appServiceEnvironmentId),
+	if appServiceEnvironmentId != "" {
+		properties.HostingEnvironmentProfile = &web.HostingEnvironmentProfile{
+			ID: utils.String(appServiceEnvironmentId),
+		}
 	}
 
 	perSiteScaling := config["per_site_scaling"].(bool)
Only setting the App Service Environment ID if it's specified