-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathlogging.tf
More file actions
28 lines (25 loc) · 902 Bytes
/
logging.tf
File metadata and controls
28 lines (25 loc) · 902 Bytes
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
resource "azurerm_log_analytics_workspace" "fg-loganalytics" {
name = "fg-la-workspace"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku = "PerGB2018"
retention_in_days = 30
}
resource "azurerm_application_insights" "fg-appinsights" {
name = "fg-appinsights"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
workspace_id = azurerm_log_analytics_workspace.fg-loganalytics.id
application_type = "web"
depends_on = [
azurerm_log_analytics_workspace.fg-loganalytics
]
}
output "instrumentation_key" {
value = azurerm_application_insights.fg-appinsights.instrumentation_key
sensitive = true
}
output "app_id" {
value = azurerm_application_insights.fg-appinsights.id
sensitive = true
}