Generates JSON config for AWS CloudFormation using a Ruby DSL. Manage CloudFormation stacks - create, update, diff.
Based on https://github.com/songkick/cloud_formatter
Clone the repository, then run:
gem build cloud_builder.gemspec
gem install cloud_builder-version.gem
$ stack --help
Usage:
stack [OPTIONS] STACK
Parameters:
STACK stack to build
Options:
-r, --region REGION AWS region to use (default: $EC2_REGION, or "us-east-1")
-v, --validate validate the stack file before doing anything else
-b, --bucket BUCKET upload template to BUCKET (default: $CLOUD_BUILDER_BUCKET, or nil)
-t, --diff-tool DIFF_TOOL tool to use for diff (default: $CLOUD_BUILDER_DIFF_TOOL)
-c, --create create the stack
-u, --update update the stack
-d, --diff do a diff between the existing template in BUCKET and the generated template
-e, --estimate estimate template cost
-h, --help print help
For most actions you will require an active AWS account, so make sure you export AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
to ENV
See stacks/example.rb for an example stack.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- change aws-sdk require to aws-sdk-v1
- add support for UpdatePolicy resource attribute (see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html)
- add --dummy flag; will add a dummy WaitConditionHandle to the stack to force updates in cases when only unused parameters or mappings are changed
- cli now uses AWS_DEFAULT_REGION instead of EC2_REGION
- publish gem homepage
- add support for DeletionPolicy resource attribute (see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html)
- remove debug puts in mappings.rb
- fix #3 Prevent creation of resources with the same name
- add license to gemspec
- added support for template Outputs (see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html)
- cli can use the EC2_REGION, CLOUD_BUILDER_BUCKET and CLOUD_BUILDER_DIFF_TOOL environment variables as defaults for
--region
,--bucket
and--diff-tool
- deprecated the
--upload
flag/action, if you specify a bucket the stack json is uploaded by default
- support for specifying an AWS region
- add the Changelog
- AWS resources can have a Version property
- fix cloud_builder problem when using
--help
- add DontFormatUnderscore class
- estimation should be done after uploading to s3 bucket
- add
--diff-tool
to specify a different tool to use for diffs
- beta initial release