Jump to: navigation, search

Difference between revisions of "Heat/YAMLTemplates"

Line 6: Line 6:
 
So that Heat is not held back by this design decision, a new template format is proposed which will be supported alongside the existing [[CloudFormation]] format.
 
So that Heat is not held back by this design decision, a new template format is proposed which will be supported alongside the existing [[CloudFormation]] format.
  
This format will be a [http://www.yaml.org/ YAML] based syntax.
+
This format will be a [http://www.yaml.org/ YAML] based syntax. The initial version of this new format will be a YAML document which parses to the same document structure as the current [[CloudFormation]] format. Future format changes will most likely focus on making it easier to write templates by hand.
 +
 
 +
Here are some examples of the new format.
 +
 
 +
This is an empty file:
 +
 
 +
<pre><nowiki>#!highlight yaml
 +
 
 +
</nowiki></pre>
 +
 
 +
 
 +
Which is equivalent to this skeleton template:
 +
 
 +
<pre><nowiki>#!highlight yaml
 +
HeatTemplateFormatVersion: '2012-12-12'
 +
Parameters: {}
 +
Mappings: {}
 +
Resources: {}
 +
Outputs: {}
 +
</nowiki></pre>

Revision as of 01:51, 28 November 2012

The CloudFormation template syntax is based on JSON. This has shortcomings for templates maintained by hand, most notably:

  • lack of support for block (multi-line) strings
  • lack of commenting syntax (useful for documenting templates, and commenting out disabled sections).

So that Heat is not held back by this design decision, a new template format is proposed which will be supported alongside the existing CloudFormation format.

This format will be a YAML based syntax. The initial version of this new format will be a YAML document which parses to the same document structure as the current CloudFormation format. Future format changes will most likely focus on making it easier to write templates by hand.

Here are some examples of the new format.

This is an empty file:

#!highlight yaml


Which is equivalent to this skeleton template:

#!highlight yaml
HeatTemplateFormatVersion: '2012-12-12'
Parameters: {}
Mappings: {}
Resources: {}
Outputs: {}