-
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
Error adding dead_letter_config to lambda function #1507
Comments
I've seen this before with
A possible but nasty workaround is to use a provisioner on the IAM role resource to sleep 10 seconds:
Creating/modifying a lambda function should probably retry a couple of times if it spots an error regarding IAMs roles. There are other places in Terraform that do this already. |
That is a nasty workaround. 🥇 Is this something that is likely to be fixed in the provider itself at some point? |
HI folks, the lambda function already does that on the creation part but isn't for the update. For the creation part, it would be to add another if condition with the specified error. Is anyone willing to contribute that? we would be happy to review! :) |
@Ninir - should be an easy fix, might be able to have a look at it on Sunday :-) |
@gazoakley are you still able to take a look at/implement the retry functionality for this? Otherwise, I can easily get this in. We have recently added the update Lambda function retry error handling for EC2 throttling in #2964 and this should be a very similar code update. |
@bflad sorry! I'm not able to do much this week so feel free to grab it 😄 |
PR submitted: #3116 |
Retries for IAM eventual consistency in Lambda function updates have been added in master and will be released in v1.8.0 of the provider -- hopefully tomorrow! 🎉 |
This has been released in terraform-provider-aws version 1.8.0. 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! |
Terraform Version
0.10.2
Affected Resource(s)
Overview and Expected Behavior
I am attempting to add a
dead_letter_config
to an existing Lambda function. In doing so, I'm adding theaws_iam_role_policy
andaws_sqs_queue
resources at the same time.The plan looks correct, but upon applying the plan, we get the error below. A second plan/apply will succeed. As such, I believe the issue I'm hitting has something to do with the interaction and/or dependency of these resources.
Diff of Terraform Code Changes
Plan output
Actual Behavior
The text was updated successfully, but these errors were encountered: