File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ For a Zip file lambda
29
29
module "lambda_api" {
30
30
source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v2.0.1"
31
31
app_name = "my-lambda-codedeploy-dev"
32
- env = "dev"
33
32
zip_filename = "./src/lambda.zip"
34
33
zip_handler = "index.handler"
35
34
zip_runtime = "nodejs12.x"
@@ -111,7 +110,8 @@ module "lambda_api" {
111
110
| tags | map(string) | A map of AWS Tags to attach to each resource created | {} |
112
111
| role_permissions_boundary_arn | string | IAM Role Permissions Boundary ARN | |
113
112
| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7 |
114
- | lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | [ ] ' |
113
+ | lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | [ ] |
114
+ | lambda_layers | list(string) | List of Lambda Layer Version ARNs (maximum of 5) to attach to your function. | [ ] |
115
115
| timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default) |
116
116
| memory_size | number | Size of the memory of the lambda. CPU will scale along with it | 128 (same as terraform default) |
117
117
| xray_enabled | bool | Whether or not the X-Ray daemon should be created with the Lambda API. | false |
Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ resource "aws_lambda_function" "zip_api" {
251
251
handler = var. zip_handler
252
252
runtime = var. zip_runtime
253
253
publish = true
254
+ layers = var. lambda_layers
254
255
timeout = var. timeout
255
256
memory_size = var. memory_size
256
257
Original file line number Diff line number Diff line change @@ -124,6 +124,12 @@ variable "lambda_policies" {
124
124
default = []
125
125
}
126
126
127
+ variable "lambda_layers" {
128
+ type = list (string )
129
+ description = " List of Lambda Layer Version ARNs (maximum of 5) to attach to your function."
130
+ default = []
131
+ }
132
+
127
133
variable "timeout" {
128
134
type = number
129
135
description = " Timeout (in seconds) for lambda. Defaults to 3 (terraform default"
You can’t perform that action at this time.
0 commit comments