Skip to content

Commit 422d695

Browse files
VIA-433 AS/AJ Add splunk tf module config to test, preprod, and prod envs
1 parent 2143987 commit 422d695

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

infrastructure/environments/preprod/locals.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ locals {
2525
audit_log_group_name = "/aws/audit/${local.prefix}-audit-logs"
2626
audit_log_stream_name = "audit-logs"
2727

28+
# Splunk
29+
python_version = "python3.13" # Transformer lambda runtime
30+
splunk_log_retention_in_days = 30
31+
2832
application_environment_variables = {
2933
SSM_PREFIX = "/${local.prefix}/"
3034

infrastructure/environments/preprod/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,16 @@ module "deploy_audit" {
5252
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
5353
default_tags = local.default_tags
5454
}
55+
56+
module "deploy_splunk" {
57+
count = var.is_github_action ? 1 : 0
58+
source = "../../modules/deploy_splunk"
59+
60+
prefix = local.prefix
61+
default_tags = local.default_tags
62+
splunk_log_retention_in_days = local.splunk_log_retention_in_days
63+
region = local.region
64+
account_id = data.aws_caller_identity.current.account_id
65+
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
66+
python_version = local.python_version
67+
}

infrastructure/environments/prod/locals.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ locals {
2525
audit_log_group_name = "/aws/audit/${local.prefix}-audit-logs"
2626
audit_log_stream_name = "audit-logs"
2727

28+
# Splunk
29+
python_version = "python3.13" # Transformer lambda runtime
30+
splunk_log_retention_in_days = 90
31+
2832
application_environment_variables = {
2933
SSM_PREFIX = "/${local.prefix}/"
3034

infrastructure/environments/prod/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,16 @@ module "deploy_audit" {
5252
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
5353
default_tags = local.default_tags
5454
}
55+
56+
module "deploy_splunk" {
57+
count = var.is_github_action ? 1 : 0
58+
source = "../../modules/deploy_splunk"
59+
60+
prefix = local.prefix
61+
default_tags = local.default_tags
62+
splunk_log_retention_in_days = local.splunk_log_retention_in_days
63+
region = local.region
64+
account_id = data.aws_caller_identity.current.account_id
65+
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
66+
python_version = local.python_version
67+
}

infrastructure/environments/test/locals.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ locals {
2525
audit_log_group_name = "/aws/audit/${local.prefix}-audit-logs"
2626
audit_log_stream_name = "audit-logs"
2727

28+
# Splunk
29+
python_version = "python3.13" # Transformer lambda runtime
30+
splunk_log_retention_in_days = 30
31+
2832
application_environment_variables = {
2933
SSM_PREFIX = "/${local.prefix}/"
3034

infrastructure/environments/test/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,16 @@ module "deploy_audit" {
6060
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
6161
default_tags = local.default_tags
6262
}
63+
64+
module "deploy_splunk" {
65+
count = var.is_github_action ? 1 : 0
66+
source = "../../modules/deploy_splunk"
67+
68+
prefix = local.prefix
69+
default_tags = local.default_tags
70+
splunk_log_retention_in_days = local.splunk_log_retention_in_days
71+
region = local.region
72+
account_id = data.aws_caller_identity.current.account_id
73+
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
74+
python_version = local.python_version
75+
}

0 commit comments

Comments
 (0)