Skip to content

Commit

Permalink
fix(aws): add lambda arn output
Browse files Browse the repository at this point in the history
  • Loading branch information
fredleger committed Feb 16, 2024
1 parent 6fda028 commit 257e727
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws/s3-bucket-notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ No modules.
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | The name of the S3 bucket | `string` | n/a | yes |
| <a name="input_customer"></a> [customer](#input\_customer) | Customer for the current deployment | `string` | `""` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment for the current deployment | `string` | `""` | no |
| <a name="input_lambda_function"></a> [lambda\_function](#input\_lambda\_function) | The lambda function to add to the bucket notification | <pre>list(object({<br> lambda_function_arn = string<br> events = list(string)<br> filter_prefix = string<br> filter_suffix = string<br> }))</pre> | `[]` | no |
| <a name="input_lambda_functions"></a> [lambda\_functions](#input\_lambda\_functions) | The lambda function to add to the bucket notification | <pre>list(object({<br> lambda_function_arn = string<br> events = list(string)<br> filter_prefix = string<br> filter_suffix = string<br> }))</pre> | `[]` | no |
| <a name="input_name"></a> [name](#input\_name) | The name of the template resource | `string` | `"my-template"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Default tags to add to resources | `map(any)` | `{}` | no |

Expand Down
2 changes: 1 addition & 1 deletion aws/s3-bucket-notification/s3-bucket-notification.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "aws_s3_bucket_notification" "bucket_notification" {
bucket = var.bucket_name

dynamic "lambda_function" {
for_each = try(lenght(var.lambda_function, 0), [])
for_each = var.lambda_functions
content {
lambda_function_arn = lambda_function.value.lambda_function_arn
events = lambda_function.value.events
Expand Down
2 changes: 1 addition & 1 deletion aws/s3-bucket-notification/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ variable "bucket_name" {
type = string
}

variable "lambda_function" {
variable "lambda_functions" {
description = "The lambda function to add to the bucket notification"
type = list(object({
lambda_function_arn = string
Expand Down

0 comments on commit 257e727

Please sign in to comment.