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!
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
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/
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
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 ;)
- Emerson Barros - Initial work - ebarros29
This project is licensed under the MIT License - see the LICENSE.md file for details