-
Notifications
You must be signed in to change notification settings - Fork 126
Support golang #33
Comments
Hi, Custom build commands were added in v0.11.0. There is an example here which uses Docker: https://github.com/claranet/terraform-aws-lambda/tree/master/tests/build-command It should be possible to have a build script that runs If you get this working, please update this issue and maybe we can add a test for it. Cheers! |
Using version 0.12.0 of this module, I'm trying to deploy a Golang program to Lambda. I keep getting this error:
I'm a little confused as to how / where this zip file should be getting created. If I specify my own build command as It would be good to get some documentation around what's expected of the module caller in order to deliver a binary for deployment. |
Hi @cabrinha, Yes, you'll need to create the zip file yourself when using a custom build command, which you'll need to do if you're building a Go binary. See here in the build-command test/example where it is overriding the build command variable:
It passes 3 variables to Then in terraform-aws-lambda/tests/build-command/lambda/build.sh Lines 26 to 27 in ace2bc9
And ends up writing a zip file to that path:
I guess it's not so obvious because it splits the directory and filename. It has to do that in this example so it can mount the directory as a volume in Docker. You should be able to take the build-command test/example and modify it to use a Go docker image and run If you do get this working, please share the code or submit a PR with a new test/example. |
Hi, Is there a version of this that supports go workflow?
Cheers!
The text was updated successfully, but these errors were encountered: