Max Rohde
Aug 17, 2022

--

Nice boilerplate. I see you do a loop in Terraform to identify all required the Lambda functions.

I recently tried to solve a similar problem and arrived at a bit of a different solution. To identify the functions in a TypeScript script: https://github.com/goldstack/goldstack/blob/master/workspaces/templates-lib/packages/utils-aws-lambda/src/generate/collectLambdasFromFiles.ts#L90 and then read out all Lambdas from a TF variable: https://github.com/goldstack/goldstack/blob/master/workspaces/templates/packages/serverless-api/infra/aws/lambda_routes.tf#L13 .

Here some more information about the approach taken if you are interested https://docs.goldstack.party/docs/templates/serverless-api#development

--

--

Max Rohde
Max Rohde

Written by Max Rohde

Long-time coder, PhD and former lecturer. Currently leading awesome engineering teams. Say hi on mxro.de

No responses yet