sparse-intern-71089
04/14/2020, 6:39 PMbroad-dog-22463
04/14/2020, 6:41 PMgreen-morning-1318
04/14/2020, 6:56 PMpulumi.Apply
to execute a callback on the raw values. Some docs on this here:
https://www.pulumi.com/docs/intro/concepts/programming-model/#apply
A common pattern we use if unit testing functionality is to pass the raw values back into channels. There’s an example of that here:
https://github.com/pulumi/pulumi/blob/master/sdk/go/pulumi/types_test.go#L320-L349kind-minister-39119
04/14/2020, 6:56 PMkind-minister-39119
04/14/2020, 6:57 PMgreen-morning-1318
04/14/2020, 6:57 PMlemon-agent-27707
04/14/2020, 7:03 PMkind-minister-39119
04/14/2020, 7:05 PMEC2Instance
struct which contains an ec2.Instance
from Pulumi. I want to be able to populate the EC2Instance
with data from the underlying pulumi resourcekind-minister-39119
04/14/2020, 7:06 PMApply
mechanism allow me to funnel these values out of Pulumi? because right now it seems like there’s an attempt to jail the datakind-minister-39119
04/14/2020, 7:07 PMStringOutput
— what I want is a string
lemon-agent-27707
04/14/2020, 7:08 PMlemon-agent-27707
04/14/2020, 7:09 PMctx.Export("key", outputValue)
lemon-agent-27707
04/14/2020, 7:09 PM$pulumi stack output key
"plain string value returned"
kind-minister-39119
04/14/2020, 7:09 PMlemon-agent-27707
04/14/2020, 7:09 PMkind-minister-39119
04/14/2020, 7:10 PMkind-minister-39119
04/14/2020, 7:10 PMlemon-agent-27707
04/14/2020, 7:10 PMlemon-agent-27707
04/14/2020, 7:10 PMkind-minister-39119
04/14/2020, 7:10 PMkind-minister-39119
04/14/2020, 7:11 PMkind-minister-39119
04/14/2020, 7:11 PMlemon-agent-27707
04/14/2020, 7:11 PMlemon-agent-27707
04/14/2020, 7:12 PMkind-minister-39119
04/14/2020, 7:12 PMlemon-agent-27707
04/14/2020, 7:12 PMkind-minister-39119
04/14/2020, 7:14 PMlemon-agent-27707
04/14/2020, 7:15 PMkind-minister-39119
04/14/2020, 7:15 PM