serverless-associate-waf
serverless-associate-waf copied to clipboard
[Feature Request] work when the API Gateway is specified external to the serverless project
I'm importing an API Gateway from outside the serverless project using syntax like this
provider:
apiGateway:
metrics: true
restApiId: ${param:RestApiId}
restApiRootResourceId: ${param:RestApiRootResourceId}
I would still like to use the plugin, but when I try to, serverless is generating a CFN template that doesn't validate, the validation error I get is like the following
Unresolved resource dependencies [ApiGatewayRestApi] in the Outputs block of the template
In case someone else comes across this in the future. To fix the above Unresolved resource dependencies
error, you can add a CloudFormation parameter to the serverless stack named ApiGatewayRestApi
with the API gateway ID value. e.g.
resources:
Parameters:
ApiGatewayRestApi:
Type: String
Default: <API gateway ID>