https://pulumi.com logo
#general
Title
# general
c

crooked-solstice-88279

03/06/2020, 11:20 PM
Hi, I'm trying to destroy a stack that consists of an AWS API Gateway with a lambda and some static files behind it; when I run
pulumi destroy
I get a failure:
Copy code
Do you want to perform this destroy? yes
Destroying (ng-dev):
     Type                          Name               Status                  Info
     pulumi:pulumi:Stack           devng-ng-dev       **failed**              1 error
 -   └─ aws:apigateway:Deployment  normalgaussiandev  **deleting failed**     1 error
 
Diagnostics:
  aws:apigateway:Deployment (normalgaussiandev):
    error: deleting urn:pulumi:ng-dev::devng::aws:apigateway:x:API$aws:apigateway/deployment:Deployment::normalgaussiandev: error deleting API Gateway Deployment (855quj): BadRequestException: Active stages pointing to this deployment must be moved or deleted
 
  pulumi:pulumi:Stack (devng-ng-dev):
    error: update failed
nb; this is a self contained test stack. Nothing else points to it, so I'm not sure what the "active stages pointing to this deployment" might be
f

faint-table-42725

03/06/2020, 11:33 PM
the stages it’s referring to are AWS API Gateway stages, e.g. https://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html
l

loud-midnight-95614

03/06/2020, 11:38 PM
Seems like there are a few bugs filed against Terraform with this error message specifically in regards to the API Gateway. Just guessing, but maybe you can try Crosswalk (https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/) to avoid this problem?
c

crooked-solstice-88279

03/07/2020, 12:05 AM
Ok, that makes the error make more sense. If I'm not mistaken the Crosswalk api is the awsx module? If so, that is indeed what I was using. Looking through the AWS console everything seems pretty much how I would expect. There was a stage listed against the API Gateway, and deleting it manually failed to resolve the issue. I'm going to drop the entire stack manually, delete the pulumi entry and try again.