Curso-lenguaje-python/catch-all/07_diagrams_as_code/01_workers_aws.py

16 lines
388 B
Python
Raw Normal View History

2024-08-13 01:43:53 +02:00
#! /usr/bin/env python
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
with Diagram("Grouped Workers", show=False, direction="TB"):
ELB("lb") >> [
EC2("worker1"),
EC2("worker2"),
EC2("worker3"),
EC2("worker4"),
EC2("worker5")
] >> RDS("events")