terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Current lock info in "workspace already locked"

Open rbtz-openai opened this issue 7 months ago • 1 comments

Terraform Version

% terraform version
Terraform v1.9.8
on darwin_arm64

Terraform Configuration Files

Debug Output

When I hit an "workspace already locked" lockInfo is set to the lock that that we are trying to get:

│ Error message: workspace already locked (lock ID:
│ "org/workspace")
│ Lock Info:
│   ID:        56f4d44b-d0f6-7196-7245-8157202e95aa
│   Path:      
│   Operation: OperationTypeApply
│   Who:       user@host
│   Version:   1.9.8
│   Created:   2025-06-13 00:09:54.502089661 +0000 UTC

Expected Behavior

In most of the cases you want to know who/what holds the existing lock.

Actual Behavior

We see the info about the lock we failed to get.

Steps to Reproduce

  1. terraform apply

Additional Context

No response

References

No response

Generative AI / LLM assisted development?

No response

rbtz-openai avatar Jun 13 '25 03:06 rbtz-openai

Thanks for this submission. If this issues relates to your account with HCP Terraform, please feel free to also email [email protected] or open a new request.

crw avatar Jun 17 '25 18:06 crw

If the maintainers are open to this change, I’d be happy to contribute a PR.

kannann1 avatar Jul 14 '25 17:07 kannann1

The issue exists in proprietary HashiCorp Cloud Platform technology.

Also please see https://github.com/hashicorp/terraform/blob/main/.github/CONTRIBUTING.md

crw avatar Jul 14 '25 17:07 crw