Best way to do circular templating? #1795
Replies: 3 comments 4 replies
-
Current:
Wanted:
|
Beta Was this translation helpful? Give feedback.
-
(I've converted to a discussion given that this is a request for advice, rather than a bug report or feature request) Maybe you could clarify a bit so I can understand this better - is the upstream datasource not available when you need to re-generate? I understand that you don't save the JSON locally, but if it's available when you first generate the output, why is it not available the next time? It seems to me that what you need is a different template to take the rendered output (the YAML) and re-render it. If you're dealing with one input (the JSON blob) that's not equivalent to the output (by definition - the YAML files), that's a one-way operation.... It would seem strange to take the output and feed it into the same original templates and expect the same output... |
Beta Was this translation helpful? Give feedback.
-
Hi @jeremych1000, |
Beta Was this translation helpful? Give feedback.
-
Heya - want some advice on this. I'm currently using gomplate to template out some YAML files. Each set of YAML files represents a new user's config.
The input with my data currently is in JSON, and comes from an upstream data source.
My problem is that whenever I make changes to the underlying template e.g. making whitespace changes, new items, etc., I don't have a way to regenerate all the old YAML files.
Crucially, I don't save the JSON blob (not feasible for me to do so).
I want to have it so that the generated YAML files can be fed back into the templates, to generate the newest version of those YAML files.
What's the best way to do this?
Beta Was this translation helpful? Give feedback.
All reactions