Proposal: erb templating for parameter files
markussiebert opened this issue · 2 comments
Hi,
it would be easy to implement and easy to use erb templates for parameter_files. So we could use some variables inside (even load some other general parameter files inside).
prefix = '/my/prefix'
test = 'testvalue'
%>
<%= File.read('../environment_indipendent_parameters.yml') %>
Parameter1:
parameter_store: '<%= prefix %>/param1'
Parameter2:
parameter_store: '<%= prefix %>/param2'
Parameter3:
parameter_store: '<%= prefix %>/param3'
Parameter4:
parameter_store: '<%= prefix %>/param4/<%= test %>'
What do you think of this idea? I have some use cases for this. Mainly for getting environment specifi parmeters with different prefix, or ParameterNames with different prefixes.
Sure, i can call erb within my pipeline - but it would be more comfortable to do erb on this files while loading them.
What do you think?
The use case seems reasonable, but I'm concerned using ERB encourages people to add more complexity to their parameter files when they should be relatively simple.
I prefer Convention over Configuration, so I wonder how we can enable your behaviour without adding more possible configurations (and possible ways to do it wrong).
Does #350 resolve this?