Created
January 14, 2021 15:43
-
-
Save leantorres73/689781ca1bdd47d200aecf7ff9d9df41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DEPLOY ------------------------------------------------------------------ | |
// deployment | |
const apigatewaydeploymentsocket = new apigateway.CfnDeployment(this, "apigatewaydeploymentsocket", { | |
apiId: apigatewaysocket.ref | |
}); | |
// stage | |
const apigatewaystagesocket = new apigateway.CfnStage(this, "apigatewaystagesocket", { | |
apiId: apigatewaysocket.ref, | |
deploymentId: apigatewaydeploymentsocket.ref, | |
stageName: "prod", | |
defaultRouteSettings:{ | |
dataTraceEnabled: true, | |
detailedMetricsEnabled: true, | |
loggingLevel: 'ERROR' | |
} | |
}); | |
// all the routes are dependencies of the deployment | |
const routes = new cdk.ConcreteDependable(); | |
routes.add(apigatewayroutesocketconnect); | |
routes.add(apigatewayroutesocketdisconnect); | |
routes.add(apigatewayroutesocketdefault); | |
// Add the dependency | |
apigatewaydeploymentsocket.node.addDependency(routes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment