Add support for multiple tfvar files
Add support for multiple tfvar files
Closes #158 (closed)
As OpenTofu allows supplying --var-file multiple times, so should the component.
This MR introduces a new input input.var_files (next to the existing input.var_file to preserve compatibility) which accepts a list of filenames to supply to OpenTofu. Variables from multiple input files will be merged in order, so the last definition wins.
In order to stay compatible with input.var_file, both are added to the arguments, with definitions in var_files taking precedence over var_file. You probably shouldn't use both in combination anyway, but as var_files is the "new" input I think it should take precedence over the "old" one.
Another option to implement this would be to just allow multiple files as a space-delimited list in input.var_file, but I think having a new input with better name and typing is more usable.