How to enable interactive authoring while deploying Data Factory Azure IR on managed vNet through Terraform?
Asked Answered
G

3

7

I am using below Terraform code to deploy Data factory Azure IR in managed virtual network:

resource "azurerm_data_factory_integration_runtime_azure" "ManagedIR" {
  name            = "ManagedIR"
  data_factory_id = azurerm_data_factory.datafactory.id
  location        = var.location
  resource_group_name = "****"
  virtual_network_enabled = true
  time_to_live_min = 60
}

But after successfully deploying it, I see 'Interactive authoring' to be disabled as below: disabled

Is there any setting in Terraform through which I can enable 'Interactive authoring' as well?

Gilkey answered 29/6, 2022 at 14:58 Comment(1)
Did you ever find the answer to this? I'm wondering whether it's not exposed via the Terraform provider.Straus
K
1

I can't find any approach to enable Interactive Authoring using Bicep/Terraform. I ended up using an undocumented REST API for ADF (but documented for Synapse):

$irResourceId = "subscriptions/<your-subscription-id>/resourcegroups/<your- 
rg-name>/providers/Microsoft.DataFactory/factories/<your-adf-name>/integrationruntimes/<your-ir-name>"
$command = "enableInteractiveQuery?api-version=2018-06-01"
$apiUrl = "https://management.azure.com/$irResourceId/$command"
az rest --url $apiUrl --method 'POST' --body '{ "autoTerminationMinutes": 10 }' 

FYI: Synapse Rest API: https://learn.microsoft.com/en-us/rest/api/synapse/integration-runtimes/enable-interactive-query

Kristykristyn answered 11/11, 2022 at 16:27 Comment(0)
F
0

Here is what worked for me, you can refer to this link to use Azure/azapi.

Felten answered 8/6, 2023 at 8:52 Comment(1)
Not sure why this had been downvoted as to me it linked to the perfect answer. For reference, the solution is to use the azapi resource provider and the following code: resource "azapi_resource_action" "test" { type = "Microsoft.DataFactory/factories/integrationRuntimes@2018-06-01" resource_id = azurerm_data_factory_integration_runtime_azure.example.id action = "enableInteractiveQuery" body = jsonencode({ autoTerminationMinutes = 10 }) }Orotund
P
0

You can enable Interactive query using REST API.

Integration Runtimes - Enable Interactive Query - Enable interactive query in integration runtime.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableInteractiveQuery?api-version=2021-06-01-preview

Here the walk through on how to enable Interactive query using REST API.

enter image description here

Putrefaction answered 19/7, 2023 at 6:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.