Closed davidtheclark closed 3 years ago
Sorry, @rclark. I thought I had gotten all the tests working here before but saw this morning that I hadn't. It's fixed now. The problem seems to have been that CFN validation rejects an empty array as a Transform
section, so we need to only add it with cf.merge
if it has content — unlike the other sections.
This PR stops
cf.merge
from removingTransform
sections from templates, enabling cloudfriends to use CloudFormation macros.The trick with this addition is that the Transform section takes a string or array of strings, rather than an object; and the order of the strings in the array does matter. So the validation here is to throw an error if a macro repeats across multiple template arguments, because that situation means you aren't carefully controlling the order of your macros, and you kind of need to.
@rclark for review, please.