backend/remote: Fix broken state lock retry
When using the -lock-timeout option with the remote backend configured in local operations mode, Terraform would fail to retry acquiring the lock. This was caused by the lock error message having a missing Info field, which the state manager requires to be present in order to attempt retries.
This commit is contained in:
parent
6871d0c991
commit
02eb283ad4
|
@ -117,6 +117,7 @@ func (r *remoteClient) Lock(info *statemgr.LockInfo) (string, error) {
|
|||
})
|
||||
if err != nil {
|
||||
if err == tfe.ErrWorkspaceLocked {
|
||||
lockErr.Info = info
|
||||
err = fmt.Errorf("%s (lock ID: \"%s/%s\")", err, r.organization, r.workspace.Name)
|
||||
}
|
||||
lockErr.Err = err
|
||||
|
|
Loading…
Reference in New Issue