sparse-intern-71089
06/19/2020, 9:01 PMwhite-balloon-205
.Apply()
callback.
More on this at https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs. Also in this video (though focused on Node.js):
If you have a snippet of what you are trying, might be able to suggest a specific solution.acoustic-leather-88378
06/19/2020, 9:24 PMID()
in the call to LookupSpotMarketRequest
by passing a RequestId
(https://github.com/pulumi/pulumi-packet/blob/6f22a18281cc0958f7fb6111de62028504dc42a8/sdk/go/packet/getSpotMarketRequest.go#L23) which is a string
(should it be a StringInput
?) which is why I need to grab the string
value from x.ID()
white-balloon-205
.ToStringOutput()
on the id.white-balloon-205
LookupSpotMarketRequest
inside an Apply
, since you cannot call that until the underlying ID is available.white-balloon-205
bucket, err := s3.NewBucket(ctx, "my-bucket", nil)
if err != nil {
return err
}
hostedZoneId := bucket.ID().ApplyString(func(id pulumi.ID) (string, error) {
res, err := s3.LookupBucket(ctx, &s3.LookupBucketArgs{Bucket: string(id)})
if err != nil {
return "", err
}
return res.HostedZoneId, nil
})
acoustic-leather-88378
06/20/2020, 6:47 AM