Skip to content

Commit

Permalink
Merge pull request #5 from jlauert/fix_logging_and_retention
Browse files Browse the repository at this point in the history
feat: Compatibility with AzureRM 4
  • Loading branch information
dploeger authored Dec 18, 2024
2 parents 008271a + 0b74249 commit fc1c248
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
19 changes: 2 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,7 @@ resource "azurerm_monitor_diagnostic_setting" "keyvaultaudit" {
target_resource_id = azurerm_key_vault.keyvault.id
storage_account_id = azurerm_storage_account.storageaccountkeyvaultaudit[0].id

log {
enabled_log {
category = "AuditEvent"
enabled = true

retention_policy {
enabled = true
days = var.audit_retention_period
}
}

metric {
category = "AllMetrics"
enabled = false

retention_policy {
enabled = false
}
}
}
}
6 changes: 0 additions & 6 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ variable "enable_audit" {
default = false
}

variable "audit_retention_period" {
type = number
description = "Sets number of days to keep audit records, if audit is enabled"
default = 365
}

variable "soft_delete_retention_days" {
type = number
description = "The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 days"
Expand Down

0 comments on commit fc1c248

Please sign in to comment.