22locals {
33 lambdas_dir = abspath (" ${ path . root } /../lambdas" )
44 shared_dir = " ${ local . lambdas_dir } /shared"
5- id_sync_lambda_dir = " ${ local . lambdas_dir } / id_sync"
5+ id_sync_lambda_dir = abspath ( " ${ path . root } /../lambdas/ id_sync" )
66 id_sync_dockerfile = " ${ local . lambdas_dir } /id_sync.Dockerfile"
77
88 # Get files from both directories
@@ -13,18 +13,6 @@ locals {
1313 shared_dir_sha = sha1 (join (" " , [for f in local . shared_files : filesha1 (" ${ local . shared_dir } /${ f } " )]))
1414 id_sync_lambda_dir_sha = sha1 (join (" " , [for f in local . id_sync_lambda_files : filesha1 (" ${ local . id_sync_lambda_dir } /${ f } " )]))
1515
16- # Combined SHA to trigger rebuild when either directory changes
17- combined_sha = sha1 (" ${ local . shared_dir_sha } ${ local . id_sync_lambda_dir_sha } " )
18- repo_root = abspath (" ${ path . root } /.." )
19- is_azure_devops = can (regex (" ^/agent/_work" , path. root ))
20-
21- debug_paths = {
22- terraform_root = path.root
23- repo_root = local.repo_root
24- lambdas_dir = local.lambdas_dir
25- dockerfile_path = local.id_sync_dockerfile
26- is_azure = local.is_azure_devops
27- }
2816}
2917
3018resource "aws_ecr_repository" "id_sync_lambda_repository" {
@@ -37,11 +25,11 @@ resource "aws_ecr_repository" "id_sync_lambda_repository" {
3725
3826# Module for building and pushing Docker image to ECR
3927module "id_sync_docker_image" {
40- source = " terraform-aws-modules/lambda/aws//modules/docker-build"
41- version = " 8.0.1"
42-
43- create_ecr_repo = false
44- ecr_repo = aws_ecr_repository. id_sync_lambda_repository . name
28+ source = " terraform-aws-modules/lambda/aws//modules/docker-build"
29+ version = " 8.0.1"
30+ docker_file_path = " Dockerfile "
31+ create_ecr_repo = false
32+ ecr_repo = aws_ecr_repository. id_sync_lambda_repository . name
4533 ecr_repo_lifecycle_policy = jsonencode ({
4634 " rules" : [
4735 {
0 commit comments