https://pulumi.com logo
#aws
Title
# aws
b

bright-orange-69401

05/24/2023, 11:13 AM
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

little-cartoon-10569

05/24/2023, 8:29 PM
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).
7 Views