Hi all, I have used pulumi a fair amount in JS. Bu...
# general
Hi all, I have used pulumi a fair amount in JS. But I have recently started using it in golang. In the golang implementation how do I use outputs, e.g the IP address of a network interface as an input for another object? So far I have been running an Apply on the output, then exporting using
and finally to use it doing
. This just seems like jumping through hoops though so surely there is a better way I don't know about? Cheers
Out of interest, why did you switch to golang? Personally using TS, but also have golang coding exp.
We recently did a project in golang it really enjoyed it so thought we would use it for this new project. I have actually just found that after the Apply func you can do:
Copy code
rancherInstanceInternalIP := rancherInstance.NetworkInterfaces.ApplyT(func(iface []compute.InstanceNetworkInterface) *string {
			return iface[0].NetworkIp
// The change I have made here is adding .(pulumi.StringPtrInput) to make it a usable input
@silly-stone-79070 can’t you just use the value directly at the point you need the input? Pulumi should figure out the details on resolving it itself
I ended up going with typescript as I found the whole experience of pulumi in go more effort
TS in vscode is a very nice DevX :)