From e08e24af26c21375d857368e98905627b5935050 Mon Sep 17 00:00:00 2001 From: new23d Date: Wed, 6 Mar 2024 12:01:19 +0000 Subject: [PATCH] testing new approach --- modules/terraform-aws-ca-lambda/main.tf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/terraform-aws-ca-lambda/main.tf b/modules/terraform-aws-ca-lambda/main.tf index bdca5d0..5e7f691 100644 --- a/modules/terraform-aws-ca-lambda/main.tf +++ b/modules/terraform-aws-ca-lambda/main.tf @@ -1,7 +1,9 @@ resource "null_resource" "install_python_dependencies" { triggers = { source_archive_checksum = data.archive_file.lambda_source.output_base64sha256 - build_already_present = fileexists("${path.module}/build/${local.file_name}/__init__.py") + + # static value (true) if present, variable value (timestamp()) when not present. (so the 'false' state isn't static and forces a build by change of state whenever so. a static false value doesn't force change of state.) + build_already_present = fileexists("${path.module}/build/${local.file_name}/__init__.py") ? true : timestamp() } provisioner "local-exec" {