Skip to content

Instantly share code, notes, and snippets.

@Console32
Last active July 24, 2019 08:08
Show Gist options
  • Save Console32/38286893e5e3a129e322a09f46b37e4a to your computer and use it in GitHub Desktop.
Save Console32/38286893e5e3a129e322a09f46b37e4a to your computer and use it in GitHub Desktop.
medium.bastion-host.createInternalSshSg.ts
private createAllowInternalSshSG(vpc: ec2.IVpc): ec2.SecurityGroup {
const securityGroup = new ec2.SecurityGroup(this, 'allow-ssh-internal-SG', {
vpc: vpc
})
securityGroup.addIngressRule(securityGroup, ec2.Port.tcp(22))
return securityGroup
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment