Open jeacott1 opened 3 months ago
I'm not quite sure what this is supposed to do or be used for. The configuration
var is of type map any. Why isn't what you are trying to do working?
@pst true, but the setunion won't copy nested maps.
I can't follow. I suggest you take a look at the code. https://github.com/kbst/terraform-kubestack/blob/master/common/configuration/outputs.tf
@pst you are right, it will include the map I wanted, but any overrides in other environments will completely replace instead of amending the map. I guess thinking about it, what I am really asking for here is a special cased variable that would not be a blanket replace in ops/dev etc, where the default map values are preserved unless overridden. It would just be a nice to have option I think. It would help if tf had better support for deep merge but for now at least it doesn't.
Are you planning to send a PR to support merging of nested maps?
It would be helpful for downstream configuration if kubestack users could include arbitrary per environment configuration in the standard structure that was passed through to the output.
ie: given the usual
This could be exported as its own map(map(string/any/?)) and subsequently used in arbitrary foreach blocks instead of having to duplicate the configuration/apps/ops/whatever to add custom bits and pieces. I suggest a separate export here just because 3 levels of map usually gets awkward in tf.
thoughts?