bazaarvoice / cloudformation-ruby-dsl

Ruby DSL for creating Cloudformation templates
Apache License 2.0
210 stars 76 forks source link

added flag for retrieving parameters from the command line #87

Closed hjkatz closed 8 years ago

hjkatz commented 8 years ago
hjkatz commented 8 years ago

Please review the recent changes.

I looked into the amount of effort for attempting to use the old stack during an update step to get the differences in parameters interactively, but it proved too high (for now). It would require a restructuring with a more direct call to dsl compile or something similar. This is because the params are parsed immediately as they are called in the dsl, instead of parsing the dsl then asking for params. This ordering makes it very difficult to even add the interactive mode in the first place.

I would recommend a restructuring of the cfntemplate.rb file into 2 files. One for running, one for the template. Then you can add a compile/parse/extract step for all cli things first (such as params, tags, etc...), and after that you can use those parsed values to create the final template.