Skip to content

Commit 0a7f96f

Browse files
committed
Making null_resource change directory before building
1 parent 345d00b commit 0a7f96f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

r_null.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ resource "null_resource" "lambda_build" {
3333
}
3434

3535
provisioner "local-exec" {
36-
command = "GOOS=linux go build -ldflags '-s -w' -o ./${path.module}/lambdas/bin/${each.key} ./${path.module}/lambdas/cmd/${each.key}/."
36+
command = "cd ${local.main_module_path} && GOOS=linux go build -ldflags '-s -w' -o ./${path.module}/lambdas/bin/${each.key} ./${path.module}/lambdas/cmd/${each.key}/."
3737
}
3838
}

0 commit comments

Comments
 (0)