Templates

CloudFormation templates can be provided via Blueprints or JSON/YAML. JSON/YAML templates are specified for stacks via the template_path config.

Jinja2 Templating

Templates with a .j2 extension will be parsed using Jinja2. The CFNgin context and mappings objects and stack variables objects are available for use in the template:

Description: TestTemplate
Resources:
  Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: {{ context.environment.foo }}-{{ variables.myparamname }}