Support for creating Azure Data Explorer tables and ingestion mappings. This is required to enable e2e automated deployment of Azure Data Explorer solution that includes creating cluster, creating database, setting database permissions, creating tables, creating ingestion mappings, and creating data connections.
Related Issue: https://github.com/terraform-providers/terraform-provider-azurerm/issues/5553
Documentation: Create table, Create data mappings
I've created an initial draft for a resource azurerm_kusto_database_tablewith the following schema to show that it's possible to provide this feature:
resource "azurerm_kusto_database_table" "test" {
name = "table1"
resource_group_name = azurerm_resource_group.test.name
cluster_name = azurerm_kusto_cluster.test.name
database_name = azurerm_kusto_database.test.name
doc_string = "Optional Docstring"
folder = "Optional Folder"
column {
name = "col1"
type = "guid"
}
column {
name = "col2"
type = "dynamic"
}
}
see https://github.com/terraform-providers/terraform-provider-azurerm/compare/master...jrauschenbusch:r-kusto-database-table for a Diff to the current master state.
I already tested it a bit and it seems like it works as expected.
Some notes:
azure-sdk-for-go dependency. So I had to add and use the azure-kusto-go library. (see https://github.com/Azure/azure-sdk-for-go/issues/7916)@tombuildsstuff @mbfrahry Please let me know what you think about it. This would be (together with another resource azurerm_kusto_database_table_ingestion_mapping) the last required piece to get all kinds of Kusto Data Connections deployable via Terraform.
Unfortunately there is no progress here due to the lack of a PR review from Hashicorp.
Maybe the used azure_kusto_go library is a problem, which brings a lot of dependencies. Also the lack of support for Prepared Statements for Management calls could be the reason:
Please vote up the related PR to increase the visibility and importance of this new resource as some related resources (Event Grid and IoT Hub Data connections) will only become available if this one and the mapping table resource are ready to use.
Most helpful comment
I've created an initial draft for a resource
azurerm_kusto_database_tablewith the following schema to show that it's possible to provide this feature:see https://github.com/terraform-providers/terraform-provider-azurerm/compare/master...jrauschenbusch:r-kusto-database-table for a Diff to the current master state.
I already tested it a bit and it seems like it works as expected.
Some notes:
azure-sdk-for-godependency. So I had to add and use theazure-kusto-golibrary. (see https://github.com/Azure/azure-sdk-for-go/issues/7916)@tombuildsstuff @mbfrahry Please let me know what you think about it. This would be (together with another resource
azurerm_kusto_database_table_ingestion_mapping) the last required piece to get all kinds of Kusto Data Connections deployable via Terraform.