Skip to content

Instantly share code, notes, and snippets.


jen20/index.ts Secret

Created June 26, 2018 08:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jen20/27ed06a57d2a60af2f909cb3882f5277 to your computer and use it in GitHub Desktop.
import * as aws from "@pulumi/aws";
const baseTags = {
"Project": "Demo"
let azs = aws.getAvailabilityZones();
let getAz = async function (index: number): Promise<string> {
return (await azs).names[index];
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "",
enableDnsHostnames: true,
enableDnsSupport: true,
tags: baseTags
const privateSubnets = ["", "", ""].map((cidr, index) => {
return new aws.ec2.Subnet(`subnet${index}`, {
availabilityZone: getAz(index),
cidrBlock: cidr,
mapPublicIpOnLaunch: false,
tags: Object.assign({"Name": `Private Subnet ${index + 1}`}, baseTags)
export const vpcId =;
export const privateSubnetIds = =>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment