From 477f732ff2d29fc8051a4c2c38c83b1bdbecbc3c Mon Sep 17 00:00:00 2001 From: Azat Safin Date: Sun, 10 Apr 2022 16:33:16 +0300 Subject: [PATCH] use absolute path for docker-build module --- wg-manage-lambda.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wg-manage-lambda.tf b/wg-manage-lambda.tf index 84a7dc9..553235d 100644 --- a/wg-manage-lambda.tf +++ b/wg-manage-lambda.tf @@ -155,8 +155,8 @@ module "wg_manage_image" { source = "terraform-aws-modules/lambda/aws//modules/docker-build" create_ecr_repo = true ecr_repo = "${local.name}-wg-manage" - image_tag = var.users_management_type == "iam" ? filesha256("${path.module}/lambdas/wg-manage-iam/app.py") : filesha256("${path.module}/lambdas/wg-manage-cognito/app.py") - source_path = var.users_management_type == "iam" ? "${path.module}/lambdas/wg-manage-iam" : "${path.module}/lambdas/wg-manage-cognito" + image_tag = var.users_management_type == "iam" ? filesha256("${path.cwd}/lambdas/wg-manage-iam/app.py") : filesha256("${path.cwd}/lambdas/wg-manage-cognito/app.py") + source_path = var.users_management_type == "iam" ? "${path.cwd}/lambdas/wg-manage-iam" : "${path.cwd}/lambdas/wg-manage-cognito" } #data "aws_cognito_user_pool_clients" "cognito" {