stocky-refrigerator-75813
04/22/2024, 2:58 PMdependsOn
the way i can use dependsOn
for funcitons that accept ResourceOptions
?hundreds-gpu-71155
04/22/2024, 3:41 PM.apply()
to call that codestocky-refrigerator-75813
04/22/2024, 3:43 PMhundreds-gpu-71155
04/22/2024, 3:47 PMhundreds-gpu-71155
04/22/2024, 3:48 PMhundreds-gpu-71155
04/22/2024, 3:48 PM.apply()
is the basic "call this function when you have a value"hundreds-gpu-71155
04/22/2024, 3:49 PMhundreds-gpu-71155
04/22/2024, 3:50 PMwait_on = box.id
dev = pulumi_tailscale.get_device_output(
hostname=wait_on.apply(lambda _: name),
wait_for="20m",
opts=InvokeOptions(...),
)
hundreds-gpu-71155
04/22/2024, 3:51 PMbox.id
is generally the azure-assigned resource ID that only resolves after the resource has been createdhundreds-gpu-71155
04/22/2024, 3:52 PM.urn
, which every pulumi resource has, regardless of provider, but resolves as soon as pulumi starts creating the resourcestocky-refrigerator-75813
04/22/2024, 3:52 PMhundreds-gpu-71155
04/22/2024, 3:58 PM.apply()
or .all()
and return the values you're producing. Those methods produce an Output that can be handed to pretty much anything pulumi.
• I think the functions within .apply()
might not be called, depending on the specifics. Using the value (eg, pulumi.export()
) will ensure it'll definitely be called when the state is applied, but I expect the specifics are .... fuzzy
• The functions passed to `.apply()`/etc might be called multiple times, eg during the preview and then applying. Again, the specifics are probably complicated.