File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22locals {
3- id_sync_lambda_dir = abspath (" ${ path . root } /../redis_sync" )
3+ lambdas_dir = abspath (" ${ path . root } /../lambdas" )
4+ shared_dir = abspath (" ${ path . root } /../lambdas/shared" )
5+ id_sync_lambda_dir = abspath (" ${ path . root } /../lambdas/id_sync" )
6+
7+ # Get files from both directories
8+ shared_files = fileset (local. shared_dir , " **" )
49 id_sync_lambda_files = fileset (local. id_sync_lambda_dir , " **" )
10+
11+ # Calculate SHA for both directories
12+ shared_dir_sha = sha1 (join (" " , [for f in local . shared_files : filesha1 (" ${ local . shared_dir } /${ f } " )]))
513 id_sync_lambda_dir_sha = sha1 (join (" " , [for f in local . id_sync_lambda_files : filesha1 (" ${ local . id_sync_lambda_dir } /${ f } " )]))
14+
15+ # Combined SHA to trigger rebuild when either directory changes
16+ combined_sha = sha1 (" ${ local . shared_dir_sha } ${ local . id_sync_lambda_dir_sha } " )
617}
718
819resource "aws_ecr_repository" "id_sync_lambda_repository" {
You can’t perform that action at this time.
0 commit comments