-
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
Fix aws_lambda_event_source_mapping function name flapping #5454
Conversation
// Using function name or ARN should not be shown as a diff. | ||
// Try to convert the old and new values from ARN to function name | ||
oldFunctionName, oldFunctionNameErr := getFunctionNameFromLambdaArn(old) | ||
newFunctionName, newFunctionNameErr := getFunctionNameFromLambdaArn(old) |
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.
Should this be getFunctionNameFromLambdaArn(new)
?
Sorry about that... Reran the tests
|
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, thanks @julienduchesne! 🚀
8 tests passed (all tests)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (34.09s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_disappears (74.80s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_import (75.37s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (79.74s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (80.51s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqsDisappears (96.38s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (97.36s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (102.55s)
This has been released in version 1.34.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! |
Went with DiffSupressFunc finally. I thought it was a bit weird to deprecate an argument just to prevent some flapping. Also, there's already a function implemented to get the function name from a lambda ARN
Changes proposed in this pull request:
function_name
argument that tries to convert the old value from ARN to name as well as the new one. This prevents flapping from name to ARN.Output from acceptance testing: