Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#24134: Default logic app versions to ~4 #24280

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 2 additions & 0 deletions website/docs/r/logic_app_standard.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ The following arguments are supported:

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

~> **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).

~> **NOTE on regional virtual network integration:** The AzureRM Terraform provider provides regional virtual network integration via the standalone resource [app_service_virtual_network_swift_connection](app_service_virtual_network_swift_connection.html) and in-line within this resource using the `virtual_network_subnet_id` property. You cannot use both methods simutaneously.
Expand Down
Loading