Skip to content

Commit

Permalink
removed the attribute retention_policy due to it being deprecated and…
Browse files Browse the repository at this point in the history
… data.log_analytics_workspace_id covers this configuration
  • Loading branch information
shanice-skylight committed Sep 5, 2024
1 parent 951e152 commit 850cf59
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 24 deletions.
1 change: 1 addition & 0 deletions ops/dev4/_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ data "azurerm_key_vault_secret" "report_stream_exception_callback_token" {
data "azurerm_log_analytics_workspace" "log_analytics" {
name = "simple-report-log-workspace-global"
resource_group_name = data.azurerm_resource_group.rg_global.name
retention_in_days = 7
}

data "azurerm_application_insights" "app_insights" {
Expand Down
8 changes: 0 additions & 8 deletions ops/services/alerts/app_service_metrics/exceptions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@ resource "azurerm_monitor_diagnostic_setting" "collect_appserviceconsolelogs" {

enabled_log {
category = "AppServiceConsoleLogs"
retention_policy {
days = 7
enabled = true
}
}
metric {
category = "AllMetrics"
enabled = false
retention_policy {
days = 0
enabled = false
}
}
}

Expand Down
8 changes: 0 additions & 8 deletions ops/services/app_gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,6 @@ resource "azurerm_monitor_diagnostic_setting" "logs_metrics" {
]
content {
category = enabled_log.value

retention_policy {
enabled = false
}
}
}

Expand All @@ -500,10 +496,6 @@ resource "azurerm_monitor_diagnostic_setting" "logs_metrics" {
]
content {
category = metric.value

retention_policy {
enabled = false
}
}
}
}
8 changes: 0 additions & 8 deletions ops/services/postgres_db/monitor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,11 @@ resource "azurerm_monitor_diagnostic_setting" "postgres" {

enabled_log {
category = "PostgreSQLLogs"

retention_policy {
enabled = false
}
}

metric {
category = "AllMetrics"
enabled = true

retention_policy {
enabled = false
}
}
}

0 comments on commit 850cf59

Please sign in to comment.