diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go index 43b3388ae6cc..83e711de146e 100644 --- a/internal/services/appservice/helpers/function_app_schema.go +++ b/internal/services/appservice/helpers/function_app_schema.go @@ -1061,6 +1061,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema { ValidateFunc: validation.StringInSlice([]string{ "12", "14", + "16", // preview LTS Support }, false), ExactlyOneOf: []string{ "site_config.0.application_stack.0.dotnet_version", @@ -1284,8 +1285,9 @@ func windowsFunctionAppStackSchema() *pluginsdk.Schema { Type: pluginsdk.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{ - "12", - "14", + "~12", + "~14", + "~16", }, false), ExactlyOneOf: []string{ "site_config.0.application_stack.0.dotnet_version", diff --git a/internal/services/appservice/linux_function_app_resource_test.go b/internal/services/appservice/linux_function_app_resource_test.go index 5feaf9cc1b55..becfe5a5947b 100644 --- a/internal/services/appservice/linux_function_app_resource_test.go +++ b/internal/services/appservice/linux_function_app_resource_test.go @@ -671,7 +671,7 @@ func TestAccLinuxFunctionApp_appStackNode(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.appStackNode(data, SkuBasicPlan, "14"), + Config: r.appStackNode(data, SkuConsumptionPlan, "14"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), @@ -694,6 +694,14 @@ func TestAccLinuxFunctionApp_appStackNodeUpdate(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.appStackNode(data, SkuBasicPlan, "16"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + ), + }, + data.ImportStep(), { Config: r.appStackNode(data, SkuBasicPlan, "14"), Check: acceptance.ComposeTestCheckFunc( diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index e54f7602b127..a049f87b7049 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -673,7 +673,7 @@ func TestAccWindowsFunctionApp_appStackNode(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.appStackNode(data, SkuBasicPlan, "14"), + Config: r.appStackNode(data, SkuConsumptionPlan, "~14"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp"), @@ -689,7 +689,7 @@ func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.appStackNode(data, SkuBasicPlan, "12"), + Config: r.appStackNode(data, SkuBasicPlan, "~12"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp"), @@ -697,7 +697,15 @@ func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { }, data.ImportStep(), { - Config: r.appStackNode(data, SkuBasicPlan, "14"), + Config: r.appStackNode(data, SkuBasicPlan, "~16"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep(), + { + Config: r.appStackNode(data, SkuBasicPlan, "~14"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("kind").HasValue("functionapp"), diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index 48b1450855c3..1c9c8d4643c6 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -136,7 +136,7 @@ A `application_stack` block supports the following: * `java_version` - (Optional) The Version of Java to use. Supported versions include `8`, and `11`. -* `node_version` - (Optional) The version of Node to run. Possible values include `12`, and `14`. +* `node_version` - (Optional) The version of Node to run. Possible values include `12`, `14`, and `16`. * `python_version` - (Optional) The version of Python to run. Possible values include `3.6`, `3.7`, `3.8`, and `3.9`. diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 67338d094110..dba2b12cbfe7 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -134,7 +134,7 @@ A `application_stack` block supports the following: * `java_version` - (Optional) The Version of Java to use. Supported versions include `8`, and `11`. -* `node_version` - (Optional) The version of Node to run. Possible values include `12`, and `14`. +* `node_version` - (Optional) The version of Node to run. Possible values include `~12`, `~14`, and `~16`. * `powershell_core_version` - (Optional) The version of PowerShell Core to run. Possible values are `7`.