Skip to content

Commit

Permalink
fix: Updated loadbalancer diagnostic setting
Browse files Browse the repository at this point in the history
  • Loading branch information
13archit committed Jun 13, 2023
1 parent 3029d99 commit e8cc9b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ data "azurerm_resources" "aks_lb" {

resource "azurerm_monitor_diagnostic_setting" "aks-lb" {
depends_on = [data.azurerm_resources.aks_lb, azurerm_kubernetes_cluster.aks]
count = var.enabled && var.diagnostic_setting_enable && var.private_cluster_enabled == true ? 1 : 0
name = format("%s-kubernetes-load-balancer-diagnostic-log", module.labels.id)
target_resource_id = join("", data.azurerm_resources.aks_lb[count.index].resources.*.id)
count = var.enabled && var.diagnostic_setting_enable && var.private_cluster_enabled == true ? length(data.azurerm_resources.aks_lb[0].resources) : 0
name = format("%s-kubernetes-load-balancer-diagnostic-log-%d", module.labels.id,count.index)
target_resource_id = data.azurerm_resources.aks_lb[0].resources[count.index].id
storage_account_id = var.storage_account_id
eventhub_name = var.eventhub_name
eventhub_authorization_rule_id = var.eventhub_authorization_rule_id
Expand Down

0 comments on commit e8cc9b3

Please sign in to comment.