Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Security Groups for AWS #162

Open
trov-madisonhope opened this issue May 20, 2020 · 2 comments
Open

Add Security Groups for AWS #162

trov-madisonhope opened this issue May 20, 2020 · 2 comments

Comments

@trov-madisonhope
Copy link

Would probably pair well with #128

@leandrodamascena
Copy link
Contributor

AWS represents SecurityGroup as a "general" group icons.. Makes sense to add it in network resource to draw a full security solution.

image

@clayms
Copy link

clayms commented Nov 5, 2020

See this answer.
#279 (comment)

You can simply change the Cluster "icon" to be whatever you wanted, then change each individual Clusters graph_attr.

See below:

from diagrams.aws.compute import SAR, EKS, EC2

graph_attr = {
    "layout":"neato",
    }

AWS_graph_attr = {
    "style":"solid",
    "bgcolor":"transparent",
    "pencolor":"orange",
    "penwidth":"4.0",
    "fontcolor":"orange",
    "fontname":"Helvetica bold",
    "fontsize":"15.0",
    "labelloc":"t",
    "labeljust":"l",
}

EKS_graph_attr = {
    "style":"rounded",
    "bgcolor":"beige",
    "pencolor":"chartreuse",
    "penwidth":"2.0",
    "fontcolor":"blue",
    "fontname":"Helvetica bold",
    "fontsize":"10.0",
    "labelloc":"t",
    "labeljust":"l",
}

with Diagram("\nAWS", show=False, graph_attr=graph_attr) as diag:
    with Cluster(f"\n{' '*10}AWS Cloud", graph_attr=AWS_graph_attr):
        Node(label="", shape="plaintext", pin="true", pos="0,0" )
        Node(label="", shape="plaintext", pin="true", pos="4,4" )
        aws_cloud = SAR(
            label="", fontsize="6", loc="t",
            fixedsize="true", width="0.6", height="0.7", 
            pin="true", pos="-0.35,5")        

    with Cluster(f"\n\n{' '*20}EKS", graph_attr=EKS_graph_attr):
        Node(label="", shape="plaintext", pin="true", pos="1,1" )
        Node(label="", shape="plaintext", pin="true", pos="3,3" )        
        aks_cluster = EKS(
            label="", fontsize="6", loc="t",
            fixedsize="true", width="0.5", height="0.8", 
            pin="true", pos="0.8,3.8")
        cont1 = EC2("Pod", pin="true", pos="2,2")

diag

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants