-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add HTTP API component #1164
base: master
Are you sure you want to change the base?
Add HTTP API component #1164
Conversation
- Fix mapping sub-resources by map key. - Pipe through additional args to the root API resource.
Use TS type checking to check that the schema and TS types are mappable by assigning the generated type to the manual TS type.
Specify a lambda function directly, or a lambda invoke URN.
Remove initial Typescript scaffolding types and fix final mismatches.
- First nodejs deployment passing. - Fix marking the HttpApi as a component. - Fix a couple of minor implementation details. - Go seems to have build issues now.
It's not possible to make some variables `const` and some `let` when unpacking the original inputs.
Just give single way of passing lambdas - by ARN. Passing a whole lambda seems to turn the whole integrations map into an output which doesn't match the types. - Auto-construct invoke ARN from the lambda ARN. - Automatically add a permission for the API Gateway to call the lambda.
Work around pulumi/pulumi#14662 where the Go SDK was failing to compile.
These names only have to be unique within the API. Skipping autonaming makes the created name and therefore URL predictable.
- Rename DomainConfiguration type and property to DomainName to match original resource name.
A few questions before reviewing details here:
|
Thanks for the initial questions @lukehoban
I believe this should sit within the main AWSx library for a couple of reasons:
👍 added a reference in the description. I think it's easier to iterate on a concrete design as previous discussions and documents around these designs and the split have failed to gain traction. This is my attempt at moving the issue forwards by making a working proposal.
Alternatively, we could look at also moving some of the guides content to be within the registry docs similar to the new VPC registry docs - where we're able to embed more of a guide right into the VPC resource page. |
Couple of things:
|
API Gateway V2 allows construction using plain resources rather than requiring swagger specs to be generated. This makes it possible to create a component which transparently exposes all features of the underlying resources while improving usability.
This component focuses specifically on setting up a HTTP API rather than WebSocket API. The WebSocket API should be a separate component in a similar pattern to the Fargate vs EC2 ECS components.
Encapsulates:
GET /pets
default
stage which will autodeploy)Fixes pulumi/pulumi-aws-apigateway#6
Examples
Simplest lambda setup - route-specific integration,
default
stage and deployment auto-created. Lambda permission for API Gateway also auto-created.Re-usable integrations:
Custom stages & domains: