I can use $Default
consumer group in connection azure data explorer cluster from the azure dashboard. but when I tried to do the same from the terraform, I am getting error.
Getting data of default consumer group
data "azurerm_eventhub_consumer_group" "default" {
name = "$Default"
namespace_name = azurerm_eventhub_namespace.eh_namespace.name
eventhub_name = azurerm_eventhub.eh.name
resource_group_name = var.resource_group
}
Tried to use in adx
resource "azurerm_kusto_eventhub_data_connection" "eventhub_connection" {
name = var.adx_eh_connection_name
resource_group_name = var.resource_group
location = data.azurerm_resource_group.eh_adx.location
cluster_name = azurerm_kusto_cluster.adx.name
database_name = azurerm_kusto_database.database.name
eventhub_id = azurerm_eventhub.eh.id
consumer_group = data.azurerm_eventhub_consumer_group.default.name
table_name = var.adx_db_table_name
mapping_rule_name = var.ingestion_mapping_rule_name
data_format = var.eh_message_format
}
Getting error
Error: invalid value for consumer_group (The consumer group name can contain only letters,
numbers, periods (.), hyphens (-),and underscores (_), up to 50 characters, and
it must begin and end with a letter or number.)
on adx.tf line 25, in resource "azurerm_kusto_eventhub_data_connection" "eventhub_connection":
25: resource "azurerm_kusto_eventhub_data_connection" "eventhub_connection" {
Versions
- Terraform: 0.14.6
- azurerm: 2.53.0
CodePudding user response: