Last active
July 24, 2019 09:36
-
-
Save raphaelschnaitl/486ebb79dd2635beedf751489cea17cc to your computer and use it in GitHub Desktop.
medium.bastion-host.createAsg.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
const asg = new autoscaling.AutoScalingGroup(this, 'bastion-selfheal-ASG', { | |
vpc: props.vpc, | |
allowAllOutbound: true, | |
associatePublicIpAddress: false, | |
keyName: props.keyName, | |
notificationsTopic: snsTopic, | |
instanceType: props.instanceType ? props.instanceType : new ec2.InstanceType('t3.micro'), | |
machineImage: props.image, | |
vpcSubnets: props.subnets ? props.subnets : { | |
onePerAz: true, | |
subnetType: ec2.SubnetType.PUBLIC | |
} | |
}) | |
asg.addSecurityGroup(externalSshSG) | |
asg.addSecurityGroup(internalSshSecurityGroup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment