From 5a6ac54230f4eca000bef8e4c09d0b4ba02c86ef Mon Sep 17 00:00:00 2001 From: Literate Snow Date: Thu, 29 Jul 2021 11:51:14 -0600 Subject: [PATCH 1/2] Windows function app slots on premium plans require the WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE settings. --- .../internal/services/web/function_app_slot_resource.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azurerm/internal/services/web/function_app_slot_resource.go b/azurerm/internal/services/web/function_app_slot_resource.go index c72f30e9cf3f..616c6e622d1c 100644 --- a/azurerm/internal/services/web/function_app_slot_resource.go +++ b/azurerm/internal/services/web/function_app_slot_resource.go @@ -655,9 +655,11 @@ func getBasicFunctionAppSlotAppSettings(d *pluginsdk.ResourceData, appServiceTie {Name: &contentFileConnStringPropName, Value: &storageConnection}, } - // On consumption and premium plans include WEBSITE_CONTENT components - if strings.EqualFold(appServiceTier, "dynamic") || strings.EqualFold(appServiceTier, "elasticpremium") { - return append(basicSettings, consumptionSettings...) + // On consumption and premium plans include WEBSITE_CONTENT components, unless it's a Linux consumption plan + // (see https://github.com/Azure/azure-functions-python-worker/issues/598) + if (strings.EqualFold(appServiceTier, "dynamic") || strings.EqualFold(appServiceTier, "elasticpremium") || strings.HasPrefix(strings.ToLower(appServiceTier), "premium")) && + !strings.EqualFold(d.Get("os_type").(string), "linux") { + return append(basicSettings, consumptionSettings...), nil } return basicSettings From e4f0d92c72c916116c08ec5629c406cf8302772c Mon Sep 17 00:00:00 2001 From: Literate Snow Date: Thu, 29 Jul 2021 12:44:47 -0600 Subject: [PATCH 2/2] Fix return parameter. --- azurerm/internal/services/web/function_app_slot_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/internal/services/web/function_app_slot_resource.go b/azurerm/internal/services/web/function_app_slot_resource.go index 616c6e622d1c..1a476b9ba5f4 100644 --- a/azurerm/internal/services/web/function_app_slot_resource.go +++ b/azurerm/internal/services/web/function_app_slot_resource.go @@ -659,7 +659,7 @@ func getBasicFunctionAppSlotAppSettings(d *pluginsdk.ResourceData, appServiceTie // (see https://github.com/Azure/azure-functions-python-worker/issues/598) if (strings.EqualFold(appServiceTier, "dynamic") || strings.EqualFold(appServiceTier, "elasticpremium") || strings.HasPrefix(strings.ToLower(appServiceTier), "premium")) && !strings.EqualFold(d.Get("os_type").(string), "linux") { - return append(basicSettings, consumptionSettings...), nil + return append(basicSettings, consumptionSettings...) } return basicSettings