Hello - I'm facing the following error while tryin...
# general
r
Hello - I'm facing the following error while trying to update the rest api in AWS API Gateway. Did some research and found out that by setting
create_before_destroy=true
in the lifecycle section on deployment resource, it will get rid of that problem. This solution works on terraform side but I didn't see any such option on the Pulumi side to set the lifecycle section on
aws._*apigateway*_._*Deployment*_
resource.
BadRequestException: Active stages pointing to this deployment must be moved or deleted
e
Pulumi doesn't support destroy before create currently (see https://github.com/pulumi/pulumi/issues/2877). You'll probably have to do this as two updates.
r
@echoing-dinner-19531 - I'm looking for
create_before_destroy
flag on the API Gateway deployment resource so that it creates the new resource before it tries to delete the existing depploymentresource because an active stage is pointing to it.
Also, It's not very clear to me from GitHub issue how to do 2 updates to re-deploy the API Gateway related changes.
e
Ah right sorry got words flipped around. Pulumi's default behaviour matches terraforms of create_before_destroy=true, so you shouldn't have to do anything.
If your creating a new API gateway resource you'll need to do that in two steps though. One
pulumi up
to delete teh current gateway, then add the new gateway resource and
pulumi up
again.
r
I'm creating a child resource of the parent resource.. so do i still need to delete the whole gateway ?
or just the resource part in the gateway ?
e
I don't know API gateway well enough to say for sure. I'd suspect not, but see what errors happen.
r
ok, no worries. will try and let you know how it goes.
@echoing-dinner-19531 - is there a way to specify the json filename (instead of actual contents) as the value of a key in stack configuration file ?
e
Not currently, some thinking around that in https://github.com/pulumi/pulumi/issues/11872
r
got it, thanks