Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit 1c97958

Browse files
committed
changed bastion host settings
1 parent 156efb3 commit 1c97958

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

awscdk/awscdk/bastion_host.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,10 @@ def __init__(
3131
update_type=autoscaling.UpdateType.REPLACING_UPDATE,
3232
desired_capacity=1,
3333
vpc=scope.vpc,
34+
key_name=os.environ.get("KEY_NAME"),
3435
vpc_subnets={'subnet_type': ec2.SubnetType.PUBLIC},
3536
)
3637

37-
self.cluster = ecs.Cluster(self, 'EcsCluster', vpc=scope.vpc)
38+
self.cluster = scope.cluster
3839

3940
self.cluster.add_auto_scaling_group(self.asg)
40-
self.cluster.add_capacity(
41-
"DefaultAutoScalingGroup",
42-
instance_type=ec2.InstanceType("t2.micro"),
43-
max_capacity=2,
44-
key_name=os.environ.get("KEY_NAME"),
45-
)

0 commit comments

Comments
 (0)