@@ -3,12 +3,13 @@ locals {
33 filename_lambda_dir = abspath (" ${ path . root } /../../lambdas/filenameprocessor" )
44 filename_lambda_files = fileset (local. filename_lambda_dir , " **" )
55 filename_lambda_dir_sha = sha1 (join (" " , [for f in local . filename_lambda_files : filesha1 (" ${ local . filename_lambda_dir } /${ f } " )]))
6- dps_bucket_for_extended_attribute = (
7- var. environment == " prod" ? " nhsd-dspp-core-prod-extended-attributes-gdp" : " nhsd-dspp-core-ref-extended-attributes-gdp"
6+ dps_bucket_name_for_extended_attribute = (
7+ var. environment == " prod"
8+ ? " nhsd-dspp-core-prod-extended-attributes-gdp"
9+ : " nhsd-dspp-core-ref-extended-attributes-gdp"
810 )
9-
1011 dps_bucket_arn_for_extended_attribute = [
11- " arn:aws:s3:::${ local . dps_bucket_for_extended_attribute } /*"
12+ " arn:aws:s3:::${ local . dps_bucket_name_for_extended_attribute } /*"
1213 ]
1314}
1415
@@ -297,7 +298,7 @@ resource "aws_lambda_function" "file_processor_lambda" {
297298 DPS_ACCOUNT_ID = var.dspp_core_account_id
298299 SOURCE_BUCKET_NAME = aws_s3_bucket.batch_data_source_bucket.bucket
299300 ACK_BUCKET_NAME = aws_s3_bucket.batch_data_destination_bucket.bucket
300- DPS_BUCKET_NAME = " nhsd-dspp-core-ref-extended-attributes-gdp "
301+ DPS_BUCKET_NAME = local.dps_bucket_name_for_extended_attribute
301302 QUEUE_URL = aws_sqs_queue.batch_file_created.url
302303 REDIS_HOST = data.aws_elasticache_cluster.existing_redis.cache_nodes[0 ].address
303304 REDIS_PORT = data.aws_elasticache_cluster.existing_redis.cache_nodes[0 ].port
0 commit comments