diff --git a/.changelog/21062.txt b/.changelog/21062.txt new file mode 100644 index 00000000000..1e4eb981b35 --- /dev/null +++ b/.changelog/21062.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_route_table_association: Wait for up to 40 not found checks when creating a new route table association +``` diff --git a/aws/internal/service/ec2/waiter/waiter.go b/aws/internal/service/ec2/waiter/waiter.go index 80d76a5ff83..826a9aa3d8e 100644 --- a/aws/internal/service/ec2/waiter/waiter.go +++ b/aws/internal/service/ec2/waiter/waiter.go @@ -311,7 +311,8 @@ const ( RouteTableDeletedTimeout = 5 * time.Minute RouteTableUpdatedTimeout = 5 * time.Minute - RouteTableNotFoundChecks = 40 + RouteTableNotFoundChecks = 40 + RouteTableAssociationCreatedNotFoundChecks = 40 ) func RouteTableReady(conn *ec2.EC2, id string) (*ec2.RouteTable, error) { @@ -351,10 +352,11 @@ func RouteTableDeleted(conn *ec2.EC2, id string) (*ec2.RouteTable, error) { func RouteTableAssociationCreated(conn *ec2.EC2, id string) (*ec2.RouteTableAssociationState, error) { stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.RouteTableAssociationStateCodeAssociating}, - Target: []string{ec2.RouteTableAssociationStateCodeAssociated}, - Refresh: RouteTableAssociationState(conn, id), - Timeout: RouteTableAssociationCreatedTimeout, + Pending: []string{ec2.RouteTableAssociationStateCodeAssociating}, + Target: []string{ec2.RouteTableAssociationStateCodeAssociated}, + Refresh: RouteTableAssociationState(conn, id), + Timeout: RouteTableAssociationCreatedTimeout, + NotFoundChecks: RouteTableAssociationCreatedNotFoundChecks, } outputRaw, err := stateConf.WaitForState()