diff --git a/CHANGELOG.md b/CHANGELOG.md index 14de3fa..a1e5a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [7.9.1] - 2025-01-14 +### Added +- Added Splunk env for segrigatting logs for each environment. + ## [7.9.0] - 2025-01-09 ### Added - Enabled Splunk for log forwarding and implemented health checks for ECS HMS. diff --git a/templates.tf b/templates.tf index 2c8be71..9755f63 100644 --- a/templates.tf +++ b/templates.tf @@ -80,6 +80,7 @@ locals{ splunk_hec_host = var.splunk_hec_host splunk_hec_token = var.splunk_hec_token splunk_hec_index = var.splunk_hec_index + splunk_env = var.splunk_env }) hms_readonly_template = templatefile("${path.module}/templates/apiary-hms-readonly.json", { @@ -143,5 +144,7 @@ locals{ splunk_hec_host = var.splunk_hec_host splunk_hec_token = var.splunk_hec_token splunk_hec_index = var.splunk_hec_index + splunk_env = var.splunk_env + }) } diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 13f4fda..4ccf61f 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -72,7 +72,7 @@ jsonencode({ "splunk-token": "${splunk_hec_token}", "splunk-url": "${splunk_hec_host}", - "splunk-source": "apiary-hms-readonly-logs", + "splunk-source": "apiary-hms-readonly-logs${splunk_env}", "splunk-sourcetype": "hms-logs", "splunk-index": "${splunk_hec_index}" }) : diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 79dd26c..728934e 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -72,7 +72,7 @@ jsonencode({ "splunk-token": "${splunk_hec_token}", "splunk-url": "${splunk_hec_host}", - "splunk-source": "apiary-hms-readwrite-logs", + "splunk-source": "apiary-hms-readwrite-logs${splunk_env}", "splunk-sourcetype": "hms-logs", "splunk-index": "${splunk_hec_index}" }) : diff --git a/variables.tf b/variables.tf index 4ff64db..13df6f4 100644 --- a/variables.tf +++ b/variables.tf @@ -1149,3 +1149,8 @@ variable "splunk_hec_index" { default = "" } +variable "splunk_env" { + description = "Environment in which the Splunk server is sending logs from." + type = string + default = "" +}