But I cannot find a way to do this for load balanc...
# azure
b
But I cannot find a way to do this for load balancing rules with native provider. Does anyone have a solution for this problem?
f
The rules doesn’t have specific objects. You have to assemble them when you create the LoadBalancer. The same goes for Application Gateway.
b
Ok, but in my case, this is a blocker, because I don't know frontendIPConfiguration, BackendPool and Probe IDs, before load balancer is created. And I need all of those values to create LB rule.
Thant you for the answer.
f
The solution I ended up going with is creating a dummy app that I can deploy in an infra stack, deploy the real apps and export the info I needed. After that I deploy infra again and it picks up the exports and deploys the real config
It’s really awkward and ugly, but I’m not sure what else to do
Since you can’t have a stack reference to a stack that isnt deployed yet and I didn’t want to change configuration, I added some code that lists the currently deployed stack of the correct project and only when I’ve verified it’s existence do I create a stack reference.
In my case it’s application gateway and app services, so I deploy a dummy app on a free tier. That way I can also export the asuid and create the dns records early for the apps and avoid that intermittent problem.
f
It is possible to derive the frontendIpConfig, BackendPool, and HealthProbe IDs before creating the load balancer, using Output.apply and building their IDs manually
@blue-easter-85923, what language are you using? I'm happy to share our entire typescript load balancer file
b
Python. Thank you, that would be great.
f
Is it all deployed in a single stack?