forked from HoussemDellai/azure-monitoring-course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_analytics.tf
More file actions
35 lines (31 loc) · 1.48 KB
/
Copy pathlog_analytics.tf
File metadata and controls
35 lines (31 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
resource "azurerm_log_analytics_workspace" "law" {
name = "log-analytics-${var.prefix}"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = "PerGB2018" # PerGB2018, Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation
retention_in_days = 30 # possible values are either 7 (Free Tier only) or range between 30 and 730
}
resource "azurerm_log_analytics_solution" "windows_event_forwarding" {
solution_name = "WindowsEventForwarding"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
workspace_resource_id = azurerm_log_analytics_workspace.law.id
workspace_name = azurerm_log_analytics_workspace.law.name
plan {
publisher = "Microsoft"
product = "OMSGallery/WindowsEventForwarding"
}
}
# resource "azurerm_log_analytics_solution" "solution" {
# provider = azurerm.subscription_hub
# solution_name = "ContainerInsights"
# location = azurerm_log_analytics_workspace.law.location
# resource_group_name = azurerm_log_analytics_workspace.law.resource_group_name
# workspace_resource_id = azurerm_log_analytics_workspace.law.id
# workspace_name = azurerm_log_analytics_workspace.law.name
# tags = var.tags
# plan {
# publisher = "Microsoft"
# product = "OMSGallery/ContainerInsights"
# }
# }