record consul session ID in lock info

This can help correlate TF and consul logs
This commit is contained in:
James Bardin 2017-10-08 11:24:43 -04:00
parent 7916268d7f
commit d0ecb232ae
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ func (c *RemoteClient) lock() (string, error) {
return "", err
}
// store the session ID for correlation with consul logs
c.info.Info = "consul session: " + lockSession
opts := &consulapi.LockOptions{
Key: c.Path + lockSuffix,
Session: lockSession,