Skip to content

Commit

Permalink
#24134: Default logic app versions to ~4
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavmb committed Dec 19, 2023
1 parent ab4f143 commit 19a42a3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion internal/services/logic/logic_app_standard_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate"
Expand Down Expand Up @@ -177,7 +178,12 @@ func resourceLogicAppStandard() *pluginsdk.Resource {
"version": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "~3",
Default: func() interface{} {
if !features.FourPointOhBeta() {
return "~3"
}
return "~4"
},
},

"tags": tags.Schema(),
Expand Down
6 changes: 3 additions & 3 deletions internal/services/logic/logic_app_standard_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestAccLogicAppStandard_basic(t *testing.T) {
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
acceptance.TestCheckResourceAttr(data.ResourceName, "kind", "functionapp,workflowapp"),
check.That(data.ResourceName).Key("version").HasValue("~3"),
check.That(data.ResourceName).Key("version").HasValue("~4"),
check.That(data.ResourceName).Key("outbound_ip_addresses").Exists(),
check.That(data.ResourceName).Key("possible_outbound_ip_addresses").Exists(),
check.That(data.ResourceName).Key("custom_domain_verification_id").Exists(),
Expand Down Expand Up @@ -780,7 +780,7 @@ func TestAccLogicAppStandard_dotnetVersion5(t *testing.T) {

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.dotnetVersion(data, "~3", "v5.0"),
Config: r.dotnetVersion(data, "~4", "v5.0"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("site_config.0.dotnet_framework_version").HasValue("v5.0"),
Expand Down Expand Up @@ -1858,7 +1858,7 @@ resource "azurerm_logic_app_standard" "test" {
app_service_plan_id = azurerm_app_service_plan.test.id
storage_account_name = azurerm_storage_account.test.name
storage_account_access_key = azurerm_storage_account.test.primary_access_key
version = "~3"
version = "~4"
site_config {
pre_warmed_instance_count = 1
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/logic_app_standard.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ The following arguments are supported:

~> **Note:** When using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`.

* `version` - (Optional) The runtime version associated with the Logic App. Defaults to `~3`.
* `version` - (Optional) The runtime version associated with the Logic App. Defaults to `~4`.

~> **Note:** Logic App version `3.x` will be out of support from December 3 2022. For more details refer [Logic Apps Standard Support for Functions Runtime V4](https://azure.microsoft.com/en-us/updates/logic-apps-standard-support-for-functions-runtime-v4/)

* `virtual_network_subnet_id` - (Optional) The subnet id which will be used by this resource for [regional virtual network integration](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#regional-virtual-network-integration).

Expand Down

0 comments on commit 19a42a3

Please sign in to comment.