-
Notifications
You must be signed in to change notification settings - Fork 969
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
Simplify DefaultFunc to just Default #379
Simplify DefaultFunc to just Default #379
Conversation
Indeed! This used to be dynamic at some point: b89dbbd#diff-87d7af58ecf86062f1ac897d735c8c0dR216 But that was later changed. Edit: can't recollect the actual use case back then, #193 was a long running PR that was reworked/rebased several times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Change looks good at first glance. Have you considered the implications of the default function now being evaluated a different time during runtime? Can that raise any issues? (I have to look into the differences myself). |
Given how DefaultValue() works it's safe change. Yes, execution time changes, but effect is still the same as function only relates on 'isComputed' which cannot differ over time because it's value, not pointer. |
AFAIR, the default value of some specific field was dynamic, but that was useless, so I removed it. |
So, it's ok to merge? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is green, I think we are good to merge.
There's no need for functions and it can be inlined.
This change will help showing proper default values in IntelliJ-Terraform plugin.