This bundle provides an opinionated interface to CloudFormation's raw capabilities, not just to make it easier to use but, easier to use well. Commands to perform all basic CloudFormation actions, such as creating and listing stacks, are available, as you would expect. But, we've also built a set of commands for managing a new concept, stack definitions.
Stack definitions are a layer on top of CloudFormation templates aimed at making them more reusable and easier to work with as a team. They're comprised of a defaults file, which is a named set of CloudFormation parameters and tags, a named CloudFormation template, and a set of overrides. All of these layers are merged together to make up all the inputs required to create a stack.
Because most engineering and operations teams require a canonical version of their infrastructure definitions to be stored in a VCS repository, templates, defaults files, and stack definitions will be stored in a git repository. Doing so supports several common use cases such as debugging and auditing.
Putting this all together results in a reusable, repeatable workflow that can easily be executed from chat, while still allowing basic CloudFormation actions when necessary.
In chat:
@cog bundle install cfn
Via cogctl:
cogctl bundle install cfn
For more details about how to install and configure bundles see:
The following commands are included with the bundle. For usage info
about each command see the help builtin command: help cfn:<command_name>.
-
template-showShows contents of a template.
-
template-listLists all templates, filtered by an optional glob pattern.
-
stack-createCreates a new stack based on an existing template and returns the newly created stack.
-
stack-deleteDeletes a stack.
-
stack-eventsLists events for a stack. Returns all stack related events for a specified stack in reverse chronological order.
-
stack-listLists stack summaries.
-
stack-resourcesLists stack resources.
-
stack-showShows details for a stack.
-
changeset-createCreates a changeset for a stack.
-
changeset-listLists cloudformation changesets.
-
changeset-deleteDeletes cloudformation changesets.
-
changeset-showShows a cloudformation changeset.
-
changeset-applyApplies a cloudformation changeset.
-
definition-createCreates a stack definition.
-
definition-listLists all definitions, filtered by an optional glob pattern.
-
definition-showShows contents of a definition.
-
defaults-createCreates a new defaults file.
-
defaults-listLists all defaults files, filtered by an optional glob pattern.
-
defaults-showShows contents of a defaults file.
-
check-setupChecks that all configuration is set correctly
This bundle requires access to an Amazon Web Services account and a Git repository. The following configuration variables may be defined using Cog dynamic configuration:
-
AWS_ACCESS_KEY_IDID of the access key used to authenticate with the AWS API. Required if IAM instance metadata not used.
-
AWS_SECRET_ACCESS_KEYSecret of the access key used to authenticate with the AWS API. Required if IAM instance metadata not used.
-
AWS_REGIONOptional region used for all commands
-
AWS_STS_ROLE_ARNOptional STS role ARN of which to assume when making requests to the AWS API.
-
S3_STACK_DEFINITON_BUCKETRequired bucket name where created definitions will be written and read from when used to create stacks.
-
S3_STACK_DEFINITON_PREFIXOptional bucket key prefix to use when storing definitions in a shared bucket.
-
GIT_REMOTE_URLUrl of git repository used to read and write defaults files, templates, and definitions.
-
GIT_SSH_KEYSSH key used to authenticate with the above git repository. Must have read and write access.