-
Notifications
You must be signed in to change notification settings - Fork 0
✨ feature: Adds the ability to specify the source code hash #8
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
Conversation
This allows for situations where the source code hash changes after the initial evaluation. For example, the source is built during apply via a null resource.
WalkthroughThe changes introduce a new input variable, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Terraform
participant AWS Lambda
User->>Terraform: Provide source_code_hash (optional)
Terraform->>Terraform: Use source_code_hash if provided
alt source_code_hash not provided
Terraform->>Terraform: Compute hash from filename
end
Terraform->>AWS Lambda: Deploy/Update Lambda with code and hash
AWS Lambda-->>Terraform: Acknowledge deployment
Terraform-->>User: Output lambda_function_name
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
💰 Infracost reportMonthly estimate generatedThis comment will be updated when code changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
README.md
(3 hunks)main.tf
(1 hunks)variables.tf
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: terratest
🔇 Additional comments (3)
variables.tf (1)
151-156
: New variable looks correct
Thesource_code_hash
variable is defined consistently with existing defaults and provides the intended override for the computed hash.README.md (2)
101-101
: New input documented correctly
Thesource_code_hash
entry in the inputs table aligns withvariables.tf
.
117-117
: Ensure the output is declared in code
The README lists anlambda_function_name
output, but I didn’t spot its declaration in the module. Please verify or add inoutputs.tf
:output "lambda_function_name" { description = "Name of the deployed Lambda function" value = aws_lambda_function.this.function_name }
This allows for situations where the source code hash changes after the initial evaluation. For example, the source is built during apply via a null resource.
Summary by CodeRabbit
Documentation
New Features