How do you handle circular dependencies in Pulumi ...
# aws
b
How do you handle circular dependencies in Pulumi ? I have an
apigatewayv2.Authorizer
which is used in an
apigatewayv2.Route
, but when I delete the stack it wants to delete the Authorizer first (which makes sense), and I get this error:
Copy code
* deleting API Gateway v2 authorizer: ConflictException: Cannot delete authorizer 'authorizer-bar', is referenced in route: $connect
So basically I’m kinda stuck with this loop : Authorizer -> Route -> Authorizer (Even though it technically depends on the Authorizer in order to be created, I need to delete the Route before deleting the Authorizer)
l
Authorizers don't normally depend on Routes. Can you include the code that causes that dependency? It may have to be removed in a step that doesn't delete either resource (breaking the dependency).