1 | ## Features
|
2 |
|
3 | * Write reusable CloudFormation snippets, called `particles` that can be used
|
4 | accross condensation projets
|
5 | * Package templates and assets then upload full distributions to multiple buckets across
|
6 | regions with one command.
|
7 | * Reference another template within the distribution with
|
8 | [AWS::CloudFormation::Stack](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html)
|
9 | and the `templateS3Url` helper
|
10 | * Upload scripts, configuration files and other assets alongside
|
11 | CloudFormation templates and reference them with asset helpers.
|
12 |
|
13 | ## Why?
|
14 |
|
15 | CloudFormation templates are great for creating, updating and deleting
|
16 | AWS resources. Reusing parts of templates, referencing other
|
17 | templates with `AWS::CloudFormation::Stack` and deploying cloud-init
|
18 | scripts can be difficult to manage.
|
19 |
|
20 | * Sections such as AMI [mappings](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html)
|
21 | are often re-used by many templates. Particles provide a way to
|
22 | write the mapping once and reuse it in other templates by reference.
|
23 | * It is common to set up resources, such as a VPC, with nearly
|
24 | identical attributes and structure for different applications and
|
25 | services. Condensation allows that definition to become a independent
|
26 | stack that can be referenced by other templates that are part of the
|
27 | same distribution.
|
28 | * When bootstrapping ec2 instances it is beneficial to have versioned scripts and configuration
|
29 | files deployed in the same bucket and path as the CloudFormation template
|
30 | they are associated with.
|
31 | * When using `AWS::CloudFormation::Authentication` to download assets from
|
32 | S3 buckets all resources must be in the same region. Condensation
|
33 | makes it easy to deploy the same templates and assets to multiple
|
34 | regions and ensure the referencing URLs are always pointing to the
|
35 | right place.
|
36 |
|
37 | For example, templates in a distribution can reference one another based on the
|
38 | bucket they are deployed to.
|
39 |
|
40 | Example:
|
41 |
|
42 | "TemplateURL": "{{templateS3Url 'vpc.template' }}"
|
43 | ...
|
44 | "TemplateURL": "{{templateS3Url 'subnet.template' }}"
|
45 |
|
46 | Output:
|
47 |
|
48 | "TemplateURL": "https://s3-us-west-1.amazonaws.com/<BUCKET>/cftemplates/vpc.template"
|
49 | ...
|
50 | "TemplateURL": "https://s3-us-west-1.amazonaws.com/<BUCKET>/cftemplates/subnet.template"
|
51 |
|
52 | The Handlebars helper, `templateS3Url`, creates a URL that will always reference a template deployed within the same bucket.
|