Skip to content

Commit

Permalink
Merge pull request #33 from vngcloud/iam-vserver
Browse files Browse the repository at this point in the history
update timeout vdb
  • Loading branch information
manhtu1997 authored Nov 25, 2024
2 parents f9cd912 + 34959fd commit 28f60ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions resource/vdbv2/resource_memstore_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,14 @@ func resourceMemStoreBackupCreate(d *schema.ResourceData, m interface{}) error {
Target: []string{"COMPLETED"},
Refresh: resourceMemStoreBackupStateRefreshFunc(cli, createDbResult.Data.BackupId),
Timeout: 30 * time.Minute,
Delay: 10 * time.Second,
Delay: 30 * time.Second,
MinTimeout: 10 * time.Second,
}

id, _ := stateConf.WaitForStateContext(context.TODO())
id, err := stateConf.WaitForStateContext(context.TODO())
if err != nil {
return fmt.Errorf("error when waiting for backup to be created: %s", err)
}
idStr := id.(string)

log.Println("[DEBUG] Wait for state done, id: " + idStr)
Expand Down
7 changes: 5 additions & 2 deletions resource/vdbv2/resource_relational_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,14 @@ func resourceRelationalBackupCreate(d *schema.ResourceData, m interface{}) error
Target: []string{"COMPLETED"},
Refresh: resourceRelationalBackupStateRefreshFunc(cli, createDbResult.Data.BackupId),
Timeout: 30 * time.Minute,
Delay: 10 * time.Second,
Delay: 30 * time.Second,
MinTimeout: 10 * time.Second,
}

id, _ := stateConf.WaitForStateContext(context.TODO())
id, err := stateConf.WaitForStateContext(context.TODO())
if err != nil {
return fmt.Errorf("error when waiting for backup to be created: %s", err)
}
idStr := id.(string)

log.Println("[DEBUG] Wait for state done, id: " + idStr)
Expand Down

0 comments on commit 28f60ad

Please sign in to comment.