about ready to try it
parent
b277deced6
commit
687aa3d45b
|
@ -11,13 +11,14 @@ class SciInstancesStack(cdk.Stack):
|
|||
super().__init__(vpcStack, construct_id, env=env, **kwargs)
|
||||
|
||||
thisVpc = vpcStack.vpc
|
||||
imageId = ec2.LookupMachineImage(name='debian-11-amd64-20221219-1234', windows=False)
|
||||
ec2instance = ec2.Instance(self, f"i-{thing}",
|
||||
vpc=vpcStack.vpc,
|
||||
instance_type=ec2.InstanceType("t2.nano"),
|
||||
machine_image=ec2.AmazonLinuxImage(),
|
||||
machine_image=imageId,
|
||||
block_devices=[ec2.BlockDevice(
|
||||
device_name="/dev/sda1",
|
||||
volume=ec2.BlockDeviceVolume.ebs(50),
|
||||
volume=ec2.BlockDeviceVolume.ebs(6),
|
||||
)
|
||||
],
|
||||
security_group = vpcStack.SciSG,
|
||||
|
@ -29,18 +30,13 @@ class VpcBasisStack(cdk.Stack):
|
|||
super().__init__(scope, construct_id, **kwargs)
|
||||
|
||||
self.vpc = ec2.Vpc(self, 'out-vpc',
|
||||
cidr = "172.17.0.0/18",
|
||||
max_azs = 3,
|
||||
ip_addresses=ec2.IpAddresses.cidr('172.19.19.0/24'),
|
||||
max_azs = 1,
|
||||
subnet_configuration=[
|
||||
ec2.SubnetConfiguration(
|
||||
name = 'pub',
|
||||
subnet_type = ec2.SubnetType.PUBLIC,
|
||||
cidr_mask = 26
|
||||
),
|
||||
ec2.SubnetConfiguration(
|
||||
name = 'pri',
|
||||
subnet_type = ec2.SubnetType.PRIVATE_WITH_NAT,
|
||||
cidr_mask = 20
|
||||
)
|
||||
],
|
||||
nat_gateways = 3
|
||||
|
|
Loading…
Reference in New Issue