Describe the bug
If this module has been deployed before with from_peer_associated = false and subsequently run with from_peer_associated = true, the invocation gets into a deadlock. This occurs because both aws_route.peer_routes and aws_route.peer_associated_routes resources would create routes for the VPC's main CIDR. Because of TF's parallelism and the lack of strict ordering between these resources, aws_routes.peer_routes may trigger deletion of the route, then wait for it to be deleted, while aws_route.peer_associated_routes attempts to recreate the route at the same time. If aws_route.peer_associated_routes creates the route before aws_routes.peer_routes sees the route as destroyed, the TF invocation will time out waiting for the route to be desroyed.
Terraform version: 1.5.3
Module version: 6.0.0
Error message:
Timeout waiting for aws_route.peer_routes to be destroyed
Workaround:
Had to rerun terraform plan + apply 2 more times to get it into a good state.
First run: deletes the routes for aws_route.peer_routes, even though they were created by aws_route.peer_associated_routes.
Second run: create the routes for aws_route.peer_associated_routes since now they are missing.
Describe the bug If this module has been deployed before with
from_peer_associated = false
and subsequently run withfrom_peer_associated = true
, the invocation gets into a deadlock. This occurs because bothaws_route.peer_routes
andaws_route.peer_associated_routes
resources would create routes for the VPC's main CIDR. Because of TF's parallelism and the lack of strict ordering between these resources,aws_routes.peer_routes
may trigger deletion of the route, then wait for it to be deleted, whileaws_route.peer_associated_routes
attempts to recreate the route at the same time. Ifaws_route.peer_associated_routes
creates the route beforeaws_routes.peer_routes
sees the route as destroyed, the TF invocation will time out waiting for the route to be desroyed.Terraform version:
1.5.3
Module version:
6.0.0
Error message: Timeout waiting for
aws_route.peer_routes
to be destroyedWorkaround: Had to rerun terraform plan + apply 2 more times to get it into a good state.
First run: deletes the routes for
aws_route.peer_routes
, even though they were created byaws_route.peer_associated_routes
. Second run: create the routes foraws_route.peer_associated_routes
since now they are missing.