Skip to content

Commit 0cc222c

Browse files
authored
Change wait states to cover IN_PROGRESS MIGRATING (#1104)
1 parent afb0ba5 commit 0cc222c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mongodbatlas/resource_mongodbatlas_search_index.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ func resourceMongoDBAtlasSearchIndexUpdate(ctx context.Context, d *schema.Resour
231231
if d.Get("wait_for_index_build_completion").(bool) {
232232
timeout := d.Timeout(schema.TimeoutCreate)
233233
stateConf := &resource.StateChangeConf{
234-
Pending: []string{"CREATING", "IN_PROGRESS", "NOT_VALID", "PENDING"},
235-
Target: []string{"VALID"},
234+
Pending: []string{"IN_PROGRESS", "MIGRATING"},
235+
Target: []string{"STEADY"},
236236
Refresh: resourceSearchIndexRefreshFunc(ctx, clusterName, projectID, dbSearchIndexRes.IndexID, conn),
237237
Timeout: timeout,
238238
MinTimeout: 1 * time.Minute,
@@ -398,8 +398,8 @@ func resourceMongoDBAtlasSearchIndexCreate(ctx context.Context, d *schema.Resour
398398
if d.Get("wait_for_index_build_completion").(bool) {
399399
timeout := d.Timeout(schema.TimeoutCreate)
400400
stateConf := &resource.StateChangeConf{
401-
Pending: []string{"CREATING", "IN_PROGRESS", "NOT_VALID", "PENDING"},
402-
Target: []string{"VALID"},
401+
Pending: []string{"IN_PROGRESS", "MIGRATING"},
402+
Target: []string{"STEADY"},
403403
Refresh: resourceSearchIndexRefreshFunc(ctx, clusterName, projectID, dbSearchIndexRes.IndexID, conn),
404404
Timeout: timeout,
405405
MinTimeout: 1 * time.Minute,

0 commit comments

Comments
 (0)