backend/azurerm: fixing a bug where locks couldn't be unlocked (#19441)

Fixes #17046
This commit is contained in:
Tom Harvey 2018-11-22 17:47:35 +01:00 committed by GitHub
parent fc75cb7e3c
commit e437feadc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -252,6 +252,7 @@ func (c *RemoteClient) Unlock(id string) error {
return lockErr
}
c.leaseID = lockInfo.ID
if err := c.writeLockInfo(nil); err != nil {
lockErr.Err = fmt.Errorf("failed to delete lock info from metadata: %s", err)
return lockErr