-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Output local_filename is available _before_ the package is available #355
Comments
Not sure if |
Yes, that is also an option, but module-level depends_on does some ugly things to the graph. Forcing the output to wait keeps the graph really clean. |
And I did just test my fork with this change and it does indeed fix the problem... |
This issue has been resolved in version 4.1.1 🎉 |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
I was attempting to build the package locally once, and then use it several times in different lambda functions. That ends up looking something like this:
The problem is that the output
local_filename
is determined immediately at plan time, but the zip is only created in the apply phase. Which means the terraform graph determines that it is able to use the value immediately in the apply phase to create the lambda function. Which results in errors of the form:I believe this can be fixed by adding a depends_on statement to the output
local_filename
fornull_resource.archive
:I'll be testing that and opening a pull request shortly if it does indeed fix the behavoir.
The text was updated successfully, but these errors were encountered: