generator-cfn-stack v1.0.0
CloudFormation template generator
Scaffolding for new AWS CloudFormation template projects.
Features
template.yaml
, andparameters.json
files to root path.editorconfig
,.gitignore
, and.gitattributes
files to root pathOption to choose a test framework:
test
directory with an example test based on test framework selection.pre-commit-config.yaml
forcfn-lint
, and other checks
Prerequisites
- AWS CLI
- cfn-lint
- pre-commit
- For tests
- taskcat
Installation
Install nodejs
pro tip: use nvm
Install Yeoman
npm install -g yo
Install this generator
npm install -g cfn-stack
Usage
To use the included generator execute the below command in shell and provide your new module name for the prompt
> yo cfn-stack
...
? Enter name for the new CloudFormation template: example-module
? Enter description for the new CloudFormation template: Example CloudFormation template
? Enter author name: jdoe
? Choose test framework (use arrow keys)
❯ taskcat
Project layout generated for the new CloudFormation template with taskcat selection
hello_world
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .pre-commit-config.yaml
├── README.md
├── template.yaml
├── parameters.json
├── events
│ └── event.json
├── functions
│ └── src
│ └── hello_world
│ ├── __init__.py
│ ├── lambda.py
│ └── requirements.txt
└── test
Post generation steps
On the generated template's root path, initialize the git repository:
git init
On the generated template's root path, install pre-commit hooks:
pre-commit install
Contribution
Found a bug? feel free to raise an issue. Pull requests are always welcome. Keen to review and merge.
Maintainer
This project is maintained by cgswong
License
MIT
4 years ago