`await myout.future()`
# python
h
await myout.future()
w
Note that this could be somewhat dangerous, as you will lose dependency information. So if you take the value resulting from this and use it as an input to another resource, Pulumi will not track the dependency between the resources. The “right” way to do this in almost all cases is to use .apply.
h
does a quick audit of her code
rats, i'm using it to generate an asset
wait, can i even track dependency through that?
resource vars -> generated file -> zip archive -> FileAsset -> BucketObject
note to self: add them as explicit dependencies
w
In principle yes you should be able to track dependencies through that chain. Depends possibly on exactly how you are construct g each step. But in general, using apply on outputs to do work dependent on the value of an output is the best way to ensure you get accurate previews and dependency tracking.
h
i'm doing a lot of async that doesn't really track dependencies
i think it'll got lost at the zip bundling stage, since i'm handing that off to a background thread
w
Ahh - yes - that is of course fine to do as well! Just the connections between resource outputs and resource inputs are where it’s important to pass outputs (and use apply).
h
yeah, i might have to try to dig in more deeply; the async runs pretty deep in my libraries, i'm making a lot of `Task`s and `Future`s, and dependency tracking is kind of important
(building a lambda package using Pipenv-based dependencies and injecting pulumi-declared resources)