Add an AWS CloudFormation Template
You can create an AWS CloudFormation template within Kion. When creating CloudFormation templates, keep the following best practices in mind.
- Include metadata to provide information about the template.
- Use a ParameterGroup with a label to make field names easier to identify and more descriptive.
- Include a description for the AWSAccount parameter.
- Use the Fn:Sub function for the AssumeRolePolicyDocument principal to easily replace AWS variables and template parameters.
- Use the AWS::Partition variable to allow the template to be used in any of the AWS partitions, like Commercial or GovCloud.
- Use the Sid field in the PolicyDocument to help describe the level of access the policy statement provides.
There is a Template Parameters field when you add or edit a template in Kion that allows you to pass in parameters without making any changes to your template.
You can also click Pre-fill Parameters to easily fill in the parameter values.
For detailed examples of AWS CloudFormation templates, see Sample AWS CloudFormation Templates.
To add an AWS CloudFormation template:
- Navigate to Cloud Management > AWS CloudFormation Templates.
- Click Add New.
- Enter a name to identify the template. This field must be unique among your AWS CloudFormation templates.
- (Optional) Enter a Description of the template.
- (Optional) If you want to download an AWS CloudFormation template, enter a URL and click Fetch Template.
- Select either JSON or YAML as your template format.
- Enter a valid AWS CloudFormation template, and click Format to align the braces.
Sample AWS CloudFormation template
- If you have template parameters that are required for the template, enter them in the Template Parameters field or click the Pre-fill Parameters button to pre-fill the values.
- Select the regions where the template will be applied.
- Enter any SNS ARNs you would like attached to your template. This allows you to send a notification via SNS when the template is deployed. For more information, see Amazon's SNS documentation.
- Select if you would like to enable Termination Protection on this template. This prevents the CloudFormation stack from being deleted from an account, even if the cloud rule that applied the template is removed from the project in Kion. This option does not prevent modifying the stack, only deleting.
- Select at least one user or user group to own this template.
- (Optional) Click + Add Key/Value Pair to add tags to this template. These tags will be applied to all supported resources in your stack.
- Click Create Template.
What Next?