Skip to content

Commit b2b512b

Browse files
CCM-14149: Support Container Based Lambdas
1 parent 262548a commit b2b512b

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

infrastructure/modules/lambda/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| <a name="input_handler_function_name"></a> [handler\_function\_name](#input\_handler\_function\_name) | The name of the lambda handler function (passed directly to the Lambda's handler option) | `string` | `"handler"` | no |
3232
| <a name="input_iam_policy_document"></a> [iam\_policy\_document](#input\_iam\_policy\_document) | n/a | <pre>object({<br/> body = string<br/> })</pre> | `null` | no |
3333
| <a name="input_image_config"></a> [image\_config](#input\_image\_config) | Optional image configuration for Image-based Lambda | <pre>object({<br/> entry_point = optional(list(string))<br/> command = optional(list(string))<br/> working_directory = optional(string)<br/> })</pre> | `null` | no |
34+
| <a name="input_image_repository_names"></a> [image\_repository\_names](#input\_image\_repository\_names) | ECR repository names allowed for Image-based Lambda | `list(string)` | `[]` | no |
3435
| <a name="input_image_uri"></a> [image\_uri](#input\_image\_uri) | ECR image URI for Image-based Lambda | `string` | `null` | no |
3536
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | KMS key arn to use for this function | `string` | n/a | yes |
3637
| <a name="input_lambda_at_edge"></a> [lambda\_at\_edge](#input\_lambda\_at\_edge) | Whether this Lambda is a Lambda@Edge function | `bool` | `false` | no |

infrastructure/modules/lambda/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ variable "image_config" {
132132
default = null
133133
}
134134

135+
variable "image_repository_names" {
136+
type = list(string)
137+
description = "ECR repository names allowed for Image-based Lambda"
138+
default = []
139+
140+
validation {
141+
condition = lower(var.package_type) != "image" || length(var.image_repository_names) > 0
142+
error_message = "image_repository_names must include at least one repository name when package_type is Image."
143+
}
144+
}
145+
135146
variable "schedule" {
136147
type = string
137148
description = "The fully qualified Cloudwatch Events schedule for when to run the lambda function, e.g. rate(1 day) or a cron() expression. Default disables all events resources"

0 commit comments

Comments
 (0)