boilerplate
boilerplate copied to clipboard
Error message for valid, but incomplete YAML is confusing:
Given this boilerplate.yml
:
# Note that this YML is missing a "variables" declaration at the top!
- name: IncludeAutoScalingExample
description: Should we include an example of how to auto scaling the service based on CPU usage (true or false)?
type: bool
- name: UseGruntKms
description: Should we use gruntkms (true or false)?
type: bool
When I run this command:
boilerplate --template-folder stacks/clients/bolste/patterns/us-west-2/ \
--non-interactive \
--output-folder /repos/gruntwork-clients/bolste/
I get this output:
...
[boilerplate] 2017/01/18 21:27:37 Processing dependency ecs-service-golang-sample, with template folder patterns/infrastructure-modules/services/ecs-service-with-alb and output folder /repos/gruntwork-clients/bolste/infrastructure-modules/ecs-service-golang-sample
[boilerplate] 2017/01/18 21:27:37 Loading boilerplate config from patterns/infrastructure-modules/services/ecs-service-with-alb/boilerplate.yml
yaml: unmarshal errors:
line 6: cannot unmarshal !!seq into map[string]interface {}
While the YAML is valid YAML, it's missing a variables
declaration at the top. The action item here is to output a more helpful error message.