sparse-intern-71089
02/21/2019, 5:05 PMbrainy-magician-83981
02/21/2019, 5:49 PMchilly-photographer-60932
02/21/2019, 6:31 PMchilly-photographer-60932
02/21/2019, 6:46 PMbrainy-magician-83981
02/21/2019, 6:53 PMpulumi stack output --json > output.json
https://pulumi.io/reference/programming-model.html#stack-outputschilly-photographer-60932
02/21/2019, 6:58 PMchilly-photographer-60932
02/21/2019, 6:58 PMcreamy-potato-29402
02/21/2019, 7:38 PMcreamy-potato-29402
02/21/2019, 7:38 PMchilly-photographer-60932
02/21/2019, 7:39 PMchilly-photographer-60932
02/21/2019, 7:39 PMcreamy-potato-29402
02/21/2019, 7:39 PMcreamy-potato-29402
02/21/2019, 7:40 PMcreamy-potato-29402
02/21/2019, 7:40 PMchilly-photographer-60932
02/21/2019, 7:41 PMchilly-photographer-60932
02/21/2019, 7:41 PMchilly-photographer-60932
02/21/2019, 7:58 PMimport * as pulumi from '@pulumi/pulumi';
import * as gcp from '@pulumi/gcp';
// Create a GCP resource (Storage Bucket)
const bucket = new gcp.storage.Bucket('my-bucket');
// Export the DNS name of the bucket
export const bucketName = bucket.url;
console.log(pulumi.output(bucket).apply(s => s));
chilly-photographer-60932
02/21/2019, 7:59 PMbucket
chilly-photographer-60932
02/21/2019, 7:59 PMpulumi:pulumi:Stack (testingpulumioutput-dev):
Output {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
apply: [Function],
get: [Function] }
creamy-potato-29402
02/21/2019, 8:41 PMchilly-photographer-60932
02/21/2019, 8:45 PMchilly-photographer-60932
02/21/2019, 11:40 PMcreamy-potato-29402
02/22/2019, 3:38 AMcreamy-potato-29402
02/22/2019, 3:40 AM.url
?
export const bucketName = bucket.url;
creamy-potato-29402
02/22/2019, 3:41 AMconsole.log(pulumi.output(bucket).apply(s => s));
creamy-potato-29402
02/22/2019, 3:41 AMpulumi.output
returns an Output<Bucket>
, which is what is getting printed above. That is not what you want, right?creamy-potato-29402
02/22/2019, 3:42 AMs
is of type Bucket
, right?creamy-potato-29402
02/22/2019, 3:42 AMapply(s => s)
creamy-potato-29402
02/22/2019, 3:42 AMBucket
type, where should you put the console.log
creamy-potato-29402
02/22/2019, 3:43 AM