You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just finished standing up a new service using the apigateway module, but ran into some strange behavior: after I changed something in the Swagger file, my API stopped working. After some investigation I found out that Terraform will delete the stage during the deployment process:
Notices Swagger has changed, so the deployment resource has to be replaced
Creates new deployment, pointing to the stage
As the first step of getting rid of the old deployment resource, it deletes the stage
The reason why this does not happen to our existing services is thanks to mere luck: if there's an existing base path mapping pointing to the stage, the DeleteStage call fails, Terraform ignores that failure, and skips to the DeleteDeployment step.
Until this gets fixed, the workaround is to set up a custom domain in the module, which is considered best practice anyway. I just wanted to raise awareness, and track the upstream issue.
The text was updated successfully, but these errors were encountered:
Just finished standing up a new service using the
apigateway
module, but ran into some strange behavior: after I changed something in the Swagger file, my API stopped working. After some investigation I found out that Terraform will delete the stage during the deployment process:The reason why this does not happen to our existing services is thanks to mere luck: if there's an existing base path mapping pointing to the stage, the
DeleteStage
call fails, Terraform ignores that failure, and skips to theDeleteDeployment
step.Fortunately a patch is already available that fixes this behavior, hopefully it'll be merged upstream soon: hashicorp/terraform-provider-aws#3896
Until this gets fixed, the workaround is to set up a custom domain in the module, which is considered best practice anyway. I just wanted to raise awareness, and track the upstream issue.
The text was updated successfully, but these errors were encountered: