Skip to content

feat: multi-artifact Lambda (lambda_zips map) — v1.4.0 - #9

Merged
eli-the-wizard merged 7 commits into
mainfrom
multi-artifact-lambda
Aug 29, 2026
Merged

eli-the-wizard merged 7 commits into
mainfrom
multi-artifact-lambda

Conversation

@eli-the-wizard

Copy link
Copy Markdown
Contributor

Summary

Adds optional multi-artifact Lambda support via a new lambda_zips JSON 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

  • Additive: single-artifact path (artifact_path → TF_VAR_lambda_zip) unchanged; lambda_zips takes precedence when set
  • Added lambda_zips input to terraform-lambda-plan.yml, build-deploy-lambda composite, and terraform-lambda-deploy.yml
  • Export logic resolves each lambda_zips value to absolute path and exports TF_VAR_lambda_zips JSON map
  • Multi-zip fixture (examples/lambda-multi-fixture/) with 2 functions + offline-plannable Terraform
  • lambda-multi-smoke CI job validates end-to-end (build → plan shows 2 functions)
  • Docs: README + RELEASING updated with lambda_zips usage, TF contract (variable "lambda_zips" { type = map(string) }), and v1.4.0 notes

Test plan

  • ✅ Fixture offline plan shows 2 Lambda functions to create
  • ✅ actionlint clean
  • ✅ shellcheck clean (Build + Export scripts)
  • ✅ Functional export test (multi-map + single-artifact fallback)
  • ⏳ lambda-multi-smoke job on this PR (end-to-end validation)
  • ⏳ Cross-repo acceptance test (gandalf adoption PR) gated for v1.4.0 release

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Terraform Plan

📖 Stack: lambda
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_lambda_function.fixture will be created
  + resource "aws_lambda_function" "fixture" {
      + architectures                  = (known after apply)
      + arn                            = (known after apply)
      + code_sha256                    = (known after apply)
      + filename                       = "/home/runner/work/atlantis-trident/atlantis-trident/examples/lambda-fixture/dist/lambda.zip"
      + function_name                  = "atlantis-trident-lambda-fixture"
      + handler                        = "handler.handler"
      + id                             = (known after apply)
      + invoke_arn                     = (known after apply)
      + last_modified                  = (known after apply)
      + memory_size                    = 128
      + package_type                   = "Zip"
      + publish                        = false
      + qualified_arn                  = (known after apply)
      + qualified_invoke_arn           = (known after apply)
      + reserved_concurrent_executions = -1
      + role                           = "arn:aws:iam::000000000000:role/fixture"
      + runtime                        = "python3.13"
      + signing_job_arn                = (known after apply)
      + signing_profile_version_arn    = (known after apply)
      + skip_destroy                   = false
      + source_code_hash               = "aFZJXo9lmQWeGEd4VPt3eB74OjU0uxUMFnmTziqop8E="
      + source_code_size               = (known after apply)
      + tags_all                       = (known after apply)
      + timeout                        = 3
      + version                        = (known after apply)

      + environment {
          + variables = {
              + "SOME_SECRET" = (sensitive value)
            }
        }

      + ephemeral_storage (known after apply)

      + logging_config (known after apply)

      + tracing_config (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Last updated 2026-08-29 16:06:46 UTC for commit 4af46e0 · run

eli-the-wizard and others added 2 commits August 29, 2026 11:47
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>
@eli-the-wizard
eli-the-wizard merged commit 016e450 into main Aug 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant