Hi everyone! Is it possible to convert variable of...
# golang
c
Hi everyone! Is it possible to convert variable of type pulumi.StringOutput to string... I think it's with ApplyT but I'm running into errors trying to manipulate that.
b
Can you give an example that you are getting errors with? ApplyT is indeed the right way
c
Copy code
ingressURL := ingress.Status.ApplyT(
		func(status interface{}) string {
			return *status.(*networkingv1.IngressStatus).LoadBalancer.Ingress[0].Hostname
		}).(pulumi.StringOutput)
However @bored-table-20691, I'm not sure how to get the Hostname as just a string...
b
You can’t - it is not known deterministically, so you can only access it inside the ApplyT (and then use it elsewhere as an Output).
What are you trying to do?
c
I found out how to solve that. Route53 zone IDs never change so I defined those in pulumi config file