Azure Data Explorer Eventhub Data Connection

This page shows how to write Terraform and Azure Resource Manager for Data Explorer Eventhub Data Connection and write them securely.

azurerm_kusto_eventhub_data_connection (Terraform)

The Eventhub Data Connection in Data Explorer can be configured in Terraform with the resource name azurerm_kusto_eventhub_data_connection. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "azurerm_kusto_eventhub_data_connection" "this" {
  cluster_name        = var.cluster_name
  consumer_group      = var.consumer_group
  data_format         = var.data_format
  database_name       = var.database_name
  eventhub_id         = var.eventhub_id
main.tf#L7
resource "azurerm_kusto_eventhub_data_connection" "this" {
  cluster_name        = var.cluster_name
  consumer_group      = var.consumer_group
  data_format         = var.data_format
  database_name       = var.database_name
  eventhub_id         = var.eventhub_id
azurerm-eventhub.tf#L25
resource "azurerm_kusto_eventhub_data_connection" "eventhub_connection" {
  cluster_name        = azurerm_kusto_cluster.cluster.name
  consumer_group      = azurerm_eventhub_consumer_group.eventhub_cg.name
  data_format         = var.data_format
  database_name       = azurerm_kusto_database.database.name
  eventhub_id         = azurerm_eventhub.ev-am.id

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Kusto (also known as Azure Data Explorer) EventHub Data Connection

Microsoft.Kusto/Clusters/Databases/DataConnections (Azure Resource Manager)

The Clusters/Databases/DataConnections in Microsoft.Kusto can be configured in Azure Resource Manager with the resource name Microsoft.Kusto/Clusters/Databases/DataConnections. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

KustoDataConnectionsUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsCreateOrUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsCreateOrUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsCreateOrUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsListByDatabase.json#L16
            "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
            "location": "westus",
            "kind": "EventHub",
            "properties": {
              "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
              "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsListByDatabase.json#L16
            "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
            "location": "westus",
            "kind": "EventHub",
            "properties": {
              "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
              "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsCreateOrUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"
KustoDataConnectionsUpdate.json#L23
        "type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
        "location": "westus",
        "kind": "EventHub",
        "properties": {
          "eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
          "consumerGroup": "testConsumerGroup1"

Frequently asked questions

What is Azure Data Explorer Eventhub Data Connection?

Azure Data Explorer Eventhub Data Connection is a resource for Data Explorer of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Data Explorer Eventhub Data Connection?

For Terraform, the kevinhead/azurerm, niveklabs/azurerm and cjthorpe/terraform-azure-code source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the debhol/azuredocs, debhol/azuredocs and debhol/azuredocs source code examples are useful. See the Azure Resource Manager Example section for further details.