Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages "Acquiring lock" and "Release lock" are printed to stdout instead of stderr with terraform console which breaks parsing. #19176

Open
zapolnov opened this issue Oct 23, 2018 · 2 comments
Labels
bug cli v0.9 Issues (primarily bugs) reported against v0.9 releases v0.10 Issues (primarily bugs) reported against v0.10 releases v0.11 Issues (primarily bugs) reported against v0.11 releases v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@zapolnov
Copy link

Terraform Version

bash-3.2$ terraform -v
Terraform v0.11.9
+ provider.archive v1.1.0
+ provider.aws v1.36.0
+ provider.external v1.0.0
+ provider.null v1.0.0
+ provider.template v1.0.0
+ provider.tls v1.2.0

Expected Behavior

When I run echo var.project_name|terraform console I expect to see only value of var.project_name on stdout. Everything else (errors, warnings, etc.) should go to stderr.

Actual Behavior

If the lock or unlock request takes more that 400ms, additional messages are being added to stdout:

bash-3.2$ VAR=`echo var.project_name|terraform console`; echo "[${VAR}]"
[projname
Releasing state lock. This may take a few moments...]

Steps to Reproduce

Just run terraform console with slow network and/or when AWS services are slow to respond.

@zapolnov
Copy link
Author

The corresponding code seems to be located here:

l.ui.Output(l.color.Color(LockMessage))
and
l.ui.Output(l.color.Color(UnlockMessage))
.

@hashibot hashibot added v0.11 Issues (primarily bugs) reported against v0.11 releases v0.10 Issues (primarily bugs) reported against v0.10 releases v0.12 Issues (primarily bugs) reported against v0.12 releases v0.9 Issues (primarily bugs) reported against v0.9 releases labels Aug 29, 2019
@5imun
Copy link

5imun commented Jul 17, 2023

I have this problem also, really irritating when you want to do additional things in CI process....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli v0.9 Issues (primarily bugs) reported against v0.9 releases v0.10 Issues (primarily bugs) reported against v0.10 releases v0.11 Issues (primarily bugs) reported against v0.11 releases v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

No branches or pull requests

4 participants