Skip to content

Instantly share code, notes, and snippets.

@crisboarna
Created April 9, 2023 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crisboarna/4024b2b62f85df74a7fb9ef273f4cda9 to your computer and use it in GitHub Desktop.
Save crisboarna/4024b2b62f85df74a7fb9ef273f4cda9 to your computer and use it in GitHub Desktop.
Accessing isolated network estate on AWS: Part 1 - Bastion Host: VPC Stack
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import {Construct} from "constructs";
export class VpcStack extends cdk.Stack {
public readonly vpc: ec2.Vpc;
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
this.vpc = new ec2.Vpc(this, 'VPC', {
cidr: '10.0.0.0/16',
maxAzs: 2,
subnetConfiguration: [
{
name: 'Subnet-Public',
subnetType: ec2.SubnetType.PUBLIC,
cidrMask: 24,
},
],
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment