Scaffolding for new AWS CloudFormation template projects.
-
template.yaml
, andparameters.json
files to root path -
.editorconfig
,.gitignore
, and.gitattributes
files to root path -
Option 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
- AWS CLI
- cfn-lint
- pre-commit
- For tests
- taskcat
-
Install nodejs
pro tip: use nvm
-
Install Yeoman
npm install -g yo
-
Install this generator
npm install -g cfn-template
To use the included generator execute the below command in shell and provide your new module name for the prompt
> yo cfn-template
...
? 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
-
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
Found a bug? feel free to raise an issue. Pull requests are always welcome. Keen to review and merge.
This project is maintained by cgswong
MIT