-
Notifications
You must be signed in to change notification settings - Fork 19
/
diagram.py
50 lines (37 loc) · 1.27 KB
/
diagram.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from diagrams import Cluster, Diagram
from diagrams.aws.compute import EKS
from diagrams.aws.network import Route53, ALB
from diagrams.aws.database import Aurora, AuroraInstance
from diagrams.aws.storage import S3
from diagrams.aws.integration import SQS
from diagrams.aws.security import ACM, KMS
from diagrams.aws.network import VPC
graph_attr = {
"bgcolor": "transparent"
}
with Diagram("terraform-aws-wandb", show=False, graph_attr=graph_attr):
dns = Route53("DNS")
with Cluster("main.tf"):
cert = ACM("aws-modules/acm")
with Cluster('module/networking'):
vpc = VPC('VPC')
with Cluster("module/app_lb"):
alb = ALB("App LB")
with Cluster("module/database"):
db = Aurora("Cluster")
db_instance = AuroraInstance("MySQL 5.7")
with Cluster("module/kms"):
kms = KMS('KMS')
with Cluster("module/app_eks"):
cluster = EKS("Cluster")
with Cluster("module/file_storage"):
bucket = S3('Files')
bucket_queue = SQS("Files Queue")
cert >> dns >> vpc >> alb
cert >> alb >> cluster
kms >> bucket
kms >> db
kms >> cluster
cluster >> db >> db_instance
cluster >> bucket >> bucket_queue
cluster >> bucket_queue