eager-area-86739
10/24/2018, 2:26 PMApiGateway
ad-hoc?
My scenario:
1. Created the ApiGateway using Swagger Specs, backed by a lambda
2. Deploy
3. Update the stack adding a ApiKey
and UsagePlan
, and updating the Swagger Spec to secure the API
4. Deploy
5. The ApiGateway acknowledge that ApiKey
is there, but once we go to the Deployment in the AWS console, the ApiKey
is not deployed
6. In the AWS Console, force the deploy of the ApiGateway
7. The ApiKey
is deployed and used by the APIwhite-balloon-205
Deployment
resource to get replaced to ensure a new deployment of the API is done when there are changes.
We implement the necessary logic for this here: https://github.com/pulumi/pulumi-aws/blob/master/sdk/nodejs/apigateway/experimental/api.ts#L220
Note that you likely can just use that aws.apigateway.x.API
implementation to get this behavior “for free”. It supports both passing Swagger explicitly as well as passing a simpler list of routes.eager-area-86739
10/24/2018, 3:52 PMDeployment
resource to be deployed? Given that I'm using pulumi up --yes
in the CI/CD pipeline, I need to instruct it on my index.js
file.RestApi
to the x.API
class, given that I'm creating the rest of the resourceswhite-balloon-205
pulumi update
.eager-area-86739
10/24/2018, 4:29 PM<https://gist.github.com/joaoasrosa/d193d837044ea157b8e2eda4ac1ad798>
variables: {
version: swaggerString.apply(sha1hash),
}