Created
May 1, 2019 13:25
-
-
Save eladb/9ab70f1de83c49e890e400b4b07fc57e to your computer and use it in GitHub Desktop.
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 cdk = require('@aws-cdk/cdk'); | |
import ec2 = require('@aws-cdk/aws-ec2'); | |
import { Fn } from '@aws-cdk/cdk'; | |
export class MyStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
this.node.setContext(`availability-zones:account=${this.env.account}:region=${this.env.region}`, [ | |
Fn.select(0, Fn.getAZs()), | |
Fn.select(1, Fn.getAZs()), | |
Fn.select(2, Fn.getAZs()) | |
]); | |
new ec2.VpcNetwork(this, 'vpc'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment