Last active
July 24, 2019 07:51
-
-
Save raphaelschnaitl/62fb1df1e1cc0749935812335668c7cb to your computer and use it in GitHub Desktop.
medium.bastion-host.createAllowPeerSshSg.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private createAllowExternSshSG(vpc: ec2.IVpc, peers: ec2.IPeer[]): ec2.SecurityGroup { | |
const sshSecurityGroup = new ec2.SecurityGroup(this, 'allow-ssh-external-SG', { | |
vpc: vpc | |
}) | |
peers.forEach(peer => { | |
sshSecurityGroup.addIngressRule(peer, ec2.Port.tcp(22)) | |
}); | |
return sshSecurityGroup | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment