This repository contains code for generating infrastructure as code from visual diagrams created in Cloudcraft.
Code in this repository has been already deployed to AWS Lambda and available for all Cloudcraft users for free (forever):
- Draw your AWS architecture on Cloudcraft
- Click "Export" and "Export as code (modules.tf)" at the top right side
- Download archive and unzip it
- Follow the instructions in
README.md
file to get resources created on your AWS account.
This project was partially sponsored by Cloudcraft - the best way to draw AWS diagrams.
Don't hesitate to contact me if you want to become a sponsor or need custom features to be implemented.
Ok, if you are a developer and want to contribute, this is really great because I need your help:
- Report, triage and fix bugs
- Refactor code
- Improve documentation
- Implement new sources and workflows (now only Cloudcraft is partially supported)
- Consider contributing to Terraform AWS modules if you familiar with Terraform already
AWS Lambda supports Python 3.6, so you should use it also. Run this to install all required packages:
$ pip install -r requirements.txt
Serverless framework is used to do heavy-lifting by packaging dependencies required for AWS Lambda function (requirements-lambda.txt
) and updating the code there. Read through Quick Start guide, as well as installation, various AWS functions, serverless.yml reference to familiarise yourself with the usage of the framework.
As a short cheatsheet, you will need to use these commands:
- Invoke function locally providing
input.json
:
$ serverless invoke local --function generate-cloudcraft --path test_fixtures/input_localfile.json
- Deploy all functions to
prod
environment:
$ serverless deploy --stage prod
- Deploy single function to
dev
environment:
$ serverless deploy function --function generate-cloudcraft --stage dev
- Deploy single function to
prod
environment:
$ serverless deploy function --function generate-cloudcraft --stage prod
This project is created and maintained by Anton Babenko with the help from different contributors.
This work is licensed under MIT License. See LICENSE for full details.
Copyright (c) 2018 Anton Babenko