I am a bit lost on on `OutputInstance.get()` metho...
# general
I am a bit lost on on
method. From the docs:
This function is only callable in code that runs in the cloud post-deployment. At this point all Output values will be known and can be safely retrieved.
But at 'cloud' time the Pulumi packages aren't available, for example for serialized lambdas. What am I missing? Is there any use case for it?
I've never had a need for it - can I ask what you're trying to accomplish?
Hi @bored-oyster-3147. I came across it while looking at this example. I also opened an issue with the repo author regarding something related to this case.
Ah ok that's pretty cool. Well if that works as-is that's great - but your question in the issue is valid, I wouldn't expect it to work. That said a new implementation could be written now using Automation API that would be fairly trivial, you wouldn't need to deal with the limitations of taking those actions within a pulumi deployment when you could just do them outside of your pulumi program in the same application
👍 1
The function call is fine but the type being passed is from
which shouldn't exist at runtime
well that's a different issue, and yea I didn't think that was possible. But he's doing this line to capture(?) it somehow? This page goes into more detail about how capturing things to be used inside a function that gets serialized works, and it gives an example of using an s3 bucket which is also a pulumi resource: https://www.pulumi.com/docs/intro/concepts/function-serialization/#capturing-values-in-a-javascript-function
I just saw the example, it is kinda weird . I tried the example (well a modified version) of it and I was getting a module import error so I kinda assumed it was because of that. It might be something else as I managed to work around it by using
and passing a primitive type to the lambda