Closed dacahill7 closed 2 years ago
Hi @dacahill7 !
The documentation link is pointing to another type of API Gateway service (REST) but not to HTTP API Gateway which we support in this module.
I think your PR is needed so I am merging it.
v1.4.0 has been just released.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
This change adds a lifecycle policy to the aws_apigatewayv2_integration to allow for more stable changes to existing resources.
Motivation and Context
If there is a terraform change replacing both an API Gateway Route and an API Gateway Integration, it can run into an issue where a VPC link is being destroyed as the old Gateway Route is being deleted. The error becomes:
Cannot delete Integration because it is referenced by the following Routes with Ids:
In the documentation for aws api_gateway_deployment, it suggests to use a lifecycle block to create_before_destroy, allowing for the VPC link to be connected to the new API Gateway Route before destroying the connection. This also prevents downtime between moving the link.
How Has This Been Tested?
examples/*
projects I tested using the examples/vpc-link-http. I also used this branch in my own repository to test it fixed the bug.