Requires a single argument which is parsed by glob to support directories and individual files. Exits with 1 if there's an error in one of the templates.
$ rake test:cloudformation_template_syntax[.build/aws/cloudformation/*.template]
> .build/aws/cloudformation/composite-ci-r53.template
+ json syntax is valid
X ERROR: cloudformation syntax is not valid
X A client error (ValidationError) occurred when calling the ValidateTemplate operation: Template format error: Unresolved resource dependencies [zEnvironmentName] in the Resources block of the template
> .build/aws/cloudformation/composite-example-standalone.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/group-elasticsearch-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/group-logstash-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/node-es-ebs-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/node-es-ephemeral-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/node-kibana-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/node-redis-default.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/r53-ci-cname.template
+ json syntax is valid
+ cloudformation syntax is valid
> .build/aws/cloudformation/secgrp-single-default.template
+ json syntax is valid
+ cloudformation syntax is valid
$ echo $?
1
Requires a single argument which is parsed by
glob
to support directories and individual files. Exits with 1 if there's an error in one of the templates.