File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,19 @@ resource "aws_lambda_function" "forwarding_lambda" {
209209 size = 1024
210210 }
211211
212+ vpc_config {
213+ subnet_ids = local. private_subnet_ids
214+ security_group_ids = [data . aws_security_group . existing_securitygroup . id ]
215+ }
216+
212217 environment {
213218 variables = {
214219 SOURCE_BUCKET_NAME = aws_s3_bucket.batch_data_source_bucket.bucket
215220 ACK_BUCKET_NAME = aws_s3_bucket.batch_data_destination_bucket.bucket
216221 DYNAMODB_TABLE_NAME = aws_dynamodb_table.events- dynamodb- table.name
217222 SQS_QUEUE_URL = aws_sqs_queue.fifo_queue.url
223+ REDIS_HOST = data.aws_elasticache_cluster.existing_redis.cache_nodes[0 ].address
224+ REDIS_PORT = data.aws_elasticache_cluster.existing_redis.cache_nodes[0 ].port
218225 }
219226 }
220227 kms_key_arn = data. aws_kms_key . existing_lambda_encryption_key . arn
Original file line number Diff line number Diff line change @@ -15,19 +15,19 @@ variable "aws_region" {
1515}
1616
1717locals {
18- environment = terraform. workspace == " green" ? " prod" : terraform. workspace == " blue" ? " prod" : terraform. workspace
19- env = terraform. workspace
20- prefix = " ${ var . project_name } -${ var . service } -${ local . env } "
21- short_prefix = " ${ var . project_short_name } -${ local . env } "
22- batch_prefix = " immunisation-batch-${ local . env } "
23- config_env = local. environment == " prod" ? " prod" : " dev"
18+ environment = terraform. workspace == " green" ? " prod" : terraform. workspace == " blue" ? " prod" : terraform. workspace
19+ env = terraform. workspace
20+ prefix = " ${ var . project_name } -${ var . service } -${ local . env } "
21+ short_prefix = " ${ var . project_short_name } -${ local . env } "
22+ batch_prefix = " immunisation-batch-${ local . env } "
23+ config_env = local. environment == " prod" ? " prod" : " dev"
2424
2525 root_domain = " ${ local . config_env } .vds.platform.nhs.uk"
2626 project_domain_name = data. aws_route53_zone . project_zone . name
2727 service_domain_name = " ${ local . env } .${ local . project_domain_name } "
2828
29- config_bucket_arn = aws_s3_bucket. batch_config_bucket . arn
30- config_bucket_name = aws_s3_bucket. batch_config_bucket . bucket
29+ config_bucket_arn = aws_s3_bucket. batch_config_bucket . arn
30+ config_bucket_name = aws_s3_bucket. batch_config_bucket . bucket
3131
3232
3333 # Public subnet - The subnet has a direct route to an internet gateway. Resources in a public subnet can access the public internet.
You can’t perform that action at this time.
0 commit comments