https://pulumi.com logo
#python
Title
p

powerful-art-3002

11/20/2020, 2:07 PM
#aws how to create new stage/update old after update api gw?
s

steep-alligator-79173

11/24/2020, 11:22 AM
@broad-dog-22463 maybe you can help. We are hitting a problem, when we do any updates in api gateway configuration and then running pulumi app. API gateway deployment is not triggered to make update with new changes to API configuration. Is there any good way to trigger deployment update in pulumi
b

broad-dog-22463

11/24/2020, 11:23 AM
Hi @steep-alligator-79173 Not sure what you mean here - so you've deployed an API Gateway with Pulumi. then you are making a change to the configuration (via Pulumi) but the configuration isn't being deployed?
s

steep-alligator-79173

11/24/2020, 11:25 AM
correct
b

broad-dog-22463

11/24/2020, 11:25 AM
can you show me the code for the API Gateway and then point out what you changed?
what was the output from pulumi when you tried to run the update?
s

steep-alligator-79173

11/24/2020, 11:27 AM
Copy code
ctrl_api = aws.apigateway.RestApi(
    api_name,
    name=api_name,
    policy="""{
    "Version": "2012-10-17",
    "Statement": [...
.....

arc_deployment = aws.apigateway.Deployment(
    f"ctrl-api-deploy-{env}",
    rest_api=ctrl_api.id,
    stage_name=f"{env}")
this is a code for api
let me check output
if i do any changes
Copy code
Previewing update (controller-dev):
     Type                       Name                                     Plan       Info
     pulumi:pulumi:Stack        controller-dev
 ~   ├─ aws:lambda:Function     ctrl-lambda-1-dev                     update     [diff: ~code]
 ~   ├─ aws:lambda:Function     ctrl-lambda-2-dev                     update     [diff: ~code]
 ~   ├─ aws:lambda:Function     ctrl-lambda-3-dev                     update     [diff: ~code]
 ~   ├─ aws:lambda:Function     ctrl-lambda- 4-dev                    update     [diff: ~code]
 ~   ├─ aws:apigateway:RestApi  controller-dev                        update     [diff: ~body,name]
 ~   └─ aws:lambda:Function     ctrl-lambda-5-dev                     update     [diff: ~code]
we noticed that with TS this is working just fine
b

broad-dog-22463

11/24/2020, 12:02 PM
so the Python code isn't generating a diff?
If this is the case, please can you open a bug report on pulumi/pulumi repo with steps we can use to try and reproduce this?
s

steep-alligator-79173

11/24/2020, 12:31 PM
ok