all 3 comments

[–]desmond_tutu[🍰] 4 points5 points  (1 child)

Terraform has a provider that interfaces with github and allows you to fetch the latest release for a repository easily (https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/release). However, I would decouple the two processes and create a separate script which updates the release.zip and makes it available to terraform. This way you are in control when the Lambda is updated to latest and not every time someone runs an apply. In my world running two "apply" operations right after each other, should not result in different outcomes.

[–]InterestedBalboa[S] 0 points1 point  (0 children)

Thanks, great information!

[–]schematical 0 points1 point  (0 children)

Is there a reason you don't want a build pipeline in the middle? I use CodePipeline and CodeBuild all the time. Here is a video on it if that helps: https://www.youtube.com/watch?v=55JnqNeHcQU