Upgrading terraform-aws-lambda past version v0.21.0 #685
-
I'm trying to upgrade our Lambda edge code that uses terraform-aws-lambda to v0.21.0 but I'm having issues with the new requirements for
However, when I do that I get errors deploying stating that Here is the full output of the error.
Previously I had my own log group that was created. I removed that with Terraform even though it had a different name. I looked in modules/lambda-edge-multi-region-log-groups/main.tf and it looks like all of the log groups have the same name. If I comment out all but one of the log group regions it still fails. Below is my module code.
This ends up with this Terraform plan:
But I still get the following errors:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Thanks for reporting this issue, @erictompkins. I'll have a look at this, do some investigations, and come back to you in a bit :) I was the engineer who worked on this feature but this was a while ago and I need to refresh my memory! Thanks for the patience |
Beta Was this translation helpful? Give feedback.
-
@Etiene Thank you for looking into this. We tried to update an existing Lambda Edge function and got this issue. We also tried to create a new Lambda Edge function and also got this issue. |
Beta Was this translation helpful? Give feedback.
-
I’m pretty sure that i destroyed the previous function and then tried to
add a new one with the same name.
I have to create some new ones in a different account so I’ll try again.
On Tue, Mar 21, 2023 at 1:33 PM Etiene Dalcol ***@***.***> wrote:
We tried to update an existing Lambda Edge function and got this issue.
As I said, that's expected, the solution is probably related to using terraform
import to add these groups to your state, so I was looking into this to
create a better migration guide for that release.
We also tried to create a new Lambda Edge function and also got this issue.
This, however, is not expected! Because an issue like this should have
been caught by our tests. So I'm going to have to investigate this
separately. Did you destroy the previous function and tried to create a new
one? Did it have the same name or was this with a completely separate
function?
—
Reply to this email directly, view it on GitHub
<#685 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFAM4GUEON62AZM3KQPO3TW5HRALANCNFSM6AAAAAAV7COFJM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
--
Eric Tompkins
President / Founder - Aptuitiv, Inc
Celebrating 16 years of service!
Professional Website Design & Development
Aptuitiv, Inc
207-860-4040
PO Box 129
Farmington, ME 04938
www.aptuitiv.com
|
Beta Was this translation helpful? Give feedback.
-
I created a brand new Lambda function using All of the Cloudwatch groups were created successfully. Your explanation of what's happening with an existing Lambda function makes sense. I'm not sure how to update an existing function. It sounds like importing with I appreciate your help. |
Beta Was this translation helpful? Give feedback.
-
Hi @erictompkins, could you try this and let me know if it will apply without errors? Replace YOUR_FUNCTION_NAME below. You might also have to replace
|
Beta Was this translation helpful? Give feedback.
Hi @erictompkins, could you try this and let me know if it will apply without errors?
Replace YOUR_FUNCTION_NAME below. You might also have to replace
module.lambda_edge
according to how your module is named. If you have more "log group already exists" errors, you can follow this pattern to import the remaining log groups according to the error message you get.