in lib/base-resources.ts [10:28]
constructor(scope: cdk.Construct, id: string, props?: cdk.NestedStackProps) {
super(scope, id, props);
this.vpc = new ec2.Vpc(this, `${prefix}-vpc`, {
cidr: "10.0.0.0/16",
maxAzs: 2,
});
this.batchSg = new ec2.SecurityGroup(this, `${prefix}-batch-sg`, {
vpc: this.vpc,
securityGroupName: `${prefix}-batch-sg`,
});
this.batchSg.addIngressRule(
ec2.Peer.ipv4(this.vpc.vpcCidrBlock),
ec2.Port.allTraffic(),
ec2.Protocol.ALL
);
}