Skip to content

Commit fb4117f

Browse files
authored
Merge pull request #44649 from hashicorp/b-dynamodb_waiter
aws_dynamodb_table: add delay to available waiter
2 parents b0a3432 + fca6e5e commit fb4117f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

internal/service/dynamodb/wait.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ const (
3030

3131
func waitTableActive(ctx context.Context, conn *dynamodb.Client, tableName string, timeout time.Duration) (*awstypes.TableDescription, error) {
3232
stateConf := &retry.StateChangeConf{
33-
Pending: enum.Slice(awstypes.TableStatusCreating, awstypes.TableStatusUpdating),
34-
Target: enum.Slice(awstypes.TableStatusActive),
35-
Refresh: statusTable(ctx, conn, tableName),
36-
Timeout: max(createTableTimeout, timeout),
33+
Pending: enum.Slice(awstypes.TableStatusCreating, awstypes.TableStatusUpdating),
34+
Target: enum.Slice(awstypes.TableStatusActive),
35+
Refresh: statusTable(ctx, conn, tableName),
36+
Timeout: max(createTableTimeout, timeout),
37+
Delay: 5 * time.Second,
38+
ContinuousTargetOccurence: 2,
3739
}
3840

3941
outputRaw, err := stateConf.WaitForStateContext(ctx)

0 commit comments

Comments
 (0)