Created
July 8, 2021 18:43
-
-
Save isaiahtaylor/e1902c8dc71e3802198c7bb9bf5e9e26 to your computer and use it in GitHub Desktop.
Watch a directory with archive_file (don't do this)
This file contains hidden or 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 "archive_file" "lambda_source" { | |
type = "zip" | |
source_dir = "${path.module}/lambdas/mylambda/" | |
output_path = "lambda_source.zip" | |
} | |
resource "null_resource" "lambda_deploy" { | |
triggers = { | |
lambda_hash = "${data.archive_file.lambda_source.output_sha}" | |
} | |
provisioner "local-exec" { | |
# deploy code | |
# probably upload lambda code to S3 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment