Skip to content
/ vic Public

A convenience-wrapper for managing CloudFormation Templates with environment-specific configuration

Notifications You must be signed in to change notification settings

wpalmer/vic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vic Formation

A convenience-wrapper for managing AWS CloudFormation Templates, built with cloudformation-ruby-dsl. Within the ruby templates, variables can be referenced using config-ruby-dsl.

This project is intended to be cloned and used as a base for managing your own CloudFormation templates.

The primary interface is a bash script, vic.sh. It requires:

The basic usage is:

./vic.sh --<action> [--environment=staging] <template.rb>

See ./vic.sh --help for more information.

Key features exposed via vic.sh:

  • Create/Update CloudFormation stacks based on preprocessed templates

  • Automatically fill stack "parameters" based on configuration variables

  • Define/Utilize stack "partials" to accomplish common goals (eg: automatically attaching EFS/EBS volumes)

  • Declare resource-related outputs as part of the resource declaration

  • Define "environments" by creating a file _<environment name>.rb, which will automatically load configuration overrides based on the --environment= argument.

Templates

See the documentation for cloudformation-ruby-dsl. Create your templates in the root of this tree, and begin them with:

require './vic.inc'

Environments

Which stack is to be referenced is determined based on the --environment parameter, which also causes the stack name and certain tags to become prefixed with the environment's name. For example, using --environment=staging with the template primary-instances will perform operations on the stack staging-primary-instances and pull in extra configuration from the _staging.rb ruby file.

Some types of stack are "global". These exist independently of any environment, either because they refer to resources which cannot be sanely duplicated across environments (such as DNS domain names), or because they logically should be sharing resources across environments (such as ECR repositories, which, for sanity, promote images to production by tagging an existing staging image with a new live tag). Stacks named to hint that they contain such resources can only be defined in the "live" environment, and receive no prefix. The "global" stacks are those with names ending in "-dns" or "-registry".

About

A convenience-wrapper for managing CloudFormation Templates with environment-specific configuration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published