Created
April 9, 2023 14:06
-
-
Save crisboarna/4024b2b62f85df74a7fb9ef273f4cda9 to your computer and use it in GitHub Desktop.
Accessing isolated network estate on AWS: Part 1 - Bastion Host: VPC Stack
This file contains 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
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