Skip to content

Commit 946c74f

Browse files
authored
update postgres flex force delete instance waiter (#373)
1 parent 5d0a457 commit 946c74f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/postgresflex/wait/wait.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface
118118
switch *s.Item.Status {
119119
default:
120120
return true, nil, fmt.Errorf("instance with id %s has unexpected status %s", instanceId, *s.Item.Status)
121+
case InstanceStateSuccess:
122+
return false, nil, nil
121123
case InstanceStateDeleted:
122124
return true, nil, nil
123125
}
124126
})
125-
handler.SetTimeout(15 * time.Minute)
127+
handler.SetTimeout(5 * time.Minute)
126128
return handler
127129
}
128130

0 commit comments

Comments
 (0)