Skip to content

Commit

Permalink
feat: Accept new arguments function_response_types in `aws_lambda_e…
Browse files Browse the repository at this point in the history
…vent_source_mapping` (#255)
  • Loading branch information
keng000 authored Jan 21, 2022
1 parent 4a44eb9 commit 1fda108
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,19 +592,19 @@ Q4: What does this error mean - `"We currently do not support adding policies fo
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.66 |
| <a name="requirement_external"></a> [external](#requirement\_external) | >= 1 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.69 |
| <a name="requirement_external"></a> [external](#requirement\_external) | >= 1.0 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.66 |
| <a name="provider_external"></a> [external](#provider\_external) | >= 1 |
| <a name="provider_local"></a> [local](#provider\_local) | >= 1 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.69 |
| <a name="provider_external"></a> [external](#provider\_external) | >= 1.0 |
| <a name="provider_local"></a> [local](#provider\_local) | >= 1.0 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |

## Modules

Expand Down
3 changes: 2 additions & 1 deletion examples/event-source-mapping/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ module "lambda_function" {

event_source_mapping = {
sqs = {
event_source_arn = aws_sqs_queue.this.arn
event_source_arn = aws_sqs_queue.this.arn
function_response_types = ["ReportBatchItemFailures"]
}
dynamodb = {
event_source_arn = aws_dynamodb_table.this.stream_arn
Expand Down
10 changes: 8 additions & 2 deletions examples/event-source-mapping/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ terraform {
required_version = ">= 0.13.1"

required_providers {
aws = ">= 3.43"
random = ">= 2"
aws = {
source = "hashicorp/aws"
version = ">= 3.69"
}
random = {
source = "hashicorp/random"
version = ">= 2.0"
}
}
}
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ resource "aws_lambda_event_source_mapping" "this" {
bisect_batch_on_function_error = lookup(each.value, "bisect_batch_on_function_error", null)
topics = lookup(each.value, "topics", null)
queues = lookup(each.value, "queues", null)
function_response_types = lookup(each.value, "function_response_types", null)

dynamic "destination_config" {
for_each = lookup(each.value, "destination_arn_on_failure", null) != null ? [true] : []
Expand Down
20 changes: 16 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ terraform {
required_version = ">= 0.13.1"

required_providers {
aws = ">= 3.66"
external = ">= 1"
local = ">= 1"
null = ">= 2"
aws = {
source = "hashicorp/aws"
version = ">= 3.69"
}
external = {
source = "hashicorp/external"
version = ">= 1.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.0"
}
null = {
source = "hashicorp/null"
version = ">= 2.0"
}
}
}

0 comments on commit 1fda108

Please sign in to comment.