craigmonson / colonize

A terraform tool to manage environment driven templating.
MIT License
20 stars 5 forks source link

allow .colonize.yaml OR .colonize.yml #9

Closed craigmonson closed 7 years ago

craigmonson commented 7 years ago

As they're both respected file extensions, we should allow for both.

jyore commented 7 years ago

I was looking at this as well and there are a couple implementation options.

1) have an array of acceptable names to look through on each search, instead of the one. While simple, it may not be the most efficient and the test case will have to be modified

2) use a glob to pull in the files. This works, though this would technically allow for weird options for extensions like .colonize.yasdfghjkml

3) change it to just be .colonize with no extension. No real downsides other than the format is not implied through extension. Alternatively, this could follow the git model where you have a .colonize directory and then a config file(s) inside of that.

4) Change implementation to actually read the available files and then use a pattern match to select a valid file. Downside is really just that it's just a reimplementation

@craigmonson do you have a preference or thought on another way to do this?

jyore commented 7 years ago

Note: in #4 above, it's also less efficient due to having to collect each file

craigmonson commented 7 years ago

I think #1 is probably the way to go.