Skip to content

Commit

Permalink
support AutoResolve in location
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Oct 15, 2021
1 parent d0fe7e6 commit c097d0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down Expand Up @@ -61,7 +62,17 @@ func resourceDataFactoryIntegrationRuntimeAzure() *pluginsdk.Resource {

"resource_group_name": azure.SchemaResourceGroupName(),

"location": azure.SchemaLocation(),
"location": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.Any(
location.EnhancedValidate,
validation.StringInSlice([]string{"AutoResolve"}, false),
),
StateFunc: location.StateFunc,
DiffSuppressFunc: location.DiffSuppressFunc,
},

"cleanup_enabled": {
Type: pluginsdk.TypeBool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ resource "azurerm_data_factory_integration_runtime_azure" "test" {
name = "azure-integration-runtime"
data_factory_name = azurerm_data_factory.test.name
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
location = "AutoResolve"
virtual_network_enabled = true
}
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger)
Expand Down

0 comments on commit c097d0a

Please sign in to comment.