azurerm_data_share_dataset_kusto_database

Manages a Data Share Kusto Database Dataset.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_data_share_account" "example" {
  name                = "example-dsa"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  identity {
    type = "SystemAssigned"
  }
}

resource "azurerm_data_share" "example" {
  name       = "example_ds"
  account_id = azurerm_data_share_account.example.id
  kind       = "InPlace"
}

resource "azurerm_kusto_cluster" "example" {
  name                = "examplekc"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  sku {
    name     = "Dev(No SLA)_Standard_D11_v2"
    capacity = 1
  }
}

resource "azurerm_kusto_database" "example" {
  name                = "examplekd"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  cluster_name        = azurerm_kusto_cluster.example.name
}

resource "azurerm_role_assignment" "example" {
  scope                = azurerm_kusto_cluster.example.id
  role_definition_name = "Contributor"
  principal_id         = azurerm_data_share_account.example.identity[0].principal_id
}

resource "azurerm_data_share_dataset_kusto_database" "example" {
  name              = "example-dskd"
  share_id          = azurerm_data_share.example.id
  kusto_database_id = azurerm_kusto_database.example.id
  depends_on = [
    azurerm_role_assignment.example,
  ]
}

Arguments Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Data Share Kusto Database Datasets can be imported using the resource id, e.g.

terraform import azurerm_data_share_dataset_kusto_database.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1