acquia / moonshot

Moonshot: Because releasing services shouldn't be a moonshot!
Apache License 2.0
53 stars 49 forks source link

Fixed CloudFormation template check in 'doctor'. #246

Closed borsothy closed 6 years ago

borsothy commented 6 years ago

Doctor fails on master HEAD because it sends all parameters of a stack to the template validation call. parameters on line 324 is actually a function call (see line 83) which returns the parameters of a stack. The template url/body was added to this hash and sent to AWS on line 328 in validate_template. Since that call expects only the url or the body (https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudFormation/Client.html#validate_template-instance_method), it failed like this:

11:51 master $ bundle exec moonshot doctor
Stack
  ✓ CloudFormation template found at 'xxx.json'.
  ✗ Invalid CloudFormation template!
      parameter validator found 33 errors:
        - unexpected value at params["xxx"]
        - unexpected value at params["xxx"]
        - unexpected value at params["xxx"]
...

This proposed change fixes the issue. cc @glennpratt @jamesiarmes