Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] work when the API Gateway is specified external to the serverless project #49

Open
dls314 opened this issue Oct 12, 2022 · 1 comment

Comments

@dls314
Copy link

dls314 commented Oct 12, 2022

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
@cpcwood
Copy link

cpcwood commented Nov 9, 2023

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants