Skip to content

Commit

Permalink
testing new approach
Browse files Browse the repository at this point in the history
  • Loading branch information
new23d committed Mar 6, 2024
1 parent 3fb26c3 commit e08e24a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/terraform-aws-ca-lambda/main.tf
Original file line number Diff line number Diff line change
@@ -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" {
Expand Down

0 comments on commit e08e24a

Please sign in to comment.