Skip to content
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

Add MaxItems to aws_lambda_event_source_mapping.queues #31931

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

justinretzolk
Copy link
Member

Description

This PR adds MaxItems: 1 to the aws_lambda_event_source_mapping.queues argument, as this argument only accepts a single item. Documentation is also modified to reflect this requirement.

While the AWS Go SDK lambda.CreateEventSouceMappingInput type's Queues field doesn't specify a limit of one item, the API documentation (linked below) does, and adding additional items leads to errors (see related issue):

Array Members: Fixed number of 1 item.

Relations

Closes #31919

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccLambdaEventSourceMapping PKG=lambda
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaEventSourceMapping'  -timeout 180m
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_basic
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_basic
=== RUN   TestAccLambdaEventSourceMapping_SQS_basic
=== PAUSE TestAccLambdaEventSourceMapping_SQS_basic
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_basic
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_basic
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== RUN   TestAccLambdaEventSourceMapping_SQS_batchWindow
=== PAUSE TestAccLambdaEventSourceMapping_SQS_batchWindow
=== RUN   TestAccLambdaEventSourceMapping_disappears
=== PAUSE TestAccLambdaEventSourceMapping_disappears
=== RUN   TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
=== PAUSE TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_destination
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_destination
=== RUN   TestAccLambdaEventSourceMapping_msk
=== PAUSE TestAccLambdaEventSourceMapping_msk
=== RUN   TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
=== PAUSE TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
=== RUN   TestAccLambdaEventSourceMapping_selfManagedKafka
=== PAUSE TestAccLambdaEventSourceMapping_selfManagedKafka
=== RUN   TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== PAUSE TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== RUN   TestAccLambdaEventSourceMapping_activeMQ
=== PAUSE TestAccLambdaEventSourceMapping_activeMQ
=== RUN   TestAccLambdaEventSourceMapping_rabbitMQ
=== PAUSE TestAccLambdaEventSourceMapping_rabbitMQ
=== RUN   TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== PAUSE TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== RUN   TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== PAUSE TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== RUN   TestAccLambdaEventSourceMapping_documentDB
=== PAUSE TestAccLambdaEventSourceMapping_documentDB
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_basic
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
=== CONT  TestAccLambdaEventSourceMapping_selfManagedKafka
=== CONT  TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== CONT  TestAccLambdaEventSourceMapping_documentDB
=== CONT  TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== CONT  TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== CONT  TestAccLambdaEventSourceMapping_activeMQ
=== CONT  TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== CONT  TestAccLambdaEventSourceMapping_disappears
=== CONT  TestAccLambdaEventSourceMapping_SQS_batchWindow
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_basic
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== CONT  TestAccLambdaEventSourceMapping_rabbitMQ
--- PASS: TestAccLambdaEventSourceMapping_SQS_batchWindow (93.44s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_batchWindow (94.49s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafka (112.67s)
=== CONT  TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp (124.74s)
=== CONT  TestAccLambdaEventSourceMapping_msk
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne (134.29s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_destination
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts (135.82s)
=== CONT  TestAccLambdaEventSourceMapping_SQS_basic
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig (147.12s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor (152.19s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes (160.23s)
=== NAME  TestAccLambdaEventSourceMapping_documentDB
    event_source_mapping_test.go:1180: Step 1/2 error: Error running apply: exit status 1

        Error: creating DocumentDB cluster: DBClusterParameterGroupNotFound: DBClusterParameterGroup not found: default.docdb4.0
                status code: 404, request id: 4d952800-8a84-456f-8bb9-e9aa9b464df3

          with aws_docdb_cluster.test,
          on terraform_plugin_test.tf line 106, in resource "aws_docdb_cluster" "test":
         106: resource "aws_docdb_cluster" "test" {

--- FAIL: TestAccLambdaEventSourceMapping_documentDB (170.39s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_basic (174.70s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_streamAdded (199.45s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero (199.68s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected (201.15s)
--- PASS: TestAccLambdaEventSourceMapping_disappears (213.54s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds (124.69s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_bisectBatch (130.79s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_basic (230.16s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_destination (108.85s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_scalingConfig (249.61s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds (108.35s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne (109.72s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_filterCriteria (282.50s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_basic (164.29s)
--- PASS: TestAccLambdaEventSourceMapping_rabbitMQ (924.68s)
--- PASS: TestAccLambdaEventSourceMapping_activeMQ (1253.40s)
--- PASS: TestAccLambdaEventSourceMapping_mskWithEventSourceConfig (3332.59s)
--- PASS: TestAccLambdaEventSourceMapping_msk (3475.20s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/lambda     3603.295s
FAIL
make: *** [testacc] Error 1

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/lambda Issues and PRs that pertain to the lambda service. labels Jun 13, 2023
@justinretzolk
Copy link
Member Author

Note: Holding off on adding a changelog entry, as the linting errors make me curious as to whether we should back out the schema change, and instead make this a documentation only change. Will await review before making any additional commits.

@johnsonaj
Copy link
Contributor

johnsonaj commented Jun 15, 2023

Note: Holding off on adding a changelog entry, as the linting errors make me curious as to whether we should back out the schema change, and instead make this a documentation only change. Will await review before making any additional commits.

This seems like a reasonable change to me since the API has always only accepted 1 values in that list; TypeList works better here. You'll also need to make a change on the following lines so that it handles the list instead of the Set

if v, ok := d.GetOk("queues"); ok && v.(*schema.Set).Len() > 0 {
input.Queues = flex.ExpandStringSet(v.(*schema.Set))
}

something like:

	if v, ok := d.GetOk("queues"); ok && len(v.([]interface{})) > 0 {
		input.Queues = flex.ExpandStringList(v.([]interface{}))
	}

@justinretzolk
Copy link
Member Author

Tests after changes:

✖ make testacc TESTS=TestAccLambdaEventSourceMapping PKG=lambda
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaEventSourceMapping'  -timeout 180m
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_basic
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_basic
=== RUN   TestAccLambdaEventSourceMapping_SQS_basic
=== PAUSE TestAccLambdaEventSourceMapping_SQS_basic
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_basic
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_basic
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== RUN   TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== RUN   TestAccLambdaEventSourceMapping_SQS_batchWindow
=== PAUSE TestAccLambdaEventSourceMapping_SQS_batchWindow
=== RUN   TestAccLambdaEventSourceMapping_disappears
=== PAUSE TestAccLambdaEventSourceMapping_disappears
=== RUN   TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
=== PAUSE TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
=== RUN   TestAccLambdaEventSourceMapping_Kinesis_destination
=== PAUSE TestAccLambdaEventSourceMapping_Kinesis_destination
=== RUN   TestAccLambdaEventSourceMapping_msk
=== PAUSE TestAccLambdaEventSourceMapping_msk
=== RUN   TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
=== PAUSE TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
=== RUN   TestAccLambdaEventSourceMapping_selfManagedKafka
=== PAUSE TestAccLambdaEventSourceMapping_selfManagedKafka
=== RUN   TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== PAUSE TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== RUN   TestAccLambdaEventSourceMapping_activeMQ
=== PAUSE TestAccLambdaEventSourceMapping_activeMQ
=== RUN   TestAccLambdaEventSourceMapping_rabbitMQ
=== PAUSE TestAccLambdaEventSourceMapping_rabbitMQ
=== RUN   TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== PAUSE TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== RUN   TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== PAUSE TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== RUN   TestAccLambdaEventSourceMapping_documentDB
=== PAUSE TestAccLambdaEventSourceMapping_documentDB
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_basic
=== CONT  TestAccLambdaEventSourceMapping_selfManagedKafka
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_destination
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_batchWindow
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_bisectBatch
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds
=== CONT  TestAccLambdaEventSourceMapping_mskWithEventSourceConfig
=== CONT  TestAccLambdaEventSourceMapping_SQS_filterCriteria
=== CONT  TestAccLambdaEventSourceMapping_documentDB
=== CONT  TestAccLambdaEventSourceMapping_SQS_scalingConfig
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== CONT  TestAccLambdaEventSourceMapping_disappears
=== CONT  TestAccLambdaEventSourceMapping_SQS_batchWindow
=== CONT  TestAccLambdaEventSourceMapping_msk
=== CONT  TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected
--- PASS: TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected (89.58s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_basic
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_streamAdded (93.64s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_bisectBatch (94.42s)
=== CONT  TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor (106.55s)
=== CONT  TestAccLambdaEventSourceMapping_SQS_basic
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds (115.92s)
=== CONT  TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts
--- PASS: TestAccLambdaEventSourceMapping_SQS_batchWindow (143.24s)
=== CONT  TestAccLambdaEventSourceMapping_activeMQ
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafka (146.17s)
=== CONT  TestAccLambdaEventSourceMapping_rabbitMQ
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne (156.87s)
=== CONT  TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig
=== NAME  TestAccLambdaEventSourceMapping_documentDB
    event_source_mapping_test.go:1180: Step 1/2 error: Error running apply: exit status 1

        Error: creating DocumentDB cluster: DBClusterParameterGroupNotFound: DBClusterParameterGroup not found: default.docdb4.0
                status code: 404, request id: a7309b8e-f120-49c4-9ed4-d969c6470efa

          with aws_docdb_cluster.test,
          on terraform_plugin_test.tf line 106, in resource "aws_docdb_cluster" "test":
         106: resource "aws_docdb_cluster" "test" {

--- PASS: TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp (164.04s)
--- FAIL: TestAccLambdaEventSourceMapping_documentDB (165.92s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds (173.65s)
--- PASS: TestAccLambdaEventSourceMapping_disappears (178.75s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_batchWindow (189.79s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_destination (201.21s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne (209.18s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_scalingConfig (209.60s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes (130.82s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_basic (139.10s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_basic (233.64s)
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig (79.46s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero (149.12s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts (126.17s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_filterCriteria (281.02s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_basic (185.22s)
--- PASS: TestAccLambdaEventSourceMapping_rabbitMQ (624.27s)
--- PASS: TestAccLambdaEventSourceMapping_activeMQ (1029.65s)
--- PASS: TestAccLambdaEventSourceMapping_mskWithEventSourceConfig (3282.95s)
--- PASS: TestAccLambdaEventSourceMapping_msk (3313.43s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/lambda     3316.604s
FAIL
make: *** [testacc] Error 1

@johnsonaj johnsonaj self-assigned this Jun 21, 2023
@johnsonaj johnsonaj added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 21, 2023
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

$ make testacc TESTARGS='-run=TestAccLambdaEventSourceMapping_' PKG=lambda

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20  -run=TestAccLambdaEventSourceMapping_ -timeout 180m
--- PASS: TestAccLambdaEventSourceMapping_disappears (79.70s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_changesInEnabledAreDetected (80.92s)
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafka (99.32s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_streamAdded (100.35s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_batchWindow (114.90s)
=== NAME  TestAccLambdaEventSourceMapping_documentDB
    event_source_mapping_test.go:1180: Step 1/2 error: Error running apply: exit status 1

        Error: creating DocumentDB cluster: InvalidParameterCombination: The Parameter Group default.docdb4.0 with DBParameterGroupFamily docdb4.0 cannot be used for this instance. Please use a Parameter Group with DBParameterGroupFamily docdb5.0
        	status code: 400, request id: d983b938-c579-4ac7-9cb0-83f9247510f8

          with aws_docdb_cluster.test,
          on terraform_plugin_test.tf line 106, in resource "aws_docdb_cluster" "test":
         106: resource "aws_docdb_cluster" "test" {

--- PASS: TestAccLambdaEventSourceMapping_Kinesis_tumblingWindowInSeconds (117.09s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsZero (118.67s)
--- FAIL: TestAccLambdaEventSourceMapping_documentDB (119.71s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttempts (127.05s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_batchWindow (138.95s)
--- PASS: TestAccLambdaEventSourceMapping_selfManagedKafkaWithEventSourceConfig (152.22s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRetryAttemptsNegativeOne (165.15s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_destination (168.52s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_startingPositionTimestamp (170.57s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_basic (173.20s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_parallelizationFactor (178.96s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_filterCriteria (197.61s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_scalingConfig (205.27s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_basic (115.69s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes (115.93s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSecondsNegativeOne (109.05s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_bisectBatch (112.73s)
--- PASS: TestAccLambdaEventSourceMapping_Kinesis_maximumRecordAgeInSeconds (117.45s)
--- PASS: TestAccLambdaEventSourceMapping_SQS_basic (158.99s)
--- PASS: TestAccLambdaEventSourceMapping_rabbitMQ (801.03s)
--- PASS: TestAccLambdaEventSourceMapping_activeMQ (1140.29s)
--- PASS: TestAccLambdaEventSourceMapping_msk (3427.78s)
--- PASS: TestAccLambdaEventSourceMapping_mskWithEventSourceConfig (3454.14s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/lambda	3537.150s
FAIL
make: *** [testacc] Error 1

Test failure not related to code change

@johnsonaj
Copy link
Contributor

@justinretzolk we should add a CHANGELOG entry

@justinretzolk justinretzolk merged commit f52c3f7 into main Jun 23, 2023
@justinretzolk justinretzolk deleted the e-lambda_event_source_mapping-queues branch June 23, 2023 16:08
@github-actions github-actions bot added this to the v5.6.0 milestone Jun 23, 2023
github-actions bot pushed a commit that referenced this pull request Jun 23, 2023
@github-actions
Copy link

This functionality has been released in v5.6.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_lambda_event_source_mapping, attribute queues is misleading
2 participants