-
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
[Bug]: aws_lambda_function
requires code even with publish disabled
#29043
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
aws_lambda_function
requires code even with publish disabled
Hey @pcallewaert 👋 Thank you for taking the time to raise this! The
|
Hello @justinretzolk, AFAIK we imported most of our lambda functions, so there was no initial deployment package. We use this to manage the runtime and env variables, not the code. |
This completely broke our deployments and appears to be a valid regression. An upgrade to 4.51 from 4.50 should not trigger breakage. |
Same situation happened to me. A lot of Lambdas have been imported prior v4.51.0 and now I can't apply changes because it is requesting the code to deploy. |
Same situation happened to me too. When we create the infrastructure for the first time without a deployed package (obviously) it's going to break the apply. It's not the ideal situation |
i think the same |
Any update here or a way to patch this? |
A workaround to resolve this is to pass the filename with any file, and create an ignore_changes block for the filename.
|
Thank you for mentioning that workaround @delsantosmiranda 🎉. On reviewing this again, with an edge case such as only using the With that in mind, I'm going to close this issue. If you feel I've done this in error, or have additional thoughts that should be considered, please do let me know. |
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. |
Terraform Core Version
1.3.7
AWS Provider Version
4.51.0
Affected Resource(s)
Expected Behavior
With publish set to
false
, thefilename
,image_uri
ors3_bucket
were allowed to be not set (v4.50.0)Actual Behavior
Returns error during
validate
:Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Install provider v4.50.0
Try
terraform validate
with above code. => Should succeed.Upgrade provider to v4.51.0:
Execute
terraform validate
=> Will failDebug Output
No response
Panic Output
No response
Important Factoids
No response
References
I think it's related with the refactor in #28963
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: