feat: multi-artifact Lambda (lambda_zips map) — v1.4.0 - #9
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Terraform Plan📖 Stack:
|
Both lambda-smoke and lambda-multi-smoke call terraform-lambda-plan on the same ref; the shared concurrency group (cancel-in-progress) made them cancel each other. Include working_directory so distinct roots don't collide. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The deploy workflow's prepare job dropped any app carrying lambda_zips but no artifact_path (normalize filtered on artifact_path alone), and the single-app fallback never read lambda_zips — so the multi-artifact deploy path (gandalf's case) was non-functional. Only the plan path was smoked, so CI missed it. - prepare: normalize keeps build_command + (artifact_path OR lambda_zips); add LAMBDA_ZIPS to env; single-app fallback accepts either and emits lambda_zips (object or null) in the app object. - deploy jobs: pass the matrix object via toJSON(matrix.app.lambda_zips) so an absent key serializes to the string "null" instead of an unreliable object coercion. - build-assert + export conditions (composite AND plan workflow, kept byte-for-byte identical) treat "null" as no-lambda_zips → single path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional multi-artifact Lambda support via a new
lambda_zipsJSON map input, allowing repos to deploy N Lambda functions from one Terraform root with shared resources (DynamoDB, SNS, SQS) without splitting roots or migrating state.Changes
artifact_path→TF_VAR_lambda_zip) unchanged;lambda_zipstakes precedence when setlambda_zipsinput toterraform-lambda-plan.yml,build-deploy-lambdacomposite, andterraform-lambda-deploy.ymllambda_zipsvalue to absolute path and exportsTF_VAR_lambda_zipsJSON mapexamples/lambda-multi-fixture/) with 2 functions + offline-plannable Terraformlambda-multi-smokeCI job validates end-to-end (build → plan shows 2 functions)lambda_zipsusage, TF contract (variable "lambda_zips" { type = map(string) }), and v1.4.0 notesTest plan
lambda-multi-smokejob on this PR (end-to-end validation)🤖 Generated with Claude Code