From 51689c036d3e174120ffebf807c61ee637fedcb4 Mon Sep 17 00:00:00 2001 From: jackofallops Date: Thu, 5 Jan 2023 13:07:26 +0100 Subject: [PATCH] remove old node workaround --- .../services/appservice/windows_web_app_resource.go | 2 +- .../appservice/windows_web_app_slot_resource.go | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/internal/services/appservice/windows_web_app_resource.go b/internal/services/appservice/windows_web_app_resource.go index b9725761f109..a6ffa0aa6f3b 100644 --- a/internal/services/appservice/windows_web_app_resource.go +++ b/internal/services/appservice/windows_web_app_resource.go @@ -576,7 +576,7 @@ func (r WindowsWebAppResource) Read() sdk.ResourceFunc { state.SiteConfig[0].ApplicationStack = make([]helpers.ApplicationStackWindows, 0) } state.SiteConfig[0].ApplicationStack[0].NodeVersion = nodeVer - delete(state.AppSettings, "WEBSITE_NODE_DEFAULT_VERSION") // TODO - Allow this to be set directly in app_settings? + delete(state.AppSettings, "WEBSITE_NODE_DEFAULT_VERSION") } // Zip Deploys are not retrievable, so attempt to get from config. This doesn't matter for imports as an unexpected value here could break the deployment. diff --git a/internal/services/appservice/windows_web_app_slot_resource.go b/internal/services/appservice/windows_web_app_slot_resource.go index c78fa2f2202f..83ca356dba1a 100644 --- a/internal/services/appservice/windows_web_app_slot_resource.go +++ b/internal/services/appservice/windows_web_app_slot_resource.go @@ -509,13 +509,11 @@ func (r WindowsWebAppSlotResource) Read() sdk.ResourceFunc { state.SiteConfig = helpers.FlattenSiteConfigWindowsAppSlot(webAppSiteConfig.SiteConfig, currentStack, healthCheckCount) if nodeVer, ok := state.AppSettings["WEBSITE_NODE_DEFAULT_VERSION"]; ok { - if nodeVer != "6.9.1" { // Slots appear to have an invalid value for this by default? - if state.SiteConfig[0].ApplicationStack == nil { - state.SiteConfig[0].ApplicationStack = make([]helpers.ApplicationStackWindows, 0) - } - state.SiteConfig[0].ApplicationStack[0].NodeVersion = nodeVer + if state.SiteConfig[0].ApplicationStack == nil { + state.SiteConfig[0].ApplicationStack = make([]helpers.ApplicationStackWindows, 0) } - delete(state.AppSettings, "WEBSITE_NODE_DEFAULT_VERSION") // TODO - Allow this to be set directly in app_settings? + state.SiteConfig[0].ApplicationStack[0].NodeVersion = nodeVer + delete(state.AppSettings, "WEBSITE_NODE_DEFAULT_VERSION") } // Zip Deploys are not retrievable, so attempt to get from config. This doesn't matter for imports as an unexpected value here could break the deployment.