-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform fmt adds spaces to commented here-docs, every run returns output to STDOUT #6524
Comments
Hi @u2mejc! Thanks for this report. It looks like in your example the heredoc is actually inside a multi-line comment, and so Issue #6375 describes another weird thing that However, I certainly agree that it's a bug that iterative runs of Just as with that other issue, the change here would likely be in the |
Thx Martin, and you're correct, it's commented here-docs specifically. I appended the title. Related, do you think the hcl library should have a verbose option in terraform debug? Presently, if gives no output, even in trace. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.6.15
Affected Resource(s)
Any HCL object stanza (resource, module, variable, etc...)
Terraform Configuration Files
Debug Output
Nada, fmt doesn't appear to support TF_LOG=debug nor trace. Should this be a separate issue? Would be nice to understand how a code block was evaluated.
Panic Output
n/a
Expected Behavior
Exit 0, without output to stdout. Not add spaces, and not send anything to stdout (since the command always returns exit 0, regardless of input).
Actual Behavior
Continues to add spaces to here doc, damaging whitespace sensitive code and breaking CI by always returning output to stdout.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
$ terraform fmt test.tf
The text was updated successfully, but these errors were encountered: