Skip to content

Commit

Permalink
Merge pull request #21831 from ialidzhikov/fix/route-not-found-checks
Browse files Browse the repository at this point in the history
r/route: Prevent giving up on route ready wait too early
  • Loading branch information
ewbankkit authored Nov 18, 2021
2 parents f6c1bd4 + 402edc1 commit 096592b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/21831.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_route: On route creation with high custom creation timeout configured, the aws_route resource does no longer give up before the create timeout is exceeded (previously it was giving up after 20 not found checks).
```
2 changes: 2 additions & 0 deletions internal/service/ec2/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
// General timeout for EC2 resource creations to propagate
PropagationTimeout = 2 * time.Minute

RouteNotFoundChecks = 1000 // Should exceed any reasonable custom timeout value.
RouteTableNotFoundChecks = 1000 // Should exceed any reasonable custom timeout value.
RouteTableAssociationCreatedNotFoundChecks = 1000 // Should exceed any reasonable custom timeout value.
)
Expand Down Expand Up @@ -291,6 +292,7 @@ func WaitRouteReady(conn *ec2.EC2, routeFinder RouteFinder, routeTableID, destin
Target: []string{RouteStatusReady},
Refresh: StatusRoute(conn, routeFinder, routeTableID, destination),
Timeout: timeout,
NotFoundChecks: RouteNotFoundChecks,
ContinuousTargetOccurence: 2,
}

Expand Down

0 comments on commit 096592b

Please sign in to comment.