Skip to content

Commit

Permalink
Support v8.0 for the dotnet_version to azurerm_windows_web_app
Browse files Browse the repository at this point in the history
…and `azurerm_linux_web_app` (#23893)
  • Loading branch information
shibayan authored Nov 28, 2023
1 parent b49bc06 commit 7383225
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 5 deletions.
4 changes: 3 additions & 1 deletion internal/services/appservice/helpers/app_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ func windowsApplicationStackSchema() *pluginsdk.Schema {
"v4.0",
"v5.0",
"v6.0",
"v7.0"}, false),
"v7.0",
"v8.0"}, false),
AtLeastOneOf: windowsApplicationStackConstraint,
},

Expand Down Expand Up @@ -462,6 +463,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema {
"5.0", // deprecated
"6.0",
"7.0",
"8.0",
}, false),
ExactlyOneOf: linuxApplicationStackConstraint,
},
Expand Down
15 changes: 15 additions & 0 deletions internal/services/appservice/linux_web_app_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
15 changes: 15 additions & 0 deletions internal/services/appservice/linux_web_app_slot_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
15 changes: 15 additions & 0 deletions internal/services/appservice/windows_web_app_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
15 changes: 15 additions & 0 deletions internal/services/appservice/windows_web_app_slot_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/linux_web_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/linux_web_app_slot.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/windows_web_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/windows_web_app_slot.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit 7383225

Please sign in to comment.