Merge pull request #27845 from hashicorp/alisdair/fix-remote-backend-state-lock-timeout

backend/remote: Fix broken state lock retry
This commit is contained in:
Alisdair McDiarmid 2021-02-22 11:48:11 -05:00 committed by GitHub
commit 4ccd818e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ func (r *remoteClient) Lock(info *statemgr.LockInfo) (string, error) {
}) })
if err != nil { if err != nil {
if err == tfe.ErrWorkspaceLocked { if err == tfe.ErrWorkspaceLocked {
lockErr.Info = info
err = fmt.Errorf("%s (lock ID: \"%s/%s\")", err, r.organization, r.workspace.Name) err = fmt.Errorf("%s (lock ID: \"%s/%s\")", err, r.organization, r.workspace.Name)
} }
lockErr.Err = err lockErr.Err = err