Skip to content

Commit

Permalink
fix: remove API GW deployment resource
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Mar 26, 2024
1 parent f8672b2 commit fa56f2a
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions packages/pulumi-aws/src/apps/api/ApiWebsocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,6 @@ export const ApiWebsocket = createAppModule({
}
});

const deployment = app.addResource(aws.apigatewayv2.Deployment, {
name: "websocket-api-deployment",
config: {
apiId: websocketApi.output.id,
description: "WebSocket API Deployment"
},
opts: {
dependsOn: [
websocketApiDefaultRoute.output,
websocketApiConnectRoute.output,
websocketApiDisconnectRoute.output
]
}
});

const apiGatewayLoggingRole = app.addResource(aws.iam.Role, {
name: "apiGatewayLoggingRole",
config: {
Expand Down Expand Up @@ -141,10 +126,10 @@ export const ApiWebsocket = createAppModule({
name: "websocket-api-stage",
config: {
apiId: websocketApi.output.id,
deploymentId: deployment.output.id,
autoDeploy: true,
name: app.params.run.env,
defaultRouteSettings: {
// Only enable if debugging. Note that by default, API Gateway does not
// Only enable when debugging. Note that by default, API Gateway does not
// have the required permissions to write logs to CloudWatch logs. More:
// https://coady.tech/aws-cloudwatch-logs-arn/
// loggingLevel: "INFO",
Expand All @@ -163,7 +148,6 @@ export const ApiWebsocket = createAppModule({
websocketLambdaPermission,
lambdaWebsocketPolicy,
lambdaWebsocketRolePolicyAttachment,
deployment,
websocketApiUrl: pulumi.interpolate`${websocketApi.output.apiEndpoint}/${websocketApiStage.output.name}`
};
}
Expand Down

0 comments on commit fa56f2a

Please sign in to comment.