This message was deleted.
# general
s
This message was deleted.
w
Yes - this is an awkward part of how API Gateway is managed. You actually have to force the
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.
e
I imagine so. I can force the
Deployment
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.
@white-balloon-205 what I.m not getting is how can I move from the
RestApi
to the
x.API
class, given that I'm creating the rest of the resources
w
What other resources are you creating? What I meant was “force the Deployment resource to be recreated”. That is accomplished on the line of code I linked above which has a comment describing why it works. This doesn’t require changing how you run
pulumi update
.
e
As example:
<https://gist.github.com/joaoasrosa/d193d837044ea157b8e2eda4ac1ad798>
Got it now.
I wasn't looking to the correct link. 😐
Copy code
variables: {
                version: swaggerString.apply(sha1hash),
            }