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
#!/usr/bin/env node | |
import 'source-map-support/register'; | |
import * as cdk from 'aws-cdk-lib'; | |
import { VpcStack } from '../lib/vpc-stack'; | |
import { BastionStack } from '../lib/bastion-stack'; | |
const app = new cdk.App(); | |
const vpc = new VpcStack(app, 'VpcStack'); | |
const bastion = new BastionStack(app, 'BastionStack', { vpc: vpc.vpc }); |
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 BastionStack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props: { vpc: ec2.Vpc }, stackProps?: cdk.StackProps) { | |
super(scope, id, stackProps); | |
const { vpc } = props; |
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); |