File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -485,9 +485,9 @@ data "azurerm_resources" "aks_lb" {
485
485
486
486
resource "azurerm_monitor_diagnostic_setting" "aks-lb" {
487
487
depends_on = [data . azurerm_resources . aks_lb , azurerm_kubernetes_cluster . aks ]
488
- count = var. enabled && var. diagnostic_setting_enable && var. private_cluster_enabled == true ? 1 : 0
489
- name = format (" %s-kubernetes-load-balancer-diagnostic-log" , module. labels . id )
490
- target_resource_id = join ( " " , data. azurerm_resources . aks_lb [count . index ]. resources . * . id )
488
+ count = var. enabled && var. diagnostic_setting_enable && var. private_cluster_enabled == true ? length (data . azurerm_resources . aks_lb [ 0 ] . resources ) : 0
489
+ name = format (" %s-kubernetes-load-balancer-diagnostic-log-%d " , module. labels . id , count . index )
490
+ target_resource_id = data. azurerm_resources . aks_lb [0 ] . resources [ count . index ]. id
491
491
storage_account_id = var. storage_account_id
492
492
eventhub_name = var. eventhub_name
493
493
eventhub_authorization_rule_id = var. eventhub_authorization_rule_id
You can’t perform that action at this time.
0 commit comments