-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
crashed when resource does not exist #12788
Comments
Do you have a reproduction example we can run? Using your basic description of "reference a resource which is actually generated by a module and does not exist" I was unable to reproduce this. I'm probably just missing something. :) |
Sure, sorry about that I can't use same code but I was able to reproduce this issue on this small example: example1.tf
output
running terraform 0.8.6 you get this output:
|
Got it reproduced. Thanks. Looks like our validation is failing when you reference a non-existent module! |
no worries, sorry about my poor first description and I am glad you are able to reproduce it :). Just let me know if you need anything else. |
Fixes #12788 We would panic when referencing an output from an undefined module. The panic above this is correct but in this case Load will not catch interpolated variables that _reference_ an unloaded/undefined module. Test included.
PR has the fix, will be released tomorrow. |
Legend! 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 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. |
Terraform Version
Terraform v0.9.0 (MacOs Sierra)
Affected Resource(s)
When you try to reference a resource which is actually generated by a module and does not exist you get this crashed, however under 0.8.6 you can get the exact details about which resource has not been created.
Panic Output
Expected Behavior
Terraform should tell you which resource does not exist (or give you a hint such as in 0.8.6)
Actual Behavior
Crashed
Steps to Reproduce
execute terraform plan
The text was updated successfully, but these errors were encountered: