File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed
Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1+ # Change Log
2+
3+ ## [ 0.1.0] (2023-12-27)
4+
5+ - Provide arbitrary env variables for lambda as input
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ No requirements.
2222| handler | Handler for the aws lambda function, the structure should be the following --> filename.mainfunction | ` string ` | n/a | yes |
2323| lambda\_ role\_ name | Name of the aws lambda execution role | ` string ` | n/a | yes |
2424| lambda\_ runtime | Lambda runtime i.e <python3.8> | ` string ` | ` "python3.8" ` | no |
25+ | lambda\_ vars | n/a | ` map ` | ` {} ` | no |
2526| output\_ path | The path and name of the resulting zip file | ` string ` | n/a | yes |
2627| region | n/a | ` string ` | ` "us-east-1" ` | no |
2728| schedule\_ expression | Cloudwatch rule rate expression for how frequent you want the lambda function to run | ` string ` | n/a | yes |
Original file line number Diff line number Diff line change @@ -15,10 +15,13 @@ resource "aws_lambda_function" "lambda_function" {
1515 timeout = 10
1616
1717 environment {
18- variables = {
19- table_name = local.table_name
20- attribute_name = local.attribute_name
21- }
18+ variables = merge (
19+ {
20+ table_name = local.table_name
21+ attribute_name = local.attribute_name
22+ },
23+ var. lambda_vars
24+ )
2225 }
2326}
2427
Original file line number Diff line number Diff line change @@ -62,4 +62,8 @@ variable "lambda_role_name" {
6262variable "cw_event_is_enabled" {
6363 type = bool
6464 description = " Mark if CW event rule is enabled or not"
65+ }
66+
67+ variable "lambda_vars" {
68+ default = {}
6569}
You can’t perform that action at this time.
0 commit comments