This action uses cfn-diagram to generate draw.io diagrams or vis.js generated images of your AWS Cloudformation IaC code.
Ideal for maintaining live documentation where the CI auto-updates the infrastructure diagrams for your docs.
Required
Path where the Cloudformation templates can be found
Optional
Default: diagrams/
Path where the output diagrams should be placed
Optional
Default: html
What type of diagram export should be executed
Optional Default : ``
Cloudformation types to be excluded from cfn-diagram output
Optional
Cloudformation stacks to be included in export, defaults to all
Optional
Default: 1080
Browser viewport height configuration
Default: 1920
Browser viewport width configuration. Only valid for html|h diagramType
The specified diagrams on the filesystem. Only valid for html|h diagramType
uses: crisboarna/cfn-diagram-action@v1
with:
path_input: '/test/data'
path_output: '/docs/diagrams'
diagram_type: 'draw.io'
diagram_exclude_types: ''
diagram_stacks: ''
viewport_height: 1080
viewport_width: 1920
To setup for local development you need the following:
yarn install
yarn setup
This installs the npm dependencies and the act cli tool for local GitHub action testing.
yarn lint
To run unit tests:
yarn test
To run integration tests locally via Docker Compose use
docker compose up
the output files will be visible in To run integration tests in mock Github Action environment(via Docker)
yarn test:integration:local
To run the underlying integration command locally without the wrapper environment for direct fast debugging
yarn test:integration
- Clone repo and create a new branch:
git checkout https://github.com/crisboarna/cfn-diagram-action -b name_for_new_branch`.
- Make changes and test
- Submit Pull Request with comprehensive description of changes
To facilitate development the following bots are integrated into the repository:
Full license details can be found in LICENSE.md