Versent / cfn-check

CloudFormation template validation tool - SUPERSEDED BY https://github.com/aws-cloudformation/cfn-python-lint
MIT License
29 stars 2 forks source link

cfn-check

A command-line tool for validating CloudFormation templates quickly.

Overview

CloudFormation is great. Unfortunately, the error handling leaves a bit to be desired.

The AWS CLI provided validate-template command only checks your syntax, not the actual resources, their properties, etc. This means you can think you're successfully creating a new stack, and still get a CREATE_FAIL. This tool aims to give you quick feedback so you spend less time banging your head against the CloudFormation Console.

Installation

npm install -g cfn-check

Usage

Usage: cfn-check [options] <template>

Options:

  -h, --help     output usage information
  -V, --version  output the version number
  -w, --watch    Watch template for changes
  -p, --pretty   Print pretty JSON when valid (regardless of character limit)
  -c, --compact  Print compact JSON when valid (regardless of character limit)

Planned

Checks

Planned

Resource Properties Definitions

The resource properties definitions are taken from the CloudFormation User Guide Resource Types Reference.

To update the definitions (stored in data/resources.json) run:

npm run scrape

Testing

To run the tests:

npm test

To watch them:

npm run test:watch

The template.json used in tests is taken from the sample templates that AWS provides.

To Do