bora
bora copied to clipboard
Support inline ruby in yaml config file
My use case was to use ENV['var']
in the bora.yml
so I made this small PR for it.
Does this open up the possibility to include sub-yaml files in bora.yaml?
This is an interesting idea. I've been doing this outside bora with Rake and ERB and previously ansible. I think at minimum it needs a mention in the README.md and some kind of spec test?
I'm in two minds about this. It opens up all sorts of interesting possibilities for how people could integrate bora into their flow. On the other hand it opens up all sorts of possibilities for how people can shoot themselves in the foot.
Would the ENV use case be better supported via a parameter resolver?
my_param: ${env://var}
This is also possibly breaking change, for anyone that already has <%= %>
vars in their bora.yml for other purposes (probably unlikely I know).
@starchx I'm interested in what you'd like to see in terms of breaking up bora.yml. It's something that I've been thinking about, as I have some yamls that are getting pretty big now.
@ampedandwired Personally I think breaking down bora.yml into 'stack' level would be good enough. May have this folder structure:
- templates/ <- all the cfndsl or .json
- config/
- stack1.yml
- stack2.yml
- bora.yml
In the bora.yml, may have something like this:
templates:
stack1: <%= YAML::include("stack1.yml") %>
stack2: <%= YAML::include("stack2.yml") %>
There might be Hash value being overwritten issue, need to be careful with. https://stackoverflow.com/questions/2278241/how-to-include-a-yaml-file-inside-a-yaml-file
AWS have just added a new cloudformation feature stacksets which is kind of targeted at this multiple stack orchestration space.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html
Yeah, saw that. I'm keen to support stacksets somehow, will have to have a think about how to best integrate this.