fmtnet / terraform-diagrams

Terraform + Diagrams: Provisioning and visualizing a simple environment on AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform + Diagrams

Terraform + Diagrams: Provisioning and visualizing a simple environment on AWS.

[Terraform]

Language: HCL

Providers: AWS

Resources: VPC, EC2, RDS

[Diagrams]

Language: Python

Frameworks: pprint, diagrams

Enjoy it!

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

In order to run this environment, you need just install:

  • Python 3.6+

  • Terraform 0.13+

For more information, see https://docs.python.org/3/using/unix.html#getting-and-installing-the-latest-version-of-python and https://learn.hashicorp.com/tutorials/terraform/install-cli

Open your terminal and clone this repository:

git clone https://github.com/ebarros29/terraform-diagrams

cd terraform-diagrams/

Installing

A step by step series of examples that tell you how to provision the environment and run the python code (generate the diagram).

Installing Python 3.6+ and pip3

https://docs.python.org/3/using/unix.html#getting-and-installing-the-latest-version-of-python

Installing Terraform

https://learn.hashicorp.com/tutorials/terraform/install-cli

Installing dependencies

pip install --no-cache-dir -r requirements.txt

Running the environment

Type in your terminal:

cd aws_terraform/

terraform plan

terraform apply [yes]

Wait a few minutes while Terraform finish the provisioning.

When it finish, type:

python3 diagrams_aws.py

After that, your diagram has been created in a file ".png" in your current directory ;)

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Terraform + Diagrams: Provisioning and visualizing a simple environment on AWS

License:MIT License


Languages

Language:HCL 77.2%Language:Python 22.8%