-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform crash while creating plan #31510
Comments
This was working correctly all day, then around 16:00 EDST I started getting plan errors. There were no changes to the configuration or code at all. |
Hi @jim-leary, Thanks for reporting the issue. The stack trace from the crash is here:
Can you supply a minimal example that causes the same crash so we can reproduce the issue? |
I am able to reproduce the error with some simple code - it's rather interesting:
When my root process calls the module above, it is not passing any variables and allowing the default values to be used. The variable "lifecycle_rules" is set to type any, and the default value is {}. This will cause the crash. Changing the variable type to map eliminates the crash. The key here is the use of a variable. Using locals will not cause a crash. Hope this helps. |
Thanks @jim-leary, This looks like something which will be fixed with the upstream patch here: zclconf/go-cty#126. In this case however "fixed" only refers to not panicking, the given expression is still going to return an error, at least for now. The problem is that the Terraform language is not able to find a unified type which can be used for the complete conditional expression. It would be more robust if you define a strict type for |
Thanks - the original "any" designation was a bug on my part; however, not having Terraform panic and cause state-locks would be a big help. |
The upstream library change that @jbardin mentioned was included in one of the v1.2 patch releases and now in the v1.3 series, so this should now be a normal error explaining the problem instead of a panic. Therefore I'm going to close this. If you see something which seems similar to this, please open a new issue for it so we can repeat the reproduction and debugging process against the updated code. (The upstream changes have probably invalidated the stack trace we collected above.) 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. |
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Actual Behavior
Steps to Reproduce
Additional Context
References
The text was updated successfully, but these errors were encountered: