Skip to content

Commit 929d82c

Browse files
committed
NRL-1386 Logic update for lambda subscriptions
1 parent 4eb3695 commit 929d82c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

terraform/infrastructure/locals.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ locals {
3232

3333
reporting_bucket_arn = data.aws_s3_bucket.source-data-bucket.arn
3434
reporting_kms_arn = data.aws_kms_key.glue.arn
35-
firehose_lambda_subscriptions = var.use_shared_resources ? {
36-
"splunk_subscription" : module.firehose__processor[0].firehose_subscription,
37-
"reports_subscription" : module.firehose__processor[0].firehose_reporting_subscription
38-
} : {}
35+
firehose_lambda_subscriptions = var.use_shared_resources ? (
36+
var.enable_reporting ? {
37+
"splunk_subscription" = module.firehose__processor[0].firehose_subscription,
38+
"reports_subscription" = module.firehose__processor[0].firehose_reporting_subscription
39+
} : {
40+
"splunk_subscription" = module.firehose__processor[0].firehose_subscription
41+
}
42+
) : {}
3943
firehost_lambda_splunk_only_subscription = var.use_shared_resources ? {
4044
"splunk_subscription" : module.firehose__processor[0].firehose_subscription
4145
} : {}

0 commit comments

Comments
 (0)