Skip to content

Commit 3ac18e0

Browse files
NRL-1664 Add terraform variable to disable all firehose lambda subscriptions
1 parent 08bde0f commit 3ac18e0

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
account_name = "perftest"
22
aws_account_name = "test"
33

4-
domain = "perftest.record-locator.national.nhs.uk"
5-
public_domain = "perftest.api.service.nhs.uk"
6-
deletion_protection = true
7-
log_retention_period = 30
8-
enable_reporting = false
4+
domain = "perftest.record-locator.national.nhs.uk"
5+
public_domain = "perftest.api.service.nhs.uk"
6+
deletion_protection = true
7+
log_retention_period = 30
8+
enable_reporting = false
9+
disable_firehose_lambda_subscriptions = true

terraform/infrastructure/locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ 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 ? (
35+
firehose_lambda_subscriptions = var.use_shared_resources && !var.disable_firehose_lambda_subscriptions ? (
3636
var.enable_reporting ? {
3737
"splunk_subscription" = module.firehose__processor[0].firehose_subscription,
3838
"reports_subscription" = module.firehose__processor[0].firehose_reporting_subscription

terraform/infrastructure/vars.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ variable "enable_reporting" {
6161
description = "Enable reporting for this environment"
6262
default = false
6363
}
64+
65+
variable "disable_firehose_lambda_subscriptions" {
66+
description = "Disable firehose lambda subscriptions (e.g: splunk, reporting) for shared environments (e.g: perftest). This doesn't affect ephemeral environments as the firehose subscriptions are disabled regardless of this setting"
67+
type = bool
68+
default = false
69+
}

0 commit comments

Comments
 (0)