-
Notifications
You must be signed in to change notification settings - Fork 9k
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_function_event_invoke_config: Retry on additional IAM eventual consistency error with SNS Topic destinations #12171
Conversation
… IAM eventual consistency error with SNS Topic destinations Previous output from acceptance testing (starting January 8, 2020): ``` --- FAIL: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnFailure_Destination (39.34s) testing.go:654: Step 2 error: errors during apply: Error: error putting Lambda Function Event Invoke Config (tf-acc-test-2587868650326248481): InvalidParameterValueException: The function's execution role does not have permissions to call Publish on arn:aws:sns:us-west-2:*******:tf-acc-test-2587868650326248481 --- FAIL: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnSuccess_Destination (38.93s) testing.go:654: Step 2 error: errors during apply: Error: error putting Lambda Function Event Invoke Config (tf-acc-test-3054348441165405395): InvalidParameterValueException: The function's execution role does not have permissions to call Publish on arn:aws:sns:us-west-2:*******:tf-acc-test-3054348441165405395 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_Latest (61.87s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_FunctionVersion (90.83s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_disappears_LambdaFunction (93.91s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_disappears_LambdaFunctionEventInvokeConfig (94.80s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_FunctionName_Arn (99.33s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_Swap (101.83s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_MaximumEventAgeInSeconds (104.62s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_AliasName (106.73s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnFailure_Destination (107.43s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_basic (110.48s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_MaximumRetryAttempts (145.50s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_Remove (146.86s) --- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnSuccess_Destination (151.83s) ```
The contents of |
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, other than the refactoring question 🚀
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_disappears_LambdaFunction (27.97s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_MaximumEventAgeInSeconds (37.98s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_disappears_LambdaFunctionEventInvokeConfig (38.52s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_FunctionVersion (38.66s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_AliasName (39.38s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_basic (39.52s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_Qualifier_Latest (40.14s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_FunctionName_Arn (40.09s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnFailure_Destination (44.12s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_Swap (48.07s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_Remove (48.36s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_MaximumRetryAttempts (54.52s)
--- PASS: TestAccAWSLambdaFunctionEventInvokeConfig_DestinationConfig_OnSuccess_Destination (63.43s)
Since Create and Update usually tend to differ on resources (e.g. different API call, SDK input types, ForceNew), we've historically preferred being verbose with no indirection for each resource function as the consistent implementation across all of them, but there are probably resources like this one with very similar shared logic. As long as the proposed logic does not introduce Go interfaces or complicated |
This has been released in version 2.52.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 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! |
Community Note
Release note for CHANGELOG:
Previous output from acceptance testing (starting January 8, 2020):
Output from acceptance testing: