Skip to content

Commit

Permalink
Only setting the App Service Environment ID if it's specified
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Feb 17, 2018
1 parent 58399e3 commit 162801b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions azurerm/resource_arm_app_service_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 162801b

Please sign in to comment.