update lambda def and change architectures to be singular - #40
Merged
Conversation
Member
Author
mabadir
approved these changes
Jul 2, 2026
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.
Greptile Summary
This PR renames the
architectures(list) variable toarchitecture(string) across the Terraform module, and significantly restructures the Ravion definition YAML — reorganising UI sections, introducingprebuilt_package/prebuilt_imagebuild types to replacenone, adding explicit ECR lifecycle and scan inputs, and refactoring the stack template to use shared partials.architectures→architecture: All usages updated consistently acrossvariables.tf,lambda_function.tf,locals.tf,validation.tf, tests, README, and the YAML definition. The Terraform layer wraps the scalar back into a list ([var.architecture]) for the AWS provider.prebuilt_package,prebuilt_image), ECR lifecycle section, reordered runtime/zip/image sections,$templatefor the opentofu stack and builder infrastructure, and new CloudWatch Logs integration in the UI.ecr_repository_creation_enabledis no longer gated onbuild_type == nixpacks || dockerfile; a module-managed ECR repo and bootstrap image are now provisioned forprebuilt_imagemode too.Confidence Score: 5/5
Safe to merge. The architectures→architecture rename is consistent across all six touched files and the YAML definition correctly wraps the scalar back into a list for the AWS provider.
All Terraform-layer changes (variable rename, validation, locals, tests, lambda resource) are mutually consistent and verified against variables.tf. The YAML restructuring is a large but coherent reorganisation with no logic gaps found. The only notable inconsistency is ecr_default_lifecycle_policy_enabled being hardcoded to true in the YAML while the Terraform default is false, mirroring the pre-existing timeout mismatch pattern — a cosmetic concern, not a functional defect.
compute/lambda/rvn-lambda-definition.yml — contains the ecr_default_lifecycle_policy_enabled: true hardcoded value that differs from the Terraform variable default.
Important Files Changed
architectures(list) toarchitecture(string) with updated validation; all other variables unchanged.var.architectureinto a list for the AWS provider (architectures = [var.architecture]); also updates the Lambda@Edge check fromalltrue([for a in ...])to a simple equality check.alltrue([for a in var.architectures : a == "x86_64"])tovar.architecture == "x86_64"— semantically equivalent for the new scalar variable.bootstrap_image_platformfromcontains(var.architectures, "arm64")tovar.architecture == "arm64"— correct and equivalent.architectures = ["x86_64"]toarchitecture = "x86_64"to match the renamed variable.$templaterefactor.ecr_default_lifecycle_policy_enabledis hardcoded totruehere while the Terraform variable defaults tofalse.architecturerename; no functional changes.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[package_type input] --> B{package_type?} B -->|Zip| C[architecture string\narchitectures = var.architecture in TF] B -->|Image| D{build_type?} C --> C1[Build: nixpacks / dockerfile / prebuilt_package] C1 --> C2[S3 code bucket\nbootstrap-package.zip seeded] C2 --> C3[Deploy: S3 key] D -->|nixpacks or dockerfile| E[ECR repo created\nBootstrap image pushed] D -->|prebuilt_image| F[ECR repo created\nBootstrap image pushed\nuser image_repository used at deploy] E --> G[Image build pipeline] G --> H[Deploy: image_ref appended to ECR repo URL] F --> I[Deploy: image_ref appended to image_repository input] C3 --> Z[Lambda function updated] H --> Z I --> Z%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[package_type input] --> B{package_type?} B -->|Zip| C[architecture string\narchitectures = var.architecture in TF] B -->|Image| D{build_type?} C --> C1[Build: nixpacks / dockerfile / prebuilt_package] C1 --> C2[S3 code bucket\nbootstrap-package.zip seeded] C2 --> C3[Deploy: S3 key] D -->|nixpacks or dockerfile| E[ECR repo created\nBootstrap image pushed] D -->|prebuilt_image| F[ECR repo created\nBootstrap image pushed\nuser image_repository used at deploy] E --> G[Image build pipeline] G --> H[Deploy: image_ref appended to ECR repo URL] F --> I[Deploy: image_ref appended to image_repository input] C3 --> Z[Lambda function updated] H --> Z I --> ZReviews (2): Last reviewed commit: "tweak" | Re-trigger Greptile