-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_lambda_event_source_mapping: Correct attribute updates #17933
r/aws_lambda_event_source_mapping: Correct attribute updates #17933
Conversation
ba0dd70
to
e824217
Compare
Is there an update on the prospects of merging this PR? |
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.
Looks good. Few small items.
GovCloud is not happy. This looks like it might be an ErrorCheck
/skip situation but not entirely sure the ARN is properly formatted for GovCloud.
=== CONT TestAccAWSLambdaEventSourceMapping_MSK
resource_aws_lambda_event_source_mapping_test.go:648: Step 1/3 error: Error running apply: exit status 1
Error: error creating Lambda Event Source Mapping (arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-2016562689204074231/019556ec-e800-41d2-afcc-ef1a31ac44ba-3): InvalidParameterValueException: Unsupported source arn : arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-2016562689204074231/019556ec-e800-41d2-afcc-ef1a31ac44ba-3
{
RespMetadata: {
StatusCode: 400,
RequestID: "20e5aebf-5211-4c20-af24-5db74f94f09d"
},
Message_: "Unsupported source arn : arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-2016562689204074231/019556ec-e800-41d2-afcc-ef1a31ac44ba-3",
Type: "User"
}
on terraform_plugin_test.tf line 116, in resource "aws_lambda_event_source_mapping" "test":
116: resource "aws_lambda_event_source_mapping" "test" {
--- FAIL: TestAccAWSLambdaEventSourceMapping_MSK (1176.83s)
Besides that test, GovCloud is happy:
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (63.38s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (88.24s)
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (92.21s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (102.56s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (102.63s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (108.21s)
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (115.22s)
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (125.15s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (129.98s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (154.02s)
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (172.60s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (175.10s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (175.16s)
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (175.74s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (212.97s)
Commercial looks happy as well:
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (75.87s)
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (75.92s)
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (81.30s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (84.31s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (87.43s)
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (94.40s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (149.73s)
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (155.12s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (159.49s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (159.66s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (163.30s)
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (165.16s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (168.21s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (188.19s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (199.94s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MSK (2115.02s)
@@ -248,22 +251,25 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte | |||
var eventSourceMappingConfiguration *lambda.EventSourceMappingConfiguration | |||
var err error | |||
err = resource.Retry(5*time.Minute, func() *resource.RetryError { |
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.
As long as we're here, let's move to a const
.
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.
Will use the internal/service/iam/waiter
PropagationTimeout
constant as these are IAM Propagation errors (#17811).
input.ParallelizationFactor = aws.Int64(int64(d.Get("parallelization_factor").(int))) | ||
} | ||
|
||
err := resource.Retry(5*time.Minute, func() *resource.RetryError { |
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.
Same
|
||
params := &lambda.DeleteEventSourceMappingInput{ | ||
input := &lambda.DeleteEventSourceMappingInput{ | ||
UUID: aws.String(d.Id()), | ||
} | ||
|
||
err := resource.Retry(5*time.Minute, func() *resource.RetryError { |
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.
Need a const
// Wait for IAM role | ||
return func(s *terraform.State) error { | ||
rs, ok := s.RootModule().Resources[n] | ||
if !ok { | ||
return fmt.Errorf("Lambda event source mapping not found: %s", n) | ||
return fmt.Errorf("Not found: %s", n) |
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.
More context would be helpful
if err == nil { | ||
return fmt.Errorf("Lambda event source mapping was not deleted") | ||
if err != nil { | ||
return err |
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.
Good to add some context.
The
|
|
In that case, this would be a good time for a service-specific |
Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_MSK' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLambdaEventSourceMapping_MSK -timeout 120m === RUN TestAccAWSLambdaEventSourceMapping_MSK === PAUSE TestAccAWSLambdaEventSourceMapping_MSK === CONT TestAccAWSLambdaEventSourceMapping_MSK --- PASS: TestAccAWSLambdaEventSourceMapping_MSK (2113.21s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 2113.321s
Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_' ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 3 -run=TestAccAWSLambdaEventSourceMapping_ -timeout 120m === RUN TestAccAWSLambdaEventSourceMapping_kinesis_basic === PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_basic === RUN TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize === PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize === RUN TestAccAWSLambdaEventSourceMapping_sqs_basic === PAUSE TestAccAWSLambdaEventSourceMapping_sqs_basic === RUN TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName === PAUSE TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName === RUN TestAccAWSLambdaEventSourceMapping_SQSBatchWindow === PAUSE TestAccAWSLambdaEventSourceMapping_SQSBatchWindow === RUN TestAccAWSLambdaEventSourceMapping_disappears === PAUSE TestAccAWSLambdaEventSourceMapping_disappears === RUN TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected === PAUSE TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected === RUN TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp === PAUSE TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp === RUN TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow === PAUSE TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow === RUN TestAccAWSLambdaEventSourceMapping_ParallelizationFactor === PAUSE TestAccAWSLambdaEventSourceMapping_ParallelizationFactor === RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts === PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts === RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero === PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero === RUN TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds === PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds === RUN TestAccAWSLambdaEventSourceMapping_BisectBatch === PAUSE TestAccAWSLambdaEventSourceMapping_BisectBatch === RUN TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig === PAUSE TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig === RUN TestAccAWSLambdaEventSourceMapping_MSK === PAUSE TestAccAWSLambdaEventSourceMapping_MSK === CONT TestAccAWSLambdaEventSourceMapping_kinesis_basic === CONT TestAccAWSLambdaEventSourceMapping_ParallelizationFactor === CONT TestAccAWSLambdaEventSourceMapping_MSK --- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (74.28s) === CONT TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (80.01s) === CONT TestAccAWSLambdaEventSourceMapping_BisectBatch --- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (73.97s) === CONT TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds --- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (71.95s) === CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero --- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (72.22s) === CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts --- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (85.38s) === CONT TestAccAWSLambdaEventSourceMapping_disappears --- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (71.67s) === CONT TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow --- PASS: TestAccAWSLambdaEventSourceMapping_disappears (77.31s) === CONT TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp --- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (71.84s) === CONT TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected --- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (58.54s) === CONT TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName --- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (34.83s) === CONT TestAccAWSLambdaEventSourceMapping_SQSBatchWindow --- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (45.48s) === CONT TestAccAWSLambdaEventSourceMapping_sqs_basic --- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (103.07s) === CONT TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize --- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (70.70s) --- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (106.17s) --- PASS: TestAccAWSLambdaEventSourceMapping_MSK (1812.73s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 1812.846s
Co-authored-by: Dirk Avery <31492422+YakDriver@users.noreply.github.com>
ae5db3d
to
adececc
Compare
Commercial% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSLambdaEventSourceMapping_ -timeout 180m
=== RUN TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== RUN TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
=== PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
=== RUN TestAccAWSLambdaEventSourceMapping_sqs_basic
=== PAUSE TestAccAWSLambdaEventSourceMapping_sqs_basic
=== RUN TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
=== PAUSE TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
=== RUN TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
=== PAUSE TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
=== RUN TestAccAWSLambdaEventSourceMapping_disappears
=== PAUSE TestAccAWSLambdaEventSourceMapping_disappears
=== RUN TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
=== PAUSE TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
=== RUN TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
=== PAUSE TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
=== RUN TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
=== PAUSE TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
=== RUN TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
=== PAUSE TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
=== RUN TestAccAWSLambdaEventSourceMapping_BisectBatch
=== PAUSE TestAccAWSLambdaEventSourceMapping_BisectBatch
=== RUN TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
=== PAUSE TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
=== RUN TestAccAWSLambdaEventSourceMapping_MSK
=== PAUSE TestAccAWSLambdaEventSourceMapping_MSK
=== CONT TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== CONT TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
=== CONT TestAccAWSLambdaEventSourceMapping_MSK
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (72.38s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (72.43s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne (89.76s)
=== CONT TestAccAWSLambdaEventSourceMapping_BisectBatch
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (72.44s)
=== CONT TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (84.30s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (71.29s)
=== CONT TestAccAWSLambdaEventSourceMapping_disappears
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (74.08s)
=== CONT TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (71.63s)
=== CONT TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (80.12s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (58.31s)
=== CONT TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (70.75s)
=== CONT TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne (70.68s)
=== CONT TestAccAWSLambdaEventSourceMapping_sqs_basic
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (35.43s)
=== CONT TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (59.14s)
=== CONT TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (82.37s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (93.24s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (70.19s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MSK (1496.23s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1499.185s GovCloud% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSLambdaEventSourceMapping_ -timeout 180m
=== RUN TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== RUN TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
=== PAUSE TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
=== RUN TestAccAWSLambdaEventSourceMapping_sqs_basic
=== PAUSE TestAccAWSLambdaEventSourceMapping_sqs_basic
=== RUN TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
=== PAUSE TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
=== RUN TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
=== PAUSE TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
=== RUN TestAccAWSLambdaEventSourceMapping_disappears
=== PAUSE TestAccAWSLambdaEventSourceMapping_disappears
=== RUN TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
=== PAUSE TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
=== RUN TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
=== PAUSE TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
=== RUN TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
=== PAUSE TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
=== RUN TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
=== PAUSE TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
=== RUN TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
=== PAUSE TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
=== RUN TestAccAWSLambdaEventSourceMapping_BisectBatch
=== PAUSE TestAccAWSLambdaEventSourceMapping_BisectBatch
=== RUN TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
=== PAUSE TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
=== RUN TestAccAWSLambdaEventSourceMapping_MSK
=== PAUSE TestAccAWSLambdaEventSourceMapping_MSK
=== CONT TestAccAWSLambdaEventSourceMapping_kinesis_basic
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts
=== CONT TestAccAWSLambdaEventSourceMapping_BisectBatch
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (82.33s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (82.42s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (86.50s)
=== CONT TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne (93.25s)
=== CONT TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (46.66s)
=== CONT TestAccAWSLambdaEventSourceMapping_SQSBatchWindow
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (82.91s)
=== CONT TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne (99.82s)
=== CONT TestAccAWSLambdaEventSourceMapping_ParallelizationFactor
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (99.88s)
=== CONT TestAccAWSLambdaEventSourceMapping_disappears
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (52.91s)
=== CONT TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (81.04s)
=== CONT TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (68.04s)
=== CONT TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (85.00s)
=== CONT TestAccAWSLambdaEventSourceMapping_MSK
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (88.40s)
=== CONT TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (69.94s)
=== CONT TestAccAWSLambdaEventSourceMapping_sqs_basic
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (77.92s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (82.62s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (135.99s)
=== CONT TestAccAWSLambdaEventSourceMapping_MSK
provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
2021/04/23 14:44:54 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.0
Error: error creating Lambda Event Source Mapping (arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-113719509898246532/ec240155-bd5f-4905-b468-915a5b3c1b2f-3): InvalidParameterValueException: Unsupported source arn : arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-113719509898246532/ec240155-bd5f-4905-b468-915a5b3c1b2f-3
{
RespMetadata: {
StatusCode: 400,
RequestID: "f38a707d-8259-4083-94d6-960092e7578a"
},
Message_: "Unsupported source arn : arn:aws-us-gov:kafka:us-gov-west-1:357342307427:cluster/tf-acc-test-113719509898246532/ec240155-bd5f-4905-b468-915a5b3c1b2f-3",
Type: "User"
}
on terraform_plugin_test.tf line 116, in resource "aws_lambda_event_source_mapping" "test":
116: resource "aws_lambda_event_source_mapping" "test" {
--- SKIP: TestAccAWSLambdaEventSourceMapping_MSK (1595.77s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1865.915s |
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.
Great clean up! 🎉
I ran TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
in commercial 5X and it failed 1X. This might indicate additional eventual consistency needed. Or it's just a weird failure.
=== CONT TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName
resource_aws_lambda_event_source_mapping_test.go:193: Step 1/2 error: Error running apply: exit status 1
Error: error creating Lambda Event Source Mapping (arn:aws:sqs:us-west-2:187416307283:tf_acc_stream_lambda_sqs_basic_csjgcuk9): InvalidParameterValueException: Function does not exist
{
RespMetadata: {
StatusCode: 400,
RequestID: "4a5e9e4b-918f-42de-9aa8-9f0fe153161a"
},
Message_: "Function does not exist",
Type: "User"
}
on terraform_plugin_test.tf line 61, in resource "aws_lambda_event_source_mapping" "lambda_event_source_mapping_test":
61: resource "aws_lambda_event_source_mapping" "lambda_event_source_mapping_test" {
--- FAIL: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (163.98s)
Otherwise, output from acceptance testing (us-west-2
):
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (31.20s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (78.27s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (84.02s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (92.13s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (114.12s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (118.28s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (127.55s)
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (128.43s)
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (140.59s)
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (143.75s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne (148.47s)
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (157.75s)
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (162.79s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (180.92s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne (189.78s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (203.23s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (209.34s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MSK (2375.21s)
Output from acceptance testing (GovCloud):
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (87.76s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSecondsNegativeOne (95.40s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (102.07s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsZero (103.44s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttemptsNegativeOne (103.53s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (109.85s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (112.33s)
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (121.20s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (124.25s)
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (153.06s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisBatchWindow (158.95s)
--- PASS: TestAccAWSLambdaEventSourceMapping_SQSBatchWindow (163.17s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (172.08s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (181.49s)
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (191.83s)
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (221.46s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (252.90s)
--- SKIP: TestAccAWSLambdaEventSourceMapping_MSK (1578.53s)
This has been released in version 3.38.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 for triage. Thanks! |
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. |
Community Note
Closes #17888.
Closes #15753.
Closes #14522.
Output from acceptance testing: