-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
templates in user_data always cause a rebuild #1898
Comments
This reworks the template lifecycle a bit such that we get nicer diff behavior. First, we tick ForceNew on for both filename and vars, so that the diff indicates that the template will be "replaced" on change. This is mostly cosmetic, but it also tracks conceptually with the fact that the identifier we use is a hash of the contents, so any change essentially makes a "new resource". Second, we change the Exists implementation to only return `false` when there has been a change in the rendered template. This lets descendent resources see the computed value changing so that they'll properly trigger in the plan. Fixes #1898 Refs #1866 (but does not fix, there's another deeper issue there)
Hey @jwaldrip - thanks for the report. As it happens, I already had a WIP addressing this very issue. Just pushed and we'll get it reviewed and landed soon. |
@phinze 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. |
When using templates for user-data, it seems to cause a change every time I build. Is there anyway to do a sha on the output of the template to tell the statefile that the output is unchanged?
The text was updated successfully, but these errors were encountered: