Skip to content

Commit

Permalink
Renamed deprecated log attribute and remove deprecated retention_poli…
Browse files Browse the repository at this point in the history
…cy attribute
  • Loading branch information
landerss1 committed Dec 4, 2023
1 parent 75ba20d commit 457f170
Showing 1 changed file with 3 additions and 164 deletions.
167 changes: 3 additions & 164 deletions modules/azure/aks/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,59 +143,8 @@ resource "azurerm_monitor_diagnostic_setting" "log_storage_account_audit" {
target_resource_id = azurerm_kubernetes_cluster.this.id
storage_account_id = data.azurerm_storage_account.log.id

log {
category = "kube-scheduler"
enabled = false
}

log {
category = "kube-controller-manager"
enabled = false
}

log {
category = "cloud-controller-manager"
enabled = false
}

log {
category = "csi-azurefile-controller"
enabled = false
}

log {
category = "csi-snapshot-controller"
enabled = false
}

log {
category = "csi-azuredisk-controller"
enabled = false
}

log {
category = "guard"
enabled = false
}

log {
category = "cluster-autoscaler"
enabled = false
}

log {
category = "kube-audit"
enabled = false
}

log {
enabled_log {
category = "kube-audit-admin"
enabled = true
}

log {
category = "kube-apiserver"
enabled = false
}

metric {
Expand Down Expand Up @@ -227,124 +176,14 @@ resource "azurerm_monitor_diagnostic_setting" "log_eventhub_audit" {
target_resource_id = azurerm_kubernetes_cluster.this.id
eventhub_name = var.log_eventhub_name
eventhub_authorization_rule_id = var.log_eventhub_authorization_rule_id

log {
category = "kube-scheduler"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "kube-controller-manager"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "cloud-controller-manager"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "csi-azurefile-controller"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "csi-snapshot-controller"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "csi-azuredisk-controller"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "guard"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {

enabled_log {
category = "cluster-autoscaler"
enabled = true

retention_policy {
enabled = false
days = 0
}
}

log {
category = "kube-audit"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "kube-audit-admin"
enabled = false

retention_policy {
enabled = false
days = 0
}
}

log {
category = "kube-apiserver"
enabled = false
retention_policy {
enabled = false
days = 0
}
}

metric {
category = "AllMetrics"
enabled = false

retention_policy {
days = 0
enabled = false
}
}
}

Expand Down

0 comments on commit 457f170

Please sign in to comment.