These all fail with either inappropiate use of Out...
# kubernetes
g
These all fail with either inappropiate use of Output type, or the value isn't available at the time that line is executed. I've even tried using
apply
at each dot of the "svc.status.load_balancer.ingress" nested dictionary all to no avail. What's the recommended way to base a
depends_on
on a resource that has an evolving status, like a k8s deployment or service? I'm confused and stuck. Any suggestions would be appreciated.
s
Is this all inside one Pulumi program?
g
yes
s
Kubernetes will usually sort these things out via the reconciliation loop. Are you needing the details of the ingress in order to do something else?
g
Yes. For example, I need the kubeconfig in order to run some local commands (OS-native kubectl command lines). I find that something like
Copy code
kc = cluster.kubeconfig.apply(lambda x: x)
## or
kc = cluster.apply(lambda x: x.kubeconfig)

## followed by

something_else(opts=pulumi.ResourceOptions(depends_on=kc)
does not work.
s
Are you able to share more of your code? Is it available in a public repo somewhere perhaps?