Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correlation runner module / lambda version #4077

Open
npalm opened this issue Aug 16, 2024 · 2 comments
Open

Correlation runner module / lambda version #4077

npalm opened this issue Aug 16, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@npalm
Copy link
Member

npalm commented Aug 16, 2024

Problem

A common problem is that the lambda's are not updated when update the module. Since the lambda's are not part of the terraform module but referenced.

Challenge is how to figure out the lambda version.

Ideas

  • Tag instances with lambda version, but how to get the version
  • Log the lambda version. This requires the lambda build is setting the right version. Which is either the tag. Or for non tags (development / main) the git ref.
@npalm npalm added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 16, 2024
@jkritzen
Copy link

@npalm:

Why you don't distribute the lambda.zip files wihtin the modules?

The code to utilize the ZIP from the module is already there:

lambda_zip = var.config.lambda_zip == null ? "${path.module}/../../../lambdas/functions/webhook/webhook.zip" : var.config.lambda_zip

The only missing is, that the zip file is not existing which gives an error on plan:

image

If you add the zip files within the module itself, you don't have to brother with the lambda versions, if you update the module, the new lambda version get's deployed.

@npalm
Copy link
Member Author

npalm commented Nov 15, 2024

I think that generated artifacts should not be in source, even if it simple javascript. Indeed it will solve the issue somehow. But I can imagine users will would to verify or rebuild the lambas form a security point of view.

I think it would be better to update the package.json of lambda as port of the release and use that data in the dist build to let the lambda log the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants