Skip to content

Commit e1f053a

Browse files
authored
Merge pull request #954 from NHSDigital/feature/jale13-nrl-1386-unsubscribe-status-lambdas
NRL-1386 Status lambdas only send logs to splunk
2 parents b02e73a + 041ee5d commit e1f053a

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

terraform/account-wide-infrastructure/dev/vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ variable "enable_powerbi_auto_push" {
5959
variable "powerbi_gw_instance_type" {
6060
type = string
6161
description = "Type for PowerBI GW EC2 Instance"
62-
default = "t2.micro"
62+
default = "t2.medium"
6363
}
6464

6565
variable "use_powerbi_gw_custom_ami" {

terraform/account-wide-infrastructure/prod/vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ variable "enable_powerbi_auto_push" {
6060
variable "powerbi_gw_instance_type" {
6161
type = string
6262
description = "Type for PowerBI GW EC2 Instance"
63-
default = "t2.micro"
63+
default = "t2.medium"
6464
}
6565

6666
variable "use_powerbi_gw_custom_ami" {

terraform/account-wide-infrastructure/test/vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ variable "enable_powerbi_auto_push" {
7474
variable "powerbi_gw_instance_type" {
7575
type = string
7676
description = "Type for PowerBI GW EC2 Instance"
77-
default = "t2.micro"
77+
default = "t2.medium"
7878
}
7979

8080
variable "use_powerbi_gw_custom_ami" {

terraform/infrastructure/lambda.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ module "consumer__status" {
322322
local.pointers_kms_read_write_arn,
323323
local.auth_store_read_policy_arn
324324
]
325-
firehose_subscriptions = local.firehose_lambda_subscriptions
325+
firehose_subscriptions = local.firehost_lambda_splunk_only_subscription
326326
handler = "status.handler"
327327
retention = var.log_retention_period
328328
}
@@ -351,7 +351,7 @@ module "producer__status" {
351351
local.pointers_kms_read_write_arn,
352352
local.auth_store_read_policy_arn
353353
]
354-
firehose_subscriptions = local.firehose_lambda_subscriptions
354+
firehose_subscriptions = local.firehost_lambda_splunk_only_subscription
355355
handler = "status.handler"
356356
retention = var.log_retention_period
357357
}

terraform/infrastructure/locals.tf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,16 @@ 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
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+
) : {}
43+
firehost_lambda_splunk_only_subscription = var.use_shared_resources ? {
44+
"splunk_subscription" : module.firehose__processor[0].firehose_subscription
3845
} : {}
3946
splunk_environment = local.is_sandbox_env ? "${var.account_name}sandbox" : var.account_name
4047
splunk_index = "aws_recordlocator_${local.splunk_environment}"

0 commit comments

Comments
 (0)