hinnerk / cftpl

Templates and Management for AWS CloudFormation
12 stars 6 forks source link

JSON vs. YAML + Jinja2 example needs minor tweak to work #5

Open bedge opened 9 years ago

bedge commented 9 years ago

This is a minor nit, but having a working example of the Jinja2 expansion would help noobs like myself.

I had to change the sample in the docs to this before I got it working: Resources: SOMEDNS: Type: AWS::Route53::RecordSetGroup Properties: Comment: TEST CASE Zone Records HostedZoneName: test.local.

just to show off: YAML does comments

  RecordSets:
    {% for name in ('calendar', 'chat', 'docs', 'mail', 'start') %}
    - Name: {{ name }}.test.local.
      Type: CNAME
      TTL: "43200"
      ResourceRecords: ["ghs.google.com."]
    {% endfor %}

Otherwise I got this error with "cfmgr test" Invalid template property or properties [SOMEDNS]

hinnerk commented 9 years ago

Sorry, I don't spot the difference. Could you post a diff?

bedge commented 9 years ago

It's just the "Resources:" at the top. I admit to noob status here, so that missing line stumped me for a while.