Skip to content

Commit addb5fd

Browse files
committed
remove unsupported and add law
1 parent e553437 commit addb5fd

File tree

1 file changed

+19
-21
lines changed
  • infrastructure/adminservices-test/altinn-apim-test-rg

1 file changed

+19
-21
lines changed

infrastructure/adminservices-test/altinn-apim-test-rg/analytics.tf

+19-21
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ resource "azurerm_api_management_logger" "apimlogger" {
1515
}
1616
}
1717

18+
resource "azurerm_monitor_diagnostic_setting" "apimdiagnostics_settings" {
19+
name = "${var.name_prefix}-apimdiagnostics-settings"
20+
target_resource_id = azurerm_api_management.admin_test_apim.id
21+
log_analytics_workspace_id = azurerm_log_analytics_workspace.apimlogs.id
22+
enabled_log {
23+
category = "GatewayLogs"
24+
}
25+
metric {
26+
category = "AllMetrics"
27+
}
28+
}
29+
1830
resource "azurerm_api_management_diagnostic" "application_insights" {
1931
identifier = "applicationinsights"
2032
resource_group_name = azurerm_resource_group.rg.name
@@ -64,24 +76,10 @@ resource "azurerm_api_management_diagnostic" "application_insights" {
6476
}
6577
}
6678

67-
68-
resource "azurerm_api_management_diagnostic" "azuremonitor" {
69-
identifier = "azuremonitor"
70-
resource_group_name = azurerm_resource_group.rg.name
71-
api_management_name = azurerm_api_management.admin_test_apim.name
72-
api_management_logger_id = azurerm_api_management_logger.apimlogger.id
73-
74-
sampling_percentage = 0.0
75-
always_log_errors = true
76-
log_client_ip = true
77-
verbosity = "information"
78-
http_correlation_protocol = "W3C"
79-
80-
frontend_request {}
81-
82-
frontend_response {}
83-
84-
backend_request {}
85-
86-
backend_response {}
87-
}
79+
resource "azurerm_log_analytics_workspace" "apimlogs" {
80+
name = "${var.name_prefix}-apimlogs"
81+
location = azurerm_resource_group.rg.location
82+
resource_group_name = azurerm_resource_group.rg.name
83+
sku = "PerGB2018"
84+
retention_in_days = 7
85+
}

0 commit comments

Comments
 (0)