From d2bd93bd6e50fa6c8dd6133e6834e3b5f13ae857 Mon Sep 17 00:00:00 2001 From: Xiaxin Date: Thu, 30 Nov 2023 10:34:11 +0800 Subject: [PATCH 1/7] update runtime version & change the default value for basic auth related properties --- .../services/appservice/helpers/app_stack.go | 5 +++- .../appservice/helpers/function_app_schema.go | 2 ++ .../windows_function_app_resource_test.go | 16 ++++++++++ ...windows_function_app_slot_resource_test.go | 8 +++++ .../appservice/windows_web_app_resource.go | 4 +-- .../windows_web_app_resource_test.go | 30 +++++++++++++++++++ .../windows_web_app_slot_resource_test.go | 30 +++++++++++++++++++ .../docs/r/linux_function_app.html.markdown | 2 +- .../r/linux_function_app_slot.html.markdown | 2 +- website/docs/r/linux_web_app.html.markdown | 8 ++--- .../docs/r/linux_web_app_slot.html.markdown | 4 +-- .../docs/r/windows_function_app.html.markdown | 2 +- .../r/windows_function_app_slot.html.markdown | 2 +- website/docs/r/windows_web_app.html.markdown | 7 +++-- .../docs/r/windows_web_app_slot.html.markdown | 2 +- 15 files changed, 107 insertions(+), 17 deletions(-) diff --git a/internal/services/appservice/helpers/app_stack.go b/internal/services/appservice/helpers/app_stack.go index ff9c74aafdb6..e8dfdbafabb8 100644 --- a/internal/services/appservice/helpers/app_stack.go +++ b/internal/services/appservice/helpers/app_stack.go @@ -87,7 +87,8 @@ func windowsApplicationStackSchema() *pluginsdk.Schema { "v4.0", "v5.0", "v6.0", - "v7.0"}, false), + "v7.0", + "v8.0"}, false), AtLeastOneOf: windowsApplicationStackConstraint, }, @@ -462,6 +463,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema { "5.0", // deprecated "6.0", "7.0", + "8.0", }, false), ExactlyOneOf: linuxApplicationStackConstraint, }, @@ -509,6 +511,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema { "14-lts", "16-lts", "18-lts", + "20-lts", }, false), ExactlyOneOf: linuxApplicationStackConstraint, }, diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go index b4fc9cea41b8..116f3357292d 100644 --- a/internal/services/appservice/helpers/function_app_schema.go +++ b/internal/services/appservice/helpers/function_app_schema.go @@ -1078,6 +1078,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema { "14", "16", "18", // preview LTS Support + "20", }, false), ExactlyOneOf: []string{ "site_config.0.application_stack.0.dotnet_version", @@ -1330,6 +1331,7 @@ func windowsFunctionAppStackSchema() *pluginsdk.Schema { "~14", "~16", "~18", + "~20", }, false), ExactlyOneOf: []string{ "site_config.0.application_stack.0.dotnet_version", diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index 469eb8b25827..2e5cfee1d212 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1021,6 +1021,22 @@ func TestAccWindowsFunctionApp_appStackNode18(t *testing.T) { }) } +func TestAccWindowsFunctionApp_appStackNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") + r := WindowsFunctionAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.appStackNode(data, SkuConsumptionPlan, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") r := WindowsFunctionAppResource{} diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index a2bf08ed38d3..a88d66bdd26b 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -730,6 +730,14 @@ func TestAccWindowsFunctionAppSlot_appStackNodeUpdate(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.appStackNode(data, SkuStandardPlan, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep(), }) } diff --git a/internal/services/appservice/windows_web_app_resource.go b/internal/services/appservice/windows_web_app_resource.go index ec45ee73cc30..da69917c2fd8 100644 --- a/internal/services/appservice/windows_web_app_resource.go +++ b/internal/services/appservice/windows_web_app_resource.go @@ -167,13 +167,13 @@ func (r WindowsWebAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaWindows(), diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index 5f715d62a497..c2121e695600 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -661,6 +661,21 @@ func TestAccWindowsWebApp_withDotNet70(t *testing.T) { }) } +func TestAccWindowsWebApp_withDotNet80(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.dotNet(data, "v8.0"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebApp_withPhp(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") r := WindowsWebAppResource{} @@ -991,6 +1006,21 @@ func TestAccWindowsWebApp_withNode18(t *testing.T) { }) } +func TestAccWindowsWebApp_withNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebApp_withMultiStack(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") r := WindowsWebAppResource{} diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 966ed62dcab2..9f97fe3b7558 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -629,6 +629,21 @@ func TestAccWindowsWebAppSlot_withDotNet7(t *testing.T) { }) } +func TestAccWindowsWebAppSlot_withDotNet8(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") + r := WindowsWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.dotNet(data, "v8.0"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebAppSlot_withPhp74(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") r := WindowsWebAppSlotResource{} @@ -704,6 +719,21 @@ func TestAccWindowsWebAppSlot_withNode18(t *testing.T) { }) } +func TestAccWindowsWebAppSlot_withNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") + r := WindowsWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebAppSlot_withNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") r := WindowsWebAppSlotResource{} diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index e725e358723e..72baa116b5e4 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -173,7 +173,7 @@ A `application_stack` block supports the following: * `java_version` - (Optional) The Version of Java to use. Supported versions include `8`, `11` & `17`. -* `node_version` - (Optional) The version of Node to run. Possible values include `12`, `14`, `16` and `18`. +* `node_version` - (Optional) The version of Node to run. Possible values include `12`, `14`, `16`, `18` and `20`. * `python_version` - (Optional) The version of Python to run. Possible values are `3.11`, `3.10`, `3.9`, `3.8` and `3.7`. diff --git a/website/docs/r/linux_function_app_slot.html.markdown b/website/docs/r/linux_function_app_slot.html.markdown index c4920b270939..43b728d5eea0 100644 --- a/website/docs/r/linux_function_app_slot.html.markdown +++ b/website/docs/r/linux_function_app_slot.html.markdown @@ -632,7 +632,7 @@ An `application_stack` block supports the following: * `java_version` - (Optional) The version of Java to use. Possible values are `8`, `11` & `17` (In-Preview). -* `node_version` - (Optional) The version of Node to use. Possible values include `12`, `14`, `16` and `18` +* `node_version` - (Optional) The version of Node to use. Possible values include `12`, `14`, `16`, `18` and `20` * `powershell_core_version` - (Optional) The version of PowerShell Core to use. Possibles values are `7` , and `7.2`. diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index 5e17cc0fe389..a230dc716792 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -79,7 +79,7 @@ The following arguments are supported: * `enabled` - (Optional) Should the Linux Web App be enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. * `https_only` - (Optional) Should the Linux Web App require HTTPS connections. @@ -101,7 +101,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`true`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. @@ -156,7 +156,7 @@ An `application_stack` block supports the following: ~> **NOTE:** `docker_registry_url`, `docker_registry_username`, and `docker_registry_password` replace the use of the `app_settings` values of `DOCKER_REGISTRY_SERVER_URL`, `DOCKER_REGISTRY_SERVER_USERNAME` and `DOCKER_REGISTRY_SERVER_PASSWORD` respectively, these values will be managed by the provider and should not be specified in the `app_settings` map. -* `dotnet_version` - (Optional) The version of .NET to use. Possible values include `3.1`, `5.0`, `6.0` and `7.0`. +* `dotnet_version` - (Optional) The version of .NET to use. Possible values include `3.1`, `5.0`, `6.0`, `7.0` and `8.0`. * `go_version` - (Optional) The version of Go to use. Possible values include `1.18`, and `1.19`. @@ -170,7 +170,7 @@ An `application_stack` block supports the following: ~> **NOTE:** The valid version combinations for `java_version`, `java_server` and `java_server_version` can be checked from the command line via `az webapp list-runtimes --linux`. -* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, and `18-lts`. This property conflicts with `java_version`. +* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, `18-lts` and `20-lts`. This property conflicts with `java_version`. ~> **NOTE:** 10.x versions have been/are being deprecated so may cease to work for new resources in the future and may be removed from the provider. diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index 04cab3c48d51..45567170019e 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -158,7 +158,7 @@ An `application_stack` block supports the following: ~> **NOTE:** `docker_registry_url`, `docker_registry_username`, and `docker_registry_password` replace the use of the `app_settings` values of `DOCKER_REGISTRY_SERVER_URL`, `DOCKER_REGISTRY_SERVER_USERNAME` and `DOCKER_REGISTRY_SERVER_PASSWORD` respectively, these values will be managed by the provider and should not be specified in the `app_settings` map. -* `dotnet_version` - (Optional) The version of .NET to use. Possible values include `3.1`, `5.0`, `6.0` and `7.0`. +* `dotnet_version` - (Optional) The version of .NET to use. Possible values include `3.1`, `5.0`, `6.0`, `7.0` and `v8.0`. * `go_version` - (Optional) The version of Go to use. Possible values include `1.18`, and `1.19`. @@ -172,7 +172,7 @@ An `application_stack` block supports the following: ~> **NOTE:** The valid version combinations for `java_version`, `java_server` and `java_server_version` can be checked from the command line via `az webapp list-runtimes --linux`. -* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, and `18-lts`. This property conflicts with `java_version`. +* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, `18-lts` and `20-lts`. This property conflicts with `java_version`. ~> **NOTE:** 10.x versions have been/are being deprecated so may cease to work for new resources in the future and may be removed from the provider. diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 832f7a4745d2..c892ca7701ec 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -171,7 +171,7 @@ A `application_stack` block supports the following: * `java_version` - (Optional) The Version of Java to use. Supported versions include `1.8`, `11` & `17` (In-Preview). -* `node_version` - (Optional) The version of Node to run. Possible values include `~12`, `~14`, `~16` and `~18`. +* `node_version` - (Optional) The version of Node to run. Possible values include `~12`, `~14`, `~16`, `~18` and `~20`. * `powershell_core_version` - (Optional) The version of PowerShell Core to run. Possible values are `7`, and `7.2`. diff --git a/website/docs/r/windows_function_app_slot.html.markdown b/website/docs/r/windows_function_app_slot.html.markdown index a0a703713b10..40b24c2460b2 100644 --- a/website/docs/r/windows_function_app_slot.html.markdown +++ b/website/docs/r/windows_function_app_slot.html.markdown @@ -625,7 +625,7 @@ An `application_stack` block supports the following: * `java_version` - (Optional) The version of Java to use. Possible values are `1.8`, `11` and `17` (In-Preview). -* `node_version` - (Optional) The version of Node to use. Possible values are `~12`, `~14`, `~16` and `~18`. +* `node_version` - (Optional) The version of Node to use. Possible values are `~12`, `~14`, `~16`, `~18` and `~20`. * `powershell_core_version` - (Optional) The PowerShell Core version to use. Possible values are `7`, and `7.2`. diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index abdcb30ee95d..6115f30da076 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -76,7 +76,7 @@ The following arguments are supported: * `enabled` - (Optional) Should the Windows Web App be enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. * `https_only` - (Optional) Should the Windows Web App require HTTPS connections. @@ -102,7 +102,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`true`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. @@ -166,7 +166,7 @@ An `application_stack` block supports the following: * `docker_container_tag` - (Optional) The tag of the container to be used. This value is required with `docker_container_name`. -* `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0` and `v7.0`. +* `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0`, `v7.0` and `v8.0`. ~> **NOTE:** The Portal displayed values and the actual underlying API values differ for this setting, as follows: Portal Value | API value @@ -175,6 +175,7 @@ ASP.NET V3.5 | v2.0 ASP.NET V4.8 | v4.0 .NET 6 (LTS) | v6.0 .NET 7 (STS) | v7.0 +.NET 8 (LTS) | v8.0 * `dotnet_core_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnetcore`. Possible values include `v4.0`. diff --git a/website/docs/r/windows_web_app_slot.html.markdown b/website/docs/r/windows_web_app_slot.html.markdown index de3bf5159d8c..628eca13127e 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -168,7 +168,7 @@ An `application_stack` block supports the following: * `docker_container_tag` - (Optional) The tag of the container to be used. This value is required with `docker_container_name`. -* `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0` and `v7.0`. +* `dotnet_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnet`. Possible values include `v2.0`,`v3.0`, `v4.0`, `v5.0`, `v6.0`, `v7.0` and `v8.0`. * `dotnet_core_version` - (Optional) The version of .NET to use when `current_stack` is set to `dotnetcore`. Possible values include `v4.0`. From b6b90d7e84cb7cb8cf1ee07decf06fd0d55543fd Mon Sep 17 00:00:00 2001 From: Xiaxin Date: Thu, 30 Nov 2023 11:31:02 +0800 Subject: [PATCH 2/7] update --- .../linux_function_app_resource_test.go | 9 +++++++++ .../linux_function_app_slot_resource_test.go | 9 +++++++++ .../appservice/windows_web_app_resource_test.go | 15 --------------- website/docs/r/linux_function_app.html.markdown | 4 ++-- website/docs/r/windows_function_app.html.markdown | 4 ++-- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/internal/services/appservice/linux_function_app_resource_test.go b/internal/services/appservice/linux_function_app_resource_test.go index 0316cf7810ad..a30e2b4e580c 100644 --- a/internal/services/appservice/linux_function_app_resource_test.go +++ b/internal/services/appservice/linux_function_app_resource_test.go @@ -1097,6 +1097,15 @@ func TestAccLinuxFunctionApp_appStackNodeUpdate(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.appStackNode(data, SkuBasicPlan, "20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|20"), + ), + }, + data.ImportStep(), { Config: r.appStackNode(data, SkuBasicPlan, "14"), Check: acceptance.ComposeTestCheckFunc( diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index e79b7af93db8..39eb3849ab9e 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -803,6 +803,15 @@ func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.appStackNode(data, SkuStandardPlan, "20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"), + check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|20"), + ), + }, + data.ImportStep(), { Config: r.appStackNodeUpdateTags(data, SkuStandardPlan, "18"), Check: acceptance.ComposeTestCheckFunc( diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index c2121e695600..df737c507a65 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1006,21 +1006,6 @@ func TestAccWindowsWebApp_withNode18(t *testing.T) { }) } -func TestAccWindowsWebApp_withNode20(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") - r := WindowsWebAppResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.node(data, "~20"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - func TestAccWindowsWebApp_withMultiStack(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") r := WindowsWebAppResource{} diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index 72baa116b5e4..edc6ba6a3b08 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -103,7 +103,7 @@ The following arguments are supported: * `functions_extension_version` - (Optional) The runtime version associated with the Function App. Defaults to `~4`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. * `https_only` - (Optional) Can the Function App only be accessed via HTTPS? Defaults to `false`. @@ -139,7 +139,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`true`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index c892ca7701ec..0faf81df3c25 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -101,7 +101,7 @@ The following arguments are supported: * `enabled` - (Optional) Is the Function App enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. * `functions_extension_version` - (Optional) The runtime version associated with the Function App. Defaults to `~4`. @@ -139,7 +139,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`true`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. From 0dedc41f5327f5d891b043d2223cb94fba28cabe Mon Sep 17 00:00:00 2001 From: Xiaxin Date: Thu, 30 Nov 2023 13:50:33 +0800 Subject: [PATCH 3/7] update --- .../appservice/linux_function_app_resource.go | 4 ++-- .../linux_function_app_slot_resource.go | 4 ++-- .../linux_function_app_slot_resource_test.go | 1 + .../services/appservice/linux_web_app_resource.go | 4 ++-- .../appservice/linux_web_app_resource_test.go | 15 +++++++++++++++ .../appservice/linux_web_app_slot_resource.go | 4 ++-- .../appservice/windows_function_app_resource.go | 4 ++-- .../windows_function_app_resource_test.go | 1 + .../windows_function_app_slot_resource.go | 4 ++-- .../windows_function_app_slot_resource_test.go | 1 + .../appservice/windows_web_app_resource_test.go | 15 +++++++++++++++ .../appservice/windows_web_app_slot_resource.go | 4 ++-- .../windows_web_app_slot_resource_test.go | 15 --------------- 13 files changed, 47 insertions(+), 29 deletions(-) diff --git a/internal/services/appservice/linux_function_app_resource.go b/internal/services/appservice/linux_function_app_resource.go index 0f7741ca081d..e8abfc33fac3 100644 --- a/internal/services/appservice/linux_function_app_resource.go +++ b/internal/services/appservice/linux_function_app_resource.go @@ -267,13 +267,13 @@ func (r LinuxFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaLinuxFunctionApp(), diff --git a/internal/services/appservice/linux_function_app_slot_resource.go b/internal/services/appservice/linux_function_app_slot_resource.go index 509621cdfa95..f1e4b45d3fb1 100644 --- a/internal/services/appservice/linux_function_app_slot_resource.go +++ b/internal/services/appservice/linux_function_app_slot_resource.go @@ -258,13 +258,13 @@ func (r LinuxFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaLinuxFunctionAppSlot(), diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index 39eb3849ab9e..1f0a214dfd65 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -771,6 +771,7 @@ func TestAccLinuxFunctionAppSlot_appStackNode(t *testing.T) { }) } +// nolint: unparam func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test") r := LinuxFunctionAppSlotResource{} diff --git a/internal/services/appservice/linux_web_app_resource.go b/internal/services/appservice/linux_web_app_resource.go index e32a12052faf..869ae45564ce 100644 --- a/internal/services/appservice/linux_web_app_resource.go +++ b/internal/services/appservice/linux_web_app_resource.go @@ -175,13 +175,13 @@ func (r LinuxWebAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaLinux(), diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index 4cbaadf8f0f8..ed48ef6c8588 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -879,6 +879,21 @@ func TestAccLinuxWebApp_withNode18LTS(t *testing.T) { }) } +func TestAccLinuxWebApp_withNode20LTS(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") + r := LinuxWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "20-lts"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxWebApp_withJre8Java(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") r := LinuxWebAppResource{} diff --git a/internal/services/appservice/linux_web_app_slot_resource.go b/internal/services/appservice/linux_web_app_slot_resource.go index 65337dbd9581..e40272265742 100644 --- a/internal/services/appservice/linux_web_app_slot_resource.go +++ b/internal/services/appservice/linux_web_app_slot_resource.go @@ -184,13 +184,13 @@ func (r LinuxWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "logs": helpers.LogsConfigSchema(), diff --git a/internal/services/appservice/windows_function_app_resource.go b/internal/services/appservice/windows_function_app_resource.go index bb69eaad0471..9b95669c7f71 100644 --- a/internal/services/appservice/windows_function_app_resource.go +++ b/internal/services/appservice/windows_function_app_resource.go @@ -267,13 +267,13 @@ func (r WindowsFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaWindowsFunctionApp(), diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index 2e5cfee1d212..0b7a1f087451 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1037,6 +1037,7 @@ func TestAccWindowsFunctionApp_appStackNode20(t *testing.T) { }) } +// nolint: unparam func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") r := WindowsFunctionAppResource{} diff --git a/internal/services/appservice/windows_function_app_slot_resource.go b/internal/services/appservice/windows_function_app_slot_resource.go index afe88b392bf4..4477e0d3d2df 100644 --- a/internal/services/appservice/windows_function_app_slot_resource.go +++ b/internal/services/appservice/windows_function_app_slot_resource.go @@ -259,13 +259,13 @@ func (r WindowsFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaWindowsFunctionAppSlot(), diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index a88d66bdd26b..19eeac3499c2 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -709,6 +709,7 @@ func TestAccWindowsFunctionAppSlot_appStackNode(t *testing.T) { }) } +// nolint: unparam func TestAccWindowsFunctionAppSlot_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") r := WindowsFunctionAppSlotResource{} diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index df737c507a65..c2121e695600 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1006,6 +1006,21 @@ func TestAccWindowsWebApp_withNode18(t *testing.T) { }) } +func TestAccWindowsWebApp_withNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") + r := WindowsWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccWindowsWebApp_withMultiStack(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app", "test") r := WindowsWebAppResource{} diff --git a/internal/services/appservice/windows_web_app_slot_resource.go b/internal/services/appservice/windows_web_app_slot_resource.go index bd9341af0fb4..45d3ba9c109c 100644 --- a/internal/services/appservice/windows_web_app_slot_resource.go +++ b/internal/services/appservice/windows_web_app_slot_resource.go @@ -180,13 +180,13 @@ func (r WindowsWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: true, + Default: false, }, "site_config": helpers.SiteConfigSchemaWindowsWebAppSlot(), diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 9f97fe3b7558..f3dd66d4706f 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -719,21 +719,6 @@ func TestAccWindowsWebAppSlot_withNode18(t *testing.T) { }) } -func TestAccWindowsWebAppSlot_withNode20(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") - r := WindowsWebAppSlotResource{} - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.node(data, "~20"), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep(), - }) -} - func TestAccWindowsWebAppSlot_withNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") r := WindowsWebAppSlotResource{} From 16c06a841bc7041451cc7675494e6f220f34484d Mon Sep 17 00:00:00 2001 From: Xiaxin Date: Thu, 30 Nov 2023 13:59:38 +0800 Subject: [PATCH 4/7] add linter ignorance --- .../appservice/linux_function_app_slot_resource_test.go | 1 - .../services/appservice/windows_function_app_resource_test.go | 2 +- .../appservice/windows_function_app_slot_resource_test.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index 1f0a214dfd65..39eb3849ab9e 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -771,7 +771,6 @@ func TestAccLinuxFunctionAppSlot_appStackNode(t *testing.T) { }) } -// nolint: unparam func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test") r := LinuxFunctionAppSlotResource{} diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index 0b7a1f087451..3512585f3d37 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1037,7 +1037,6 @@ func TestAccWindowsFunctionApp_appStackNode20(t *testing.T) { }) } -// nolint: unparam func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app", "test") r := WindowsFunctionAppResource{} @@ -2761,6 +2760,7 @@ resource "azurerm_windows_function_app" "test" { `, r.template(data, planSku), data.RandomInteger, version) } +// nolint: unparam func (r WindowsFunctionAppResource) appStackNode(data acceptance.TestData, planSku string, nodeVersion string) string { return fmt.Sprintf(` provider "azurerm" { diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index 19eeac3499c2..4aacbda96f66 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -709,7 +709,6 @@ func TestAccWindowsFunctionAppSlot_appStackNode(t *testing.T) { }) } -// nolint: unparam func TestAccWindowsFunctionAppSlot_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") r := WindowsFunctionAppSlotResource{} @@ -2148,6 +2147,7 @@ resource "azurerm_windows_function_app_slot" "test" { `, r.template(data, planSku), data.RandomInteger, version) } +// nolint: unparam func (r WindowsFunctionAppSlotResource) appStackNode(data acceptance.TestData, planSku string, nodeVersion string) string { return fmt.Sprintf(` provider "azurerm" { From 1ab0bfdd34d5b46c61c378f366b7f4b07034aaee Mon Sep 17 00:00:00 2001 From: Xiaxin Date: Thu, 7 Dec 2023 11:07:24 +0800 Subject: [PATCH 5/7] remove property change in this commit --- internal/services/appservice/linux_function_app_resource.go | 4 ++-- .../services/appservice/linux_function_app_slot_resource.go | 4 ++-- internal/services/appservice/linux_web_app_resource.go | 4 ++-- internal/services/appservice/linux_web_app_slot_resource.go | 4 ++-- internal/services/appservice/windows_function_app_resource.go | 4 ++-- .../services/appservice/windows_function_app_slot_resource.go | 4 ++-- internal/services/appservice/windows_web_app_resource.go | 4 ++-- internal/services/appservice/windows_web_app_slot_resource.go | 4 ++-- website/docs/r/linux_function_app.html.markdown | 4 ++-- website/docs/r/linux_web_app.html.markdown | 4 ++-- website/docs/r/windows_function_app.html.markdown | 4 ++-- website/docs/r/windows_web_app.html.markdown | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/services/appservice/linux_function_app_resource.go b/internal/services/appservice/linux_function_app_resource.go index e8abfc33fac3..0f7741ca081d 100644 --- a/internal/services/appservice/linux_function_app_resource.go +++ b/internal/services/appservice/linux_function_app_resource.go @@ -267,13 +267,13 @@ func (r LinuxFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaLinuxFunctionApp(), diff --git a/internal/services/appservice/linux_function_app_slot_resource.go b/internal/services/appservice/linux_function_app_slot_resource.go index f1e4b45d3fb1..509621cdfa95 100644 --- a/internal/services/appservice/linux_function_app_slot_resource.go +++ b/internal/services/appservice/linux_function_app_slot_resource.go @@ -258,13 +258,13 @@ func (r LinuxFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaLinuxFunctionAppSlot(), diff --git a/internal/services/appservice/linux_web_app_resource.go b/internal/services/appservice/linux_web_app_resource.go index 869ae45564ce..e32a12052faf 100644 --- a/internal/services/appservice/linux_web_app_resource.go +++ b/internal/services/appservice/linux_web_app_resource.go @@ -175,13 +175,13 @@ func (r LinuxWebAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaLinux(), diff --git a/internal/services/appservice/linux_web_app_slot_resource.go b/internal/services/appservice/linux_web_app_slot_resource.go index e40272265742..65337dbd9581 100644 --- a/internal/services/appservice/linux_web_app_slot_resource.go +++ b/internal/services/appservice/linux_web_app_slot_resource.go @@ -184,13 +184,13 @@ func (r LinuxWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "logs": helpers.LogsConfigSchema(), diff --git a/internal/services/appservice/windows_function_app_resource.go b/internal/services/appservice/windows_function_app_resource.go index 9b95669c7f71..bb69eaad0471 100644 --- a/internal/services/appservice/windows_function_app_resource.go +++ b/internal/services/appservice/windows_function_app_resource.go @@ -267,13 +267,13 @@ func (r WindowsFunctionAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaWindowsFunctionApp(), diff --git a/internal/services/appservice/windows_function_app_slot_resource.go b/internal/services/appservice/windows_function_app_slot_resource.go index 4477e0d3d2df..afe88b392bf4 100644 --- a/internal/services/appservice/windows_function_app_slot_resource.go +++ b/internal/services/appservice/windows_function_app_slot_resource.go @@ -259,13 +259,13 @@ func (r WindowsFunctionAppSlotResource) Arguments() map[string]*pluginsdk.Schema "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaWindowsFunctionAppSlot(), diff --git a/internal/services/appservice/windows_web_app_resource.go b/internal/services/appservice/windows_web_app_resource.go index da69917c2fd8..ec45ee73cc30 100644 --- a/internal/services/appservice/windows_web_app_resource.go +++ b/internal/services/appservice/windows_web_app_resource.go @@ -167,13 +167,13 @@ func (r WindowsWebAppResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaWindows(), diff --git a/internal/services/appservice/windows_web_app_slot_resource.go b/internal/services/appservice/windows_web_app_slot_resource.go index 45d3ba9c109c..bd9341af0fb4 100644 --- a/internal/services/appservice/windows_web_app_slot_resource.go +++ b/internal/services/appservice/windows_web_app_slot_resource.go @@ -180,13 +180,13 @@ func (r WindowsWebAppSlotResource) Arguments() map[string]*pluginsdk.Schema { "webdeploy_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "ftp_publish_basic_authentication_enabled": { Type: pluginsdk.TypeBool, Optional: true, - Default: false, + Default: true, }, "site_config": helpers.SiteConfigSchemaWindowsWebAppSlot(), diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index edc6ba6a3b08..fffac1387659 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -103,7 +103,7 @@ The following arguments are supported: * `functions_extension_version` - (Optional) The runtime version associated with the Function App. Defaults to `~4`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * `https_only` - (Optional) Can the Function App only be accessed via HTTPS? Defaults to `false`. @@ -139,7 +139,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index a230dc716792..545029b7d790 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -79,7 +79,7 @@ The following arguments are supported: * `enabled` - (Optional) Should the Linux Web App be enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * `https_only` - (Optional) Should the Linux Web App require HTTPS connections. @@ -101,7 +101,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 0faf81df3c25..a66587db9efe 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -101,7 +101,7 @@ The following arguments are supported: * `enabled` - (Optional) Is the Function App enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * `functions_extension_version` - (Optional) The runtime version associated with the Function App. Defaults to `~4`. @@ -139,7 +139,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index 6115f30da076..933ba28d6906 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -76,7 +76,7 @@ The following arguments are supported: * `enabled` - (Optional) Should the Windows Web App be enabled? Defaults to `true`. -* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `false`. +* `ftp_publish_basic_authentication_enabled` - Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * `https_only` - (Optional) Should the Windows Web App require HTTPS connections. @@ -102,7 +102,7 @@ The following arguments are supported: ~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions) -* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to`false`. +* `webdeploy_publish_basic_authentication_enabled` - Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. ~> **NOTE:** Setting this value to true will disable the ability to use `zip_deploy_file` which currently relies on the default publishing profile. From 20c0466fffa80ea3ed11dbe0c7835b60e93a3857 Mon Sep 17 00:00:00 2001 From: "Xiaxin Yi (from Dev Box)" Date: Wed, 6 Mar 2024 11:25:39 +0800 Subject: [PATCH 6/7] update code --- .../services/appservice/helpers/app_stack.go | 1 + .../appservice/helpers/function_app_schema.go | 4 +-- .../linux_function_app_slot_resource_test.go | 2 +- .../appservice/linux_web_app_resource_test.go | 2 +- .../linux_web_app_slot_resource_test.go | 30 +++++++++++++++++++ .../windows_function_app_resource_test.go | 16 ++++++++++ ...windows_function_app_slot_resource_test.go | 16 ++++++++++ .../windows_web_app_resource_test.go | 2 +- .../windows_web_app_slot_resource_test.go | 22 ++++++++++++++ website/docs/r/windows_web_app.html.markdown | 2 +- .../docs/r/windows_web_app_slot.html.markdown | 2 +- 11 files changed, 92 insertions(+), 7 deletions(-) diff --git a/internal/services/appservice/helpers/app_stack.go b/internal/services/appservice/helpers/app_stack.go index 5836bc2220c1..7011b39488ec 100644 --- a/internal/services/appservice/helpers/app_stack.go +++ b/internal/services/appservice/helpers/app_stack.go @@ -128,6 +128,7 @@ func windowsApplicationStackSchema() *pluginsdk.Schema { "~14", "~16", "~18", + "~20", }, false), AtLeastOneOf: windowsApplicationStackConstraint, }, diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go index 6a5a4149d8ce..5850a023d300 100644 --- a/internal/services/appservice/helpers/function_app_schema.go +++ b/internal/services/appservice/helpers/function_app_schema.go @@ -1006,7 +1006,7 @@ type ApplicationStackLinuxFunctionApp struct { // Note - Function Apps differ to Web Apps here. They do not use the named properties in the SiteConfig block and exclusively use the app_settings map DotNetVersion string `tfschema:"dotnet_version"` // Supported values `3.1`, `6.0`, `7.0` and `8.0`. DotNetIsolated bool `tfschema:"use_dotnet_isolated_runtime"` // Supported values `true` for `dotnet-isolated`, `false` otherwise - NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS` + NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS, `20LTS`` PythonVersion string `tfschema:"python_version"` // Supported values `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, `3.7` PowerShellCoreVersion string `tfschema:"powershell_core_version"` // Supported values are `7.0`, `7.2` JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17` @@ -1017,7 +1017,7 @@ type ApplicationStackLinuxFunctionApp struct { type ApplicationStackWindowsFunctionApp struct { DotNetVersion string `tfschema:"dotnet_version"` // Supported values `v3.0`, `v4.0`, `v6.0`, `v7.0` and `v8.0` DotNetIsolated bool `tfschema:"use_dotnet_isolated_runtime"` // Supported values `true` for `dotnet-isolated`, `false` otherwise - NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS` + NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS, `20LTS` JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17` PowerShellCoreVersion string `tfschema:"powershell_core_version"` // Supported values are `7.0`, `7.2` CustomHandler bool `tfschema:"use_custom_runtime"` // Supported values `true` diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index 1985ec3d918a..24ad06b47ad8 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -876,7 +876,7 @@ func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) { check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|20"), ), }, - data.ImportStep(), + data.ImportStep("site_credential.0.password"), { Config: r.appStackNodeUpdateTags(data, SkuStandardPlan, "18"), Check: acceptance.ComposeTestCheckFunc( diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index 9c077d3749f6..a89199725687 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -930,7 +930,7 @@ func TestAccLinuxWebApp_withNode18LTS(t *testing.T) { data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.node(data, "20-lts"), + Config: r.node(data, "18-lts"), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), diff --git a/internal/services/appservice/linux_web_app_slot_resource_test.go b/internal/services/appservice/linux_web_app_slot_resource_test.go index c0e6334d23a6..e5b90051ff37 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -965,6 +965,36 @@ func TestAccLinuxWebAppSlot_withNode16LTS(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") r := LinuxWebAppSlotResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "16-lts"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("site_credential.0.password"), + }) +} + +func TestAccLinuxWebAppSlot_withNode18LTS(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "18-lts"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("site_credential.0.password"), + }) +} + +func TestAccLinuxWebAppSlot_withNode20LTS(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + data.ResourceTest(t, r, []acceptance.TestStep{ { Config: r.node(data, "20-lts"), diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index 3b28370a3f6d..688d4138b1ce 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1132,6 +1132,22 @@ func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) { ), }, data.ImportStep("site_credential.0.password"), + { + Config: r.appStackNode(data, SkuBasicPlan, "~18"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep("site_credential.0.password"), + { + Config: r.appStackNode(data, SkuBasicPlan, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep("site_credential.0.password"), }) } diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index 3a15455b3348..2e48b4d61d18 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -757,6 +757,22 @@ func TestAccWindowsFunctionAppSlot_appStackNode(t *testing.T) { }) } +func TestAccWindowsFunctionAppSlot_appStackNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") + r := WindowsFunctionAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.appStackNode(data, SkuStandardPlan, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("kind").HasValue("functionapp"), + ), + }, + data.ImportStep("site_credential.0.password"), + }) +} + func TestAccWindowsFunctionAppSlot_appStackNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_function_app_slot", "test") r := WindowsFunctionAppSlotResource{} diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index c1055db078ac..2fbe83a33b2a 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1087,7 +1087,7 @@ func TestAccWindowsWebApp_withNode20(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), ), }, - data.ImportStep(), + data.ImportStep("site_credential.0.password"), }) } diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 09b66ec3f410..57f46a7970a3 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -788,6 +788,21 @@ func TestAccWindowsWebAppSlot_withNode18(t *testing.T) { }) } +func TestAccWindowsWebAppSlot_withNode20(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") + r := WindowsWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.node(data, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("site_credential.0.password"), + }) +} + func TestAccWindowsWebAppSlot_withNodeUpdate(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_windows_web_app_slot", "test") r := WindowsWebAppSlotResource{} @@ -807,6 +822,13 @@ func TestAccWindowsWebAppSlot_withNodeUpdate(t *testing.T) { ), }, data.ImportStep("site_credential.0.password"), + { + Config: r.node(data, "~20"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("site_credential.0.password"), }) } diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index a0946cf755da..6db5e6f3bfbc 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -189,7 +189,7 @@ ASP.NET V4.8 | v4.0 ~> **NOTE:** For currently supported versions, please see the official documentation. Some example values include: `1.8`, `1.8.0_322`, `11`, `11.0.14`, `17` and `17.0.2` -* `node_version` - (Optional) The version of node to use when `current_stack` is set to `node`. Possible values are `~12`, `~14`, `~16`, and `~18`. +* `node_version` - (Optional) The version of node to use when `current_stack` is set to `node`. Possible values are `~12`, `~14`, `~16`, `~18` and `~20`. ~> **NOTE:** This property conflicts with `java_version`. diff --git a/website/docs/r/windows_web_app_slot.html.markdown b/website/docs/r/windows_web_app_slot.html.markdown index 8291761e04fa..9ff437ea43e0 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -184,7 +184,7 @@ An `application_stack` block supports the following: ~> **NOTE:** For compatible combinations of `java_version`, `java_container` and `java_container_version` users can use `az webapp list-runtimes` from command line. -* `node_version` - (Optional) The version of node to use when `current_stack` is set to `node`. Possible values include `~12`, `~14`, `~16`, and `~18`. +* `node_version` - (Optional) The version of node to use when `current_stack` is set to `node`. Possible values include `~12`, `~14`, `~16`, `~18` and `~20`. ~> **NOTE:** This property conflicts with `java_version`. From 29e3168211ca51ae3807bc42ca279ed58e477e4d Mon Sep 17 00:00:00 2001 From: "Xiaxin Yi (from Dev Box)" Date: Wed, 6 Mar 2024 16:25:58 +0800 Subject: [PATCH 7/7] add 20 in 3.x appstack for windows web app --- internal/services/appservice/helpers/app_stack.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/appservice/helpers/app_stack.go b/internal/services/appservice/helpers/app_stack.go index 7011b39488ec..47798eed5f90 100644 --- a/internal/services/appservice/helpers/app_stack.go +++ b/internal/services/appservice/helpers/app_stack.go @@ -283,6 +283,7 @@ func windowsApplicationStackSchema() *pluginsdk.Schema { "~14", "~16", "~18", + "~20", }, false) r.Schema["java_version"].AtLeastOneOf = windowsApplicationStackConstraintThreePointX