Created
July 8, 2021 18:31
-
-
Save isaiahtaylor/8534f1970339c2a6f06d61765c69fa5e to your computer and use it in GitHub Desktop.
Depend on a source directory for terraform deployments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "external" "lambda_source_trigger" { | |
program = ["${path.module}/gethash.sh"] | |
query = { | |
directory = "${path.module}/lambdas/mylambda" | |
} | |
} | |
resource "null_resource" "deploy_lambda" { | |
triggers = { | |
go_source_hash = "${data.external.lambda_source_trigger.result["checksum"]}" | |
} | |
provisioner "local-exec" { | |
# Your deploy code | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment