Skip to content

Commit

Permalink
Create sanitech_logging.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Apr 19, 2024
1 parent 8632be2 commit 0dc85cd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions func/sanitech_logging.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
resource "azurerm_monitor_diagnostic_setting" "example" {
name = "example-diagnostic-setting"
target_resource_id = data.azurerm_resource_group.example.id
log_analytics_workspace_id = azurerm_log_analytics_workspace.example.id

log {
category ="Administrative"
enabled = true

retention_policy {
enabled = false
}
}

metric {
category = "AllMetrics"
enabled = true

retention_policy {
enabled = false
}
}
}

resource "azurerm_log_analytics_workspace" "example" {
name = "example-logs"
location = "eastus"
resource_group_name = azurerm_resource_group.example.name
sku = "PerGB2018"
retention_in_days = 30
}

resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "eastus"
}

data "azurerm_subscription" "primary" {}

0 comments on commit 0dc85cd

Please sign in to comment.