mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
Terraform calls ReplaceRoute whenever an existing route changes target, so route tables could be created but never updated; the only workaround was to destroy and recreate the table. The action replaces the target of the route matching DestinationCidrBlock. AWS takes exactly one target per call, so the target a request does not name is cleared rather than carried over; a merge would leave a route holding two targets at once, which AWS cannot produce. Only GatewayId and NatGatewayId are modelled by Route, plus LocalTarget, which needs no new field because `local` is the gateway id a route table's built-in route already carries. The other ten AWS targets keep the UnsupportedOperation they returned before this action existed rather than being accepted and silently clearing the route they were meant to repoint. Errors follow the EC2 reference: InvalidRoute.NotFound when no route matches the destination, MissingParameter when DestinationCidrBlock is absent (an IPv6 or prefix-list request), and InvalidParameterCombination for two targets or none. Closes #2087