Skip to content

Commit 9444b1f

Browse files
committed
shared.tf
1 parent d462ae3 commit 9444b1f

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

terraform/id_sync_lambda.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22
locals {
3-
shared_dir = abspath("${path.root}/../shared")
43
id_sync_lambda_dir = abspath("${path.root}/../id_sync")
54

6-
# Get files from both directories
7-
shared_files = fileset(local.shared_dir, "**")
85
id_sync_lambda_files = fileset(local.id_sync_lambda_dir, "**")
96

10-
# Calculate SHA for both directories
11-
shared_dir_sha = sha1(join("", [for f in local.shared_files : filesha1("${local.shared_dir}/${f}")]))
127
id_sync_lambda_dir_sha = sha1(join("", [for f in local.id_sync_lambda_files : filesha1("${local.id_sync_lambda_dir}/${f}")]))
138
id_sync_lambda_name = "${local.short_prefix}-id_sync_lambda"
149
}

terraform/redis_sync_lambda.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22
locals {
3-
shared_dir = abspath("${path.root}/../shared")
43
redis_sync_lambda_dir = abspath("${path.root}/../redis_sync")
54

6-
# Get files from both directories
7-
shared_files = fileset(local.shared_dir, "**")
85
redis_sync_lambda_files = fileset(local.redis_sync_lambda_dir, "**")
96

10-
# Calculate SHA for both directories
11-
shared_dir_sha = sha1(join("", [for f in local.shared_files : filesha1("${local.shared_dir}/${f}")]))
127
redis_sync_lambda_dir_sha = sha1(join("", [for f in local.redis_sync_lambda_files : filesha1("${local.redis_sync_lambda_dir}/${f}")]))
138
redis_sync_lambda_name = "${local.short_prefix}-redis_sync_lambda"
149
}

terraform/shared.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Define locals for shared lambdas
2+
locals {
3+
shared_dir = abspath("${path.root}/../shared")
4+
5+
shared_files = fileset(local.shared_dir, "**")
6+
7+
shared_dir_sha = sha1(join("", [for f in local.shared_files : filesha1("${local.shared_dir}/${f}")]))
8+
}

0 commit comments

Comments
 (0)