File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Define the directory containing source code and calculate its SHA-256 hash for triggering redeployments
22locals {
33 redis_project_name = " redis_sync"
4+ redis_sync_lambda_name = " ${ local . short_prefix } -redis-sync-lambda"
45 redis_sync_dir = abspath (" ${ path . root } /../${ local . redis_project_name } " )
56 build_dir = " ${ local . redis_sync_dir } /build"
67 zip_file_name = " ${ local . redis_project_name } .zip"
@@ -66,7 +67,7 @@ data "archive_file" "redis_sync_lambda_zip" {
6667}
6768
6869resource "aws_lambda_function" "redis_sync_lambda" {
69- function_name = " ${ local . short_prefix } -redis-sync-lambda "
70+ function_name = local. redis_sync_lambda_name
7071 role = aws_iam_role. redis_sync_lambda_exec_role . arn
7172 handler = " redis_sync.sync_handler" # Update as appropriate
7273 runtime = " python3.11"
@@ -333,6 +334,6 @@ resource "aws_iam_role_policy_attachment" "elasticache_policy_attachment" {
333334}
334335
335336resource "aws_cloudwatch_log_group" "redis_sync_lambda_log_group" {
336- name = " /aws/lambda/${ aws_lambda_function . redis_sync_lambda . function_name } "
337+ name = " /aws/lambda/${ local . redis_sync_lambda_name } "
337338 retention_in_days = 30
338339}
You can’t perform that action at this time.
0 commit comments