Skip to content

Commit

Permalink
Diagnostics settings fix (#58)
Browse files Browse the repository at this point in the history
* Update providers

* Remove retention_policy
geekzter authored Aug 31, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b43c769 commit 032f637
Showing 5 changed files with 40 additions and 123 deletions.
80 changes: 40 additions & 40 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions terraform/modules/functions/main.tf
Original file line number Diff line number Diff line change
@@ -53,16 +53,8 @@ resource azurerm_monitor_diagnostic_setting function_logs {

enabled_log {
category = "FunctionAppLogs"

retention_policy {
enabled = false
}
}
metric {
category = "AllMetrics"

retention_policy {
enabled = false
}
}
}
20 changes: 0 additions & 20 deletions terraform/modules/minecraft-bedrock-instance/startstop.tf
Original file line number Diff line number Diff line change
@@ -40,19 +40,9 @@ resource azurerm_monitor_diagnostic_setting start_workflow {

enabled_log {
category = "WorkflowRuntime"

retention_policy {
enabled = true
days = 30
}
}
metric {
category = "AllMetrics"

retention_policy {
enabled = true
days = 30
}
}
count = var.enable_auto_startstop && var.start_time != null && var.start_time != "" ? 1 : 0
}
@@ -132,19 +122,9 @@ resource azurerm_monitor_diagnostic_setting stop_workflow {

enabled_log {
category = "WorkflowRuntime"

retention_policy {
enabled = true
days = 30
}
}
metric {
category = "AllMetrics"

retention_policy {
enabled = true
days = 30
}
}

count = var.enable_auto_startstop && var.stop_time != null && var.stop_time != "" ? 1 : 0
20 changes: 0 additions & 20 deletions terraform/modules/minecraft-instance/startstop.tf
Original file line number Diff line number Diff line change
@@ -40,19 +40,9 @@ resource azurerm_monitor_diagnostic_setting start_workflow {

enabled_log {
category = "WorkflowRuntime"

retention_policy {
enabled = true
days = 30
}
}
metric {
category = "AllMetrics"

retention_policy {
enabled = true
days = 30
}
}
count = var.enable_auto_startstop && var.start_time != null && var.start_time != "" ? 1 : 0
}
@@ -133,19 +123,9 @@ resource azurerm_monitor_diagnostic_setting stop_workflow {

enabled_log {
category = "WorkflowRuntime"

retention_policy {
enabled = true
days = 30
}
}
metric {
category = "AllMetrics"

retention_policy {
enabled = true
days = 30
}
}

count = var.enable_auto_startstop && var.stop_time != null && var.stop_time != "" ? 1 : 0
35 changes: 0 additions & 35 deletions terraform/storage.tf
Original file line number Diff line number Diff line change
@@ -98,59 +98,24 @@ resource azurerm_monitor_diagnostic_setting backup_vault {

enabled_log {
category = "AddonAzureBackupAlerts"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "AddonAzureBackupJobs"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "AddonAzureBackupPolicy"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "AddonAzureBackupProtectedInstance"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "AddonAzureBackupStorage"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "AzureBackupReport"

retention_policy {
enabled = true
days = 365
}
}
enabled_log {
category = "CoreAzureBackup"

retention_policy {
enabled = true
days = 365
}
}

count = var.enable_backup ? 1 : 0

0 comments on commit 032f637

Please sign in to comment.