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.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by