Azure Data Explorer Database
This page shows how to write Terraform and Azure Resource Manager for Data Explorer Database and write them securely.
azurerm_kusto_database (Terraform)
The Database in Data Explorer can be configured in Terraform with the resource name azurerm_kusto_database
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_kusto_database" "database" {
name = var.database_name
resource_group_name = var.resource_group_name
location = var.resource_group_location
cluster_name = var.cluster_name
resource "azurerm_kusto_database" "database" {
name = "demo-database"
resource_group_name = var.resource_group_name
location = var.resource_group_location
cluster_name = azurerm_kusto_cluster.cluster.name
resource "azurerm_kusto_database" "database" {
cluster_name = azurerm_kusto_cluster.cluster.name
location = data.azurerm_resource_group.rg.location
name = var.database_name
resource_group_name = data.azurerm_resource_group.rg.name
}
resource "azurerm_kusto_database" "this" {
cluster_name = var.cluster_name
hot_cache_period = var.hot_cache_period
location = var.location
name = var.name
resource_group_name = var.resource_group_name
resource "azurerm_kusto_database" "this" {
cluster_name = var.cluster_name
hot_cache_period = var.hot_cache_period
location = var.location
name = var.name
resource_group_name = var.resource_group_name
Parameters
-
cluster_name
required - string -
hot_cache_period
optional - string -
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
size
optional computed - number -
soft_delete_period
optional - string -
timeouts
single block
Explanation in Terraform Registry
Manages a Kusto (also known as Azure Data Explorer) Database
Microsoft.Kusto/Clusters/Databases (Azure Resource Manager)
The Clusters/Databases in Microsoft.Kusto can be configured in Azure Resource Manager with the resource name Microsoft.Kusto/Clusters/Databases
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Kusto/Clusters/Databases",
"location": "westus",
"properties": {
"softDeletePeriod": "P1D",
"provisioningState": "Succeeded"
}
"type": "Microsoft.Kusto/Clusters/Databases",
"etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"",
"location": "westus",
"properties": {
"softDeletePeriodInDays": 1,
"provisioningState": "Succeeded"
"type": "Microsoft.Kusto/Clusters/Databases",
"etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"",
"location": "westus",
"properties": {
"softDeletePeriodInDays": 1,
"provisioningState": "Succeeded"
"type": "Microsoft.Kusto/Clusters/Databases",
"etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"",
"location": "westus",
"properties": {
"softDeletePeriodInDays": 1,
"provisioningState": "Succeeded"
"type": "Microsoft.Kusto/Clusters/Databases",
"etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"",
"location": "westus",
"properties": {
"softDeletePeriodInDays": 1,
"provisioningState": "Succeeded"
"type": "Microsoft.Kusto/Clusters/Databases",
"location": "westus",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
"type": "Microsoft.Kusto/Clusters/Databases",
"location": "westus",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
"type": "Microsoft.Kusto/Clusters/Databases"
},
{
"apiVersion": "2020-02-15",
"dependsOn": [
"[resourceId('Microsoft.Kusto/Clusters', parameters('Clusters_adxvladris_name'))]"
"type": "Microsoft.Kusto/Clusters/Databases",
"location": "westus",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
"type": "Microsoft.Kusto/Clusters/Databases",
"location": "westus",
"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 Database?
Azure Data Explorer Database 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 Database?
For Terraform, the prashant101386/devops, jittakal/tf-sample-template and cjthorpe/terraform-azure-code source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the assing/alerts-extension, assing/alerts-extension and assing/alerts-extension source code examples are useful. See the Azure Resource Manager Example section for further details.