Hi there, I am programmatically selecting an ALB t...
# python
Hi there, I am programmatically selecting an ALB to create an ALB rule on. The ALB is selected by tags (using the group tag api), which is fine. If no ALB is available (meaning no rule space left), it'll create the ALB and then create the rule. I have a problem with that, since the next time I'll do
pulumi up
effectively the stack will choose the existing ALB which was previously created will not be created since it's available and this will delete the ALB since the stack is missing the "new" ALB so-to-speak. I thought about working around this by either detaching the ALB using pulumi export then looking for the URN and removing it and then using pulumi import to edit the stack. Thought I'll pick your brain to work around this more effectively
It might be useful to use the
function instead and examine the
results: https://www.pulumi.com/registry/packages/aws/api-docs/servicequotas/getservicequota/#value_python
I think there's a way to get the value and compare it to what rules are there; I'd do a comparison there and then create the resource if needed.
Hey Laura, thank you for your comment. Could you please elaborate? I don't understand how using service quotas would help in this case, and wouldn't that mean that the service quota is bound to the stack?