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

azurerm_data_factory_integration_runtime_azure - support AutoResolve for the location property #13731

Merged
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following arguments are supported:

* `resource_group_name` - (Required) The name of the resource group in which to create the Managed Integration Runtime. Changing this forces a new resource to be created.

* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* `location` - (Required) Specifies the supported Azure location where the resource exists. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new resource to be created.

* `description` - (Optional) Integration runtime description.

Expand Down