From 755f1d7ae31d1ef3c411a64c8d1ec7c200615774 Mon Sep 17 00:00:00 2001 From: Steven Davidovitz <13248+steved@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:48:01 -0700 Subject: [PATCH] remove azure diagnostic retention settings (#39) * remove azure diagnostic setting resources * don't remove the diagnostic setting, only the retention --- .pre-commit-config.yaml | 4 ++-- .tflint.hcl | 2 +- monitoring.tf | 45 ----------------------------------------- 3 files changed, 3 insertions(+), 48 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2d048c..0eb498a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.4.0 hooks: - id: check-merge-conflict - id: end-of-file-fixer - id: no-commit-to-branch - id: check-case-conflict - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.79.1 + rev: v1.82.0 hooks: - id: terraform_docs args: diff --git a/.tflint.hcl b/.tflint.hcl index 63310bf..9399c26 100644 --- a/.tflint.hcl +++ b/.tflint.hcl @@ -1,5 +1,5 @@ plugin "azurerm" { enabled = true - version = "0.18.0" + version = "0.24.0" source = "github.com/terraform-linters/tflint-ruleset-azurerm" } diff --git a/monitoring.tf b/monitoring.tf index e36938e..24f4193 100644 --- a/monitoring.tf +++ b/monitoring.tf @@ -39,83 +39,38 @@ resource "azurerm_monitor_diagnostic_setting" "control_plane" { enabled_log { category = "cloud-controller-manager" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "cluster-autoscaler" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "csi-azuredisk-controller" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "csi-azurefile-controller" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "csi-snapshot-controller" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "kube-apiserver" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "kube-controller-manager" - - retention_policy { - enabled = true - days = 7 - } } enabled_log { category = "kube-scheduler" - - retention_policy { - enabled = true - days = 7 - } } metric { category = "AllMetrics" enabled = false - - retention_policy { - enabled = false - days = 0 - } } }