Skip to content

Commit 2c9ae2e

Browse files
authored
feat(aks.tf): add condition to skip diagnostic setting for existing clusters (#26)
1 parent 1fa9c2b commit 2c9ae2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aks.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module "aks" {
9696
}
9797

9898
resource "azurerm_monitor_diagnostic_setting" "cluster_autoscaler_diagnostic" {
99-
count = var.log_analytics_workspace_enabled ? 1 : 0
99+
count = var.use_existing_cluster ? 0 : var.log_analytics_workspace_enabled ? 1 : 0
100100
name = local.log_analytics_cluster_autoscaler_diagnostic_name
101101
target_resource_id = module.aks[0].aks_id
102102

0 commit comments

Comments
 (0)