Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

Make EventSourceMapping.starting_position optional. #25

Merged
merged 2 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws/resource_aws_lambda_event_source_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource {
},
"starting_position": {
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
},
"batch_size": {
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/lambda_event_source_mapping.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ layout: "aws"
page_title: "AWS: aws_lambda_event_source_mapping"
sidebar_current: "docs-aws-resource-lambda-event-source-mapping"
description: |-
Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB.
Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional that the trailing period was dropped?

---

# aws_lambda_event_source_mapping

Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB.
Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS

For information about Lambda and how to use it, see [What is AWS Lambda?][1]
For information about event source mappings, see [CreateEventSourceMapping][2] in the API docs.
Expand All @@ -31,7 +31,7 @@ resource "aws_lambda_event_source_mapping" "event_source_mapping" {
* `event_source_arn` - (Required) The event source ARN - can either be a Kinesis or DynamoDB stream.
* `enabled` - (Optional) Determines if the mapping will be enabled on creation. Defaults to `true`.
* `function_name` - (Required) The name or the ARN of the Lambda function that will be subscribing to events.
* `starting_position` - (Required) The position in the stream where AWS Lambda should start reading. Can be one of either `TRIM_HORIZON` or `LATEST`.
* `starting_position` - (Optional) The position in the stream where AWS Lambda should start reading. Must be one of either `TRIM_HORIZON` or `LATEST` if getting events from Kinesis or DynamoDB. Must not be provided if getting events from SQS.

## Attributes Reference

Expand All @@ -53,4 +53,4 @@ Lambda Event Source Mappings can be imported using the `UUID` (event source mapp

```
$ terraform import aws_lambda_event_source_mapping.event_source_mapping 12345kxodurf3443
```
```