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?