Azure / azure-data-labs-modules

A list of Terraform modules to build your Azure Data IaC templates.
http://azuredatalabs.com
MIT License
86 stars 46 forks source link

[bug] fix data explorer module disablement #226

Closed jdocampo closed 1 year ago

jdocampo commented 1 year ago

When module_enabled set to false in the kusto_cluster, gives a reference error to the azurerm_kusto_cluster resource. Private Endpoint Module should be disabled using the count property like other pe modules like storage.

Details

> ╷ > │ Error: Invalid index > │ > │ on .terraform/modules/kusto_cluster/terraform/data-explorer/kusto-cluster/main.tf line 31, in module "dec_pe": > │ 31: basename = "${azurerm_kusto_cluster.adl_dec[0].name}-dec" > │ ├──────────────── > │ │ azurerm_kusto_cluster.adl_dec is empty tuple > │ > │ The given key does not identify an element in this collection value: the collection has no elements. > ╵ > ╷ > │ Error: Invalid index > │ > │ on .terraform/modules/kusto_cluster/terraform/data-explorer/kusto-cluster/main.tf line 35, in module "dec_pe": > │ 35: private_connection_resource_id = azurerm_kusto_cluster.adl_dec[0].id > │ ├──────────────── > │ │ azurerm_kusto_cluster.adl_dec is empty tuple > │ > │ The given key does not identify an element in this collection value: the collection has no elements. > ╵