bazaarvoice / cloudformation-ruby-dsl

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

Allow whitespace between CLI parameters #104

Closed Noirbot closed 7 years ago

Noirbot commented 7 years ago

The splitting regex that is in place currently causes unexpected behavior for parameter strings like this:

--parameters "ObjectVersion=VERSION; ObjectKey=KEY"

In this case, ObjectVersion will be set as expected, but ObjectKey will be set to null since the DSL is trying to fill the parameter ObjectKey with a leading space and not ObjectKey, without.

Based on the AWS docs I can find, it should be safe to do this, since:

For each parameter, you must declare a logical name, which must be alphanumeric and unique among all logical names within the template.

This implies to me that whitespace is not a valid character in the Logical Name of the param, so we should be safe to ignore it like this.