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 an AWS EC2 Security Group Icon #3

Open
pistazie opened this issue Apr 26, 2021 · 2 comments
Open

Add an AWS EC2 Security Group Icon #3

pistazie opened this issue Apr 26, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@pistazie
Copy link
Owner

pistazie commented Apr 26, 2021

cdk-dia currently has no icon for a security group.

the following cdk App:

import * as cdk from '@aws-cdk/core';
import * as ec2 from '@aws-cdk/aws-ec2';

export class SoTsStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const vpc = new ec2.Vpc(this, 'vpc')

    const sg = new ec2.SecurityGroup(this,'sg',{
      vpc: vpc
    })

    new ec2.Instance(this,'instance',{
      instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
      vpc: vpc,
      machineImage: ec2.MachineImage.latestAmazonLinux(),
      securityGroup: sg
    })
  }
}

yields the following diagram:
diagram
Which misses a security group icons.

The icons mapping is at src/diagram/aws/awsResouceIconMatches.json

All current CDK icons are taken from https://aws.amazon.com/architecture/icons/

One has to figure out whether AWS has such an icon or how to come up with an icon that is descriptive and also consistent with current AWS/CDK-Dia icons.

@pistazie pistazie added the good first issue Good for newcomers label Apr 26, 2021
@udondan
Copy link

udondan commented May 6, 2021

The image seem to be gone from the current set. There was one included when they used to be called "AWS Simple Icons". There is a low quality version preserved at Wikimedia: https://commons.wikimedia.org/wiki/File:AWS_Simple_Icons_Groups_Security_Group.svg

Though the image was not meant to be used as an icon. More like a container, like VPC, AZs and regions.

SrHTd

I wonder if it would be feasible to display these group resources in such a way.

@pistazie
Copy link
Owner Author

pistazie commented May 10, 2021

CDK-Dia currently renders using Graphviz It should be possible to style border there. The diagrming logic currently looks at a Security group as a resource and not as clustering object which contains other objects.

I see the advantages of such an approach (could be well used with #4) but also see that is creates rather networking-focused diagrams.

Not sure where to take in from here :)

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

No branches or pull requests

2 participants