This message was deleted.
# azure
s
This message was deleted.
b
you can just return
true
👍 1
p
And it's ok that I don't include that Output<bool> in the return result of the caller?
b
yep it should be
p
Actually one more question to clarify something: by the time, for example, the
new Web.WebApp()
constructor exits has the resource actually been created? Or does that occur later, and I need to use Output.Apply to ensure my dependency on it is called at the right time?
b
little more complex than that. when an
Output.Apply
return, it means the Azure API has returned a value for it, which almost always means the resource has been created There are a few edge cases which I can't recall now, but
Output.Apply(value)
is what you need to use
p
Got it, thanks. How does all that work in a Dry Run scenario?
(I'm making a side effect call to Azure, and I'm doing that from
WebApp.Name.Apply(x => {})
)
b
you might want to wrap any SDK run with an if statement checking if it's a dry run: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/#isDryRun
but an Apply shouldn't run anything inside it during a preview
p
Got it, thanks!