From 73832251e80c390a139688097ffdad3f2f2022e8 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Tue, 28 Nov 2023 18:57:13 +0900 Subject: [PATCH] Support `v8.0` for the `dotnet_version` to `azurerm_windows_web_app` and `azurerm_linux_web_app` (#23893) --- internal/services/appservice/helpers/app_stack.go | 4 +++- .../appservice/linux_web_app_resource_test.go | 15 +++++++++++++++ .../linux_web_app_slot_resource_test.go | 15 +++++++++++++++ .../appservice/windows_web_app_resource_test.go | 15 +++++++++++++++ .../windows_web_app_slot_resource_test.go | 15 +++++++++++++++ website/docs/r/linux_web_app.html.markdown | 2 +- website/docs/r/linux_web_app_slot.html.markdown | 2 +- website/docs/r/windows_web_app.html.markdown | 3 ++- website/docs/r/windows_web_app_slot.html.markdown | 2 +- 9 files changed, 68 insertions(+), 5 deletions(-) diff --git a/internal/services/appservice/helpers/app_stack.go b/internal/services/appservice/helpers/app_stack.go index ff9c74aafdb6..df6fa366f56f 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, }, diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index df01ffc26a56..4cbaadf8f0f8 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -624,6 +624,21 @@ func TestAccLinuxWebApp_withDotNet70(t *testing.T) { }) } +func TestAccLinuxWebApp_withDotNet80(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") + r := LinuxWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.dotNet(data, "8.0"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxWebApp_withGo18(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_test.go b/internal/services/appservice/linux_web_app_slot_resource_test.go index 1f84d11f04b1..22ec5928e562 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -667,6 +667,21 @@ func TestAccLinuxWebAppSlot_withDotNet70(t *testing.T) { }) } +func TestAccLinuxWebAppSlot_withDotNet80(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.dotNet(data, "8.0"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxWebAppSlot_withPhp74(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") r := LinuxWebAppSlotResource{} diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index 5f715d62a497..df737c507a65 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{} 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..f3dd66d4706f 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{} diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index 5e17cc0fe389..2e44c4e3d8f5 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -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`. diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index 04cab3c48d51..3318aaa01153 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 `8.0`. * `go_version` - (Optional) The version of Go to use. Possible values include `1.18`, and `1.19`. diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index abdcb30ee95d..ff30a2d08e2c 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -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`.