From d0ecb232ae96c8a59fb6e3a0fc9a4d92d1f14fe4 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Sun, 8 Oct 2017 11:24:43 -0400 Subject: [PATCH] record consul session ID in lock info This can help correlate TF and consul logs --- backend/remote-state/consul/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/remote-state/consul/client.go b/backend/remote-state/consul/client.go index fe14e2c0c7..e180210912 100644 --- a/backend/remote-state/consul/client.go +++ b/backend/remote-state/consul/client.go @@ -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,