sparse-intern-71089
09/24/2023, 3:16 PMproud-chef-51117
09/24/2023, 3:18 PMApply
function and then I fear the output types get a bit scrambled:
func (dex *Dex) IngressIP() pulumix.Output[string] {
ingress := dex.getIngress()
frontendIP := pulumix.Apply(ingress, func(r *networkingv1.Ingress) pulumi.StringOutput {
status := r.Status
loadBalancer := status.LoadBalancer()
ingress := loadBalancer.Ingress()
lbiao := ingress.ToIngressLoadBalancerIngressArrayOutput()
ip := pulumix.Apply(lbiao, func(vs []networkingv1.IngressLoadBalancerIngress) string {
index := 0
if len(vs) <= index {
return ""
}
return *vs[index].Ip
})
return pulumix.Cast[pulumi.StringOutput](ip)
})
// leads to "cannot convert pulumi.StringOutput to string"
return pulumix.MustConvertTyped[string](frontendIP.ToOutput(context.Background()))
}
echoing-dinner-19531
09/25/2023, 9:09 AMproud-chef-51117
09/25/2023, 9:16 AMechoing-dinner-19531
09/25/2023, 10:51 AMThe kubernetes/helm provider is already full of pulumixWe're going to publish "sdkx" versions at some point which will generate pulumix style structs for things like the return value of GetResource.