update to latest dependencies
MODIFY
url-shortener/index.ts
url-shortener/index.ts
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
import * as cloud from "@pulumi/cloud";
+import { Output } from "@pulumi/pulumi"; // for output property
// Create a web server.
let endpoint = new cloud.HttpEndpoint("urlshortener");

MODIFY
url-shortener/package.json
url-shortener/package.json
"@types/node": "^8.0.27",
"typescript": "^2.1.4"
},
- "peerDependencies": {
- "@pulumi/cloud": "*"
+ "dependencies": {
+ "@pulumi/cloud": "^0.10.0",
+ "@pulumi/cloud-aws": "^0.10.0"
}
}

MODIFY
webserver/index.ts
webserver/index.ts
import * as aws from "@pulumi/aws";
+import { Output } from "@pulumi/pulumi";
// the type InstanceType contains friendly names for AWS instance sizes
let size: aws.ec2.InstanceType = "t2.micro";
@@ -27,4 +28,5 @@ let server = new aws.ec2.Instance("web-server-www", {
userData: userData // set up a simple web server
});
-server.publicDns.then(dns => console.log(`Server URL: http://${dns}`));
+export let publicIp = server.publicIp;
+export let publicDns = server.publicDns;
\ No newline at end of file

MODIFY
webserver/package.json
webserver/package.json
{
"name": "webserver",
- "version": "0.1",
+ "version": "0.1.0",
"main": "bin/index.js",
"typings": "bin/index.d.ts",
"scripts": {
"build": "tsc"
},
"devDependencies": {
- "typescript": "^2.5.3"
- },
- "peerDependencies": {
- "@pulumi/aws": "*",
- "pulumi": "*"
+ "typescript": "^2.5.3",
+ "@types/node": "^8.0.26"
},
"dependencies": {
- "@types/node": "^8.0.26"
+ "@pulumi/pulumi": "^0.10.0",
+ "@pulumi/aws": "^0.10.0"
}
}

update to latest dependencies