Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antonbabenko/modules.tf-lambda

Infrastructure as code generator - from visual diagrams created with Cloudcraft.co to Terraform
https://github.com/antonbabenko/modules.tf-lambda

aws-lambda cloudcraft infrastructure-as-code serverless terraform terraform-aws terraform-configurations terragrunt visual visual-diagrams

Last synced: 29 days ago
JSON representation

Infrastructure as code generator - from visual diagrams created with Cloudcraft.co to Terraform

Awesome Lists containing this project

README

        

# Diagrams to code (d2c) - Infrastructure as code generator - from visual diagrams to Terraform

[![Financial Contributors on Open Collective](https://opencollective.com/modulestf/all/badge.svg?label=financial+contributors)](https://opencollective.com/modulestf) [![MIT license](https://img.shields.io/github/license/antonbabenko/modules.tf-lambda.svg)]() [![@antonbabenko](https://img.shields.io/twitter/follow/antonbabenko.svg?style=flat&label=Follow%20@antonbabenko%20on%20Twitter)](https://twitter.com/antonbabenko)

modules.tf - Infrastructure as code generator - from visual diagrams to Terraform

Code in this repository is used for generating infrastructure as Terraform configurations from visual diagrams created using [Cloudcraft](https://www.cloudcraft.co).

## How can I try this?

1. Sign up for a free account with [Cloudcraft](https://app.cloudcraft.co/signup).
1. Draw AWS architecture in web-browser (you can import live AWS resources, too).
1. Click "Export" and "Terraform code export" at the top right side.
1. Download archive and extract it locally.
1. Follow step-by-step instructions in `README.md` which you can find inside of it.

## How do the generated Terraform configurations look like?

In [modules.tf-demo](https://github.com/antonbabenko/modules.tf-demo) repository you can see the exact configuration code generated from sample "Web App Reference Architecture".

### Original infrastructure

Web App Reference Architecture

### Recording of complete code execution

modules.tf demo - November 2019

## Supporters

Cloudcraft - the best way to draw AWS diagrams

This project was partially sponsored by [Cloudcraft - the best way to draw AWS diagrams](https://www.cloudcraft.co).

[Become a sponsor to @antonbabenko on GitHub](https://github.com/sponsors/antonbabenko/).

[![@antonbabenko](https://img.shields.io/twitter/follow/antonbabenko.svg?style=flat&label=Follow%20@antonbabenko%20on%20Twitter)](https://twitter.com/antonbabenko)
[![@antonbabenko](https://img.shields.io/github/followers/antonbabenko?style=flat&label=Follow%20@antonbabenko%20on%20Github)](https://github.com/antonbabenko)
[![modules.tf-lambda](https://img.shields.io/github/stars/antonbabenko/modules.tf-lambda?style=flat&label=Star%20modules.tf-lambda%20on%20Github)](https://github.com/antonbabenko/modules.tf-lambda)

## Developer's guide

This project is Python 3.8 serverless application written using [serverless.tf](https://serverless.tf) framework and open-source components ([Terraform AWS modules](https://github.com/terraform-aws-modules)).

### Notes for developers

Terraform is used to provision infrastructure resources as well as packaging artifacts and to do the deployments (check out [serverless.tf](https://serverless.tf) for more details).

Source code is located in `src/handler.py`.

Go to directory `terraform`, verify/update file `terraform.tfvars` and run:

```
$ terraform init # Download required Terraform providers and modules
$ terraform apply # Create or update infrastructure resources or do a new deployment of Lambda function (if source code has changed)
```

When infrastructure is created, you should be able to `POST` using [httpie](https://github.com/jakubroztocil/httpie/) or `curl` like this:

```
$ http --print Hhb --all --follow https://dev-d2c.modules.tf @test_fixtures/input/blueprint_my.json
```

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute.

### Financial Contributors

Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/modulestf/contribute)]

#### Individuals

#### Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/modulestf/contribute)]










## License

This work is licensed under MIT License. See LICENSE for full details.

Copyright (c) 2018-2021 Anton Babenko