wet-fall-68417
05/12/2022, 11:23 AMerror creating API Gateway v2 route: ConflictException: Route with key $connect already exists for this API
The problem is when i create the aws.apigatewayv2.Api
resource, The $connect route creates automatically.
The only way to create an integration request to a route, is to create the aws.apigatewayv2.Route
resource in pulumi, and set the integration resource in it.
But again, i can’t create the route, because it is already exist.
const exampleApi = new aws.apigatewayv2.Api("exampleApi", {protocolType: "WEBSOCKET"});
const exampleIntegration = new aws.apigatewayv2.Integration("exampleIntegration", {
apiId: exampleApi.id,
integrationType: "HTTP_PROXY",
integrationMethod: "ANY",
integrationUri: "<https://example.com/{proxy}>",
});
const exampleRoute = new aws.apigatewayv2.Route("exampleRoute", {
apiId: exampleApi.id,
routeKey: "$connect",
target: pulumi.interpolate`integrations/${exampleIntegration.id}`,
});
me and @purple-answer-54279 looking for answers for a long time without any feedback! last time @great-queen-39697 managed to help us.
How can we solve it?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by