polite-mechanic-60124
09/28/2021, 6:41 PMoutput<string>
on pulumi preview on a clean environment or is an Output<Mapping> on an incrementally updated environment.
job_vars = pulumi.Output.all(
_redis_endpoint=cache.endpoint, # should be an Output string
**job_specific_inputs, # dict
**generic_job_inputs, # dict
)
pulumi.export("core", job_vars)
pulumi preview on clean environment: core : output<string>
pulumi up on incrementally updated environment:
+ core : {
+ analyzer_bucket : "analyzers-bucket-196f898"
+ analyzer_dispatched_bucket : "dispatched-analyzer-bucket-5177198"
Is there any recommended way to force output to be a mapping type?red-match-15116
09/28/2021, 6:48 PMpreview
is unfortunately incorrect. At the time of preview, pulumi doesn’t know the actual type, however we incorrectly print that as Output<string>
when it should just be Output
. There’s an issue one sec.polite-mechanic-60124
09/28/2021, 6:55 PMred-match-15116
09/28/2021, 7:25 PMOutput.all
is always either Output[List]
or Output[Mapping]
- it’s just that the CLI output is misleading…output<?>
or output<T>
? Instead of output<string>
?polite-mechanic-60124
09/28/2021, 7:34 PMred-match-15116
09/28/2021, 8:32 PMpreview
it’s just not resolved because each item within the Output.all is not known.preview
is unknown and in all following updates it is known at preview time. So during the first preview there are no outputs… I’m still not sure you want to be passing this information to another job during preview
as the outputs are unresolved.
You can use pulumi.runtime.is_dry_run()
to determine whether you are running a preview or not.polite-mechanic-60124
09/28/2021, 9:50 PM