Open hashibot opened 7 years ago
Any chance to get this implemented?
@simonweil my implementation of it was never merged, but it’s here: https://github.com/hashicorp/terraform/pull/9924/commits
This could be really useful
Existing implementation will just override existing archive
# Add lambda to package
data "archive_file" "append" {
type = "zip"
source_file = "lambda.py"
output_path = "package.zip"
}
It would be very useful to be able to store lambda code separate from the archived package and just append it like we can do using zip
zip package.zip lambda.py
adding: lambda.py (deflated 37%)
Now we have just two options?
We can store package separate and use Lambda layers, but they are not supported in Lambda@Edge.
This issue was originally opened by @ponyfleisch as hashicorp/terraform#9904. It was migrated here as part of the provider split. The original body of the issue is below.
I'm using AWS Lambda with node, so i package all the dependencies in a zip file. I need to use the template rendering on the main file to set some configurable parameters. If i want to use the Archive provider to create a zip file with the main file and the node_modules directory, i need to keep the node_modules directory unzipped in my module repository.
It would be much better to keep the dependencies around as zip and then use the Archive provider to add the source file to it (creating a new output zip file in the process).