diff --git a/backend/remote-state/etcdv3/client.go b/backend/remote-state/etcdv3/client.go index 4cb1363ddf..fbc20d929d 100644 --- a/backend/remote-state/etcdv3/client.go +++ b/backend/remote-state/etcdv3/client.go @@ -100,6 +100,9 @@ func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) { if !c.DoLock { return "", nil } + if c.etcdSession != nil { + return "", fmt.Errorf("state %q already locked", c.Key) + } c.info = info return c.lock()