Skip to content

Commit

Permalink
azurerm_logic_app_standard - fix a crash (#24322)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyeqf authored Jan 3, 2024
1 parent 17d77b0 commit c89a25b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/services/logic/logic_app_standard_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func resourceLogicAppStandard() *pluginsdk.Resource {
return "~3"
}
return "~4"
},
}(),
},

"tags": tags.Schema(),
Expand Down
8 changes: 7 additions & 1 deletion internal/services/logic/logic_app_standard_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/utils"
Expand All @@ -29,7 +30,12 @@ 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("~4"),
func() pluginsdk.TestCheckFunc {
if features.FourPointOhBeta() {
return check.That(data.ResourceName).Key("version").HasValue("~4")
}
return check.That(data.ResourceName).Key("version").HasValue("~3")
}(),
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

0 comments on commit c89a25b

Please sign in to comment.