-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Open
Labels
Description
Current Terraform Version
v0.12.0-dev
Use-cases
Debugging, mainly.
Proposal
Terraform currently exposes the following info about a lock:
terraform/states/statemgr/locker.go
Lines 185 to 196 in 0995559
| // String return a multi-line string representation of LockInfo | |
| func (l *LockInfo) String() string { | |
| tmpl := `Lock Info: | |
| ID: {{.ID}} | |
| Path: {{.Path}} | |
| Operation: {{.Operation}} | |
| Who: {{.Who}} | |
| Version: {{.Version}} | |
| Created: {{.Created}} | |
| Info: {{.Info}} | |
| ` | |
which can make it a bit difficult to even embark on any debugging route as one first has to understand where to look (filesystem or any particular remote storage).
I think it would be helpful to expose the name of the backend which holds the lock, e.g.
Lock Info:
ID: a7870da6-a5a2-3e83-54f5-28ace4d5bb7c
Backend: s3
Path: terraform.tfstate
Operation: OperationTypeApply
Who: radeksimko@local
Version: 0.12.0
Created: 2019-01-13 23:02:37.282887 +0000 UTC
Info: