This message was deleted.
# getting-started
s
This message was deleted.
p
This is the current code.
I think line 30 is the bit causing me issues.
b
so the problem here is that the Kubernetes ingress might have been created (ie, registered in the API server) but the backing load balancer (I'm guessing you're using the AWS load balancer controller?) might not have been provisioned yet
p
Exactly..
here’s the error
preview
throws, which is understandable.
up
behaves the same way, though:
Copy code
pulumi:pulumi:Stack (demo_env-mattr):
    error: Running program '/Users/matthew.riedel/Source/devex/demo_env' failed with an unhandled exception:
    Error: invocation of aws:lb/getLoadBalancer:getLoadBalancer returned an error: invoking aws:lb/getLoadBalancer:getLoadBalancer: 1 error occurred:
    	* error retrieving LB: LoadBalancerNotFound: Load balancers '[mattr-mattr-lb]' not found
    	status code: 400, request id: 25a5f702-7435-435c-a5a7-ccd7aa948357
b
does the ingress resource return a
status
field that gets populated with the load balancer name? if it does, might be able to use an
apply()
on that
p
I started that way, but maybe I goofed something up.. Let me try again
b
I don't have a great answer off the top of my head here, but I'll have a crack at this tonight to see if I can find a solution, because I agree this is a problem that we need to try figure out
you might try deploying the ingress manually, inspecting the status output and seeing what's there
p
Thanks @billowy-army-68599
Here’s what I have now. Will give this a shot.
Just an update on this @billowy-army-68599 - I tried a few
.apply
approaches (the current one below), and they exhibit the same issue. My hunch is that k8s gets the LB hostname, but AWS hasn’t actually finished creating it yet, so when
getLoadBalancer
is called, it’s not found. I suppose I could wrap the whole thing in some sort of delay, but wondering if there might be a better solution.
FWIW, I decided to use the
ts-retry
module as a workaround. This seems to work for my purposes.
🙌 1
Any drawbacks / idiom-breaking issues with that approach?