-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/aws_lambda_event_source_mapping: Add starting_position_timestamp argument #6437
resource/aws_lambda_event_source_mapping: Add starting_position_timestamp argument #6437
Conversation
…tamp argument This argument, like `starting_position`, is only used during resource creation and thereforce cannot be updated or read from the Lambda API. ``` --- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (43.90s) --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_disappears (85.32s) --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_import (87.35s) --- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (87.99s) --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (92.56s) --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (94.66s) --- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (108.48s) --- PASS: TestAccAWSLambdaEventSourceMapping_sqsDisappears (121.69s) --- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (122.55s) ```
@@ -136,6 +148,11 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte | |||
params.StartingPosition = aws.String(startingPosition.(string)) | |||
} | |||
|
|||
if startingPositionTimestamp, ok := d.GetOk("starting_position_timestamp"); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to confirm that starting_position
is also lambda.EventSourcePositionAtTimestamp
or can this be specified without it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API returns an error if its incorrectly set (e.g. starting_position = "LATEST"
and starting_position_timestamp = "..."
): InvalidParameterValueException: Timestamp only valid with StartingPosition AT_TIMESTAMP
Since the API returns a helpful error and CustomizeDiff
has a lot of issues for cross-attribute validation, we try to avoid the extra coding, but I can add it in there if you wish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need! That makes sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This has been released in version 1.44.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This argument, like
starting_position
, is only used during resource creation and therefore cannot be updated or read from the Lambda API.Changes proposed in this pull request:
starting_position_timestamp
argumentOutput from acceptance testing: