Adds log_analytics module and workspace
This commit is contained in:
15
terraform/modules/log_analytics/main.tf
Normal file
15
terraform/modules/log_analytics/main.tf
Normal file
@@ -0,0 +1,15 @@
|
||||
resource "azurerm_resource_group" "log_workspace" {
|
||||
name = "${var.name}-${var.environment}-log-workspace"
|
||||
location = var.region
|
||||
}
|
||||
|
||||
resource "azurerm_log_analytics_workspace" "log_workspace" {
|
||||
name = "${var.name}-${var.environment}-log-workspace"
|
||||
location = azurerm_resource_group.log_workspace.location
|
||||
resource_group_name = azurerm_resource_group.log_workspace.name
|
||||
sku = "Premium"
|
||||
tags = {
|
||||
environment = var.environment
|
||||
owner = var.owner
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user