From 8b01ae82ac0d19620d8c661e81e818cd1e190751 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:58:50 +0000 Subject: [PATCH 1/2] Update Terraform azurerm to v4.14.0 (#254) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- operations/environments/dev/main.tf | 2 +- operations/environments/internal/main.tf | 2 +- operations/environments/pr/main.tf | 2 +- operations/environments/prd/main.tf | 2 +- operations/environments/stg/main.tf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/operations/environments/dev/main.tf b/operations/environments/dev/main.tf index d307174..9bd7ebc 100644 --- a/operations/environments/dev/main.tf +++ b/operations/environments/dev/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.13.0" + version = "4.14.0" } } diff --git a/operations/environments/internal/main.tf b/operations/environments/internal/main.tf index c6d83ae..30ce8e3 100644 --- a/operations/environments/internal/main.tf +++ b/operations/environments/internal/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.13.0" + version = "4.14.0" } } diff --git a/operations/environments/pr/main.tf b/operations/environments/pr/main.tf index a2a5c76..802573b 100644 --- a/operations/environments/pr/main.tf +++ b/operations/environments/pr/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.13.0" + version = "4.14.0" } } diff --git a/operations/environments/prd/main.tf b/operations/environments/prd/main.tf index 3c2fbab..58186b5 100644 --- a/operations/environments/prd/main.tf +++ b/operations/environments/prd/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.13.0" + version = "4.14.0" } } diff --git a/operations/environments/stg/main.tf b/operations/environments/stg/main.tf index 541d880..1badd7d 100644 --- a/operations/environments/stg/main.tf +++ b/operations/environments/stg/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.13.0" + version = "4.14.0" } } From 679441c7d81dd83bdf913b141b874b45c1206275 Mon Sep 17 00:00:00 2001 From: Sylvie Date: Tue, 17 Dec 2024 10:50:52 -0600 Subject: [PATCH 2/2] split out live and pre-live queries (#253) Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com> --- operations/template/logs.tf | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/operations/template/logs.tf b/operations/template/logs.tf index 36ea5ee..490e041 100644 --- a/operations/template/logs.tf +++ b/operations/template/logs.tf @@ -25,14 +25,24 @@ resource "azurerm_log_analytics_query_pack" "application_logs_pack" { } } -resource "azurerm_log_analytics_query_pack_query" "structured_application_logs" { - display_name = "RS SFTP's Raw Application Logs" - description = "View all RS SFTP's application logs in a structured format" +resource "azurerm_log_analytics_query_pack_query" "live_structured_application_logs" { + display_name = "RS SFTP's Live Slot Raw Application Logs" + description = "View RS SFTP's live slot application logs in a structured format" query_pack_id = azurerm_log_analytics_query_pack.application_logs_pack.id categories = ["applications"] - body = "AppServiceConsoleLogs | project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult) | project-reorder ['time'], level, msg" + body = "AppServiceConsoleLogs | where _ResourceId !contains 'pre-live' | project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult) | project-reorder ['time'], level, msg" +} + +resource "azurerm_log_analytics_query_pack_query" "prelive_structured_application_logs" { + display_name = "RS SFTP's Pre-Live Slot Raw Application Logs" + description = "View RS SFTP's pre-live slot application logs in a structured format" + + query_pack_id = azurerm_log_analytics_query_pack.application_logs_pack.id + categories = ["applications"] + + body = "AppServiceConsoleLogs | where _ResourceId contains 'pre-live' | project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult) | project-reorder ['time'], level, msg" } resource "azurerm_monitor_diagnostic_setting" "app_to_logs" {