From 886ce0cfe1b0e4e0d70a18219921d423720f5e9c Mon Sep 17 00:00:00 2001 From: Halvor Holsten Strand Date: Fri, 13 Jan 2023 09:44:10 +0100 Subject: [PATCH] Add Python 3.11 for Linux web app --- internal/services/appservice/helpers/app_stack.go | 1 + .../appservice/linux_web_app_resource_test.go | 15 +++++++++++++++ .../linux_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 +- 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/internal/services/appservice/helpers/app_stack.go b/internal/services/appservice/helpers/app_stack.go index 3ba7a68f84f0..7e03ddccc836 100644 --- a/internal/services/appservice/helpers/app_stack.go +++ b/internal/services/appservice/helpers/app_stack.go @@ -468,6 +468,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema { "3.8", "3.9", "3.10", + "3.11", }, false), ExactlyOneOf: []string{ "site_config.0.application_stack.0.docker_image", diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index 06765576c211..4a6248c93fbe 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -733,6 +733,21 @@ func TestAccLinuxWebApp_withPython310(t *testing.T) { }) } +func TestAccLinuxWebApp_withPython311(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test") + r := LinuxWebAppResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.python(data, "3.11"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxWebApp_withRuby26(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 25db9950b8bd..a8d06dbffaa1 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -716,6 +716,21 @@ func TestAccLinuxWebAppSlot_withPython310(t *testing.T) { }) } +func TestAccLinuxWebAppSlot_withPython311(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") + r := LinuxWebAppSlotResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.python(data, "3.11"), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + func TestAccLinuxWebAppSlot_withRuby26(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test") r := LinuxWebAppSlotResource{} diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index e969d8fe1ed3..cb71466f5085 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -161,7 +161,7 @@ An `application_stack` block supports the following: ~> **NOTE:** versions `5.6` and `7.2` are deprecated and will be removed from the provider in a future version. -* `python_version` - (Optional) The version of Python to run. Possible values include `3.7`, `3.8`, `3.9` and `3.10`. +* `python_version` - (Optional) The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. * `ruby_version` - (Optional) Te version of Ruby to run. Possible values include `2.6` and `2.7`. diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index 424d3b3d8ab7..27d2fd74e672 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -162,7 +162,7 @@ An `application_stack` block supports the following: ~> **NOTE:** versions `5.6` and `7.2` are deprecated and will be removed from the provider in a future version. -* `python_version` - (Optional) The version of Python to run. Possible values include `3.7`, `3.8`, `3.9` and `3.10`. +* `python_version` - (Optional) The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. * `ruby_version` - (Optional) Te version of Ruby to run. Possible values include `2.6` and `2.7`.