If I perform an `apply()` on an `Output` of a reso...
# typescript
s
If I perform an
apply()
on an
Output
of a resource, shouldn't the callback only be called when the resource is created and the value is available when doing a
pulumi preview
?
b
From the docs for apply function - “This function will only be called execution of a ‘pulumi up’ request. It will not run during ‘pulumi preview’ (as the values of resources are of course not known then). It is not available for functions that end up executing in the cloud during runtime. To get the value of the Output during cloud runtime execution, use get().”
👍 1
s
Ok thanks, so I must have been doing something wrong here. I'm creating a
k8s.core.v1.Service
resource and calling apply on it's
metadata.name
property, which is an
Output
. If I run
pulumi preview
the callback gets called with
undefined
as value. Am I understanding something wrong here?
Sorry, forget it. I misused deepmerge somewhere in between which caused my problem.