From b09c49601e2ff3928c02fbeba37a9dffd133de65 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Tue, 14 Nov 2023 17:43:43 +0000 Subject: [PATCH] Support `v8.0` for the `dotnet_version` to `azurerm_windows_web_app` and `azurerm_linux_web_app` --- 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 928c69114806..0d06d4762df8 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 42d209d61a05..d077c9c49bfc 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 bcaf1a609592..aea8428c6342 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -647,6 +647,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 48889ee497e3..9b5678385b82 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 984b5f852a04..0dea24b07374 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -150,7 +150,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 605fcb088385..fa6a261ba29b 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -152,7 +152,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 3472ee8f585a..9c62e1619053 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -158,7 +158,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 @@ -167,6 +167,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 6447465e1e26..40d1910cbfa7 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -162,7 +162,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`.