-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Add support for formatting .tfbackend
files
#36570
Conversation
I don't think we have a defined |
I recall conversation about this and the main take away from it for me was that the format is driven or at least constrained still largely by HCL1, whereas the rest of the codebase (including The two language editions looks similar enough but are quite different under the hood, so I think it makes it difficult/impossible to guarantee that output from HCL2 would still be compatible with HCL1 parser. It's certainly possible it will be if it concerns just whitespaces it will be but I think we ended up overloading This is also one of the reasons LS does not support that file format today. We have at least standardised the file name, so that editors can associate that with HCL and highlight correctly and someone can create an extension/LS which does more than just highlighting. |
Would the advice then be to not use the *.tfbackend filename? This is recommended in the documentation. If *.tfvars also works and is technically more correct w.r.t formatting, should we update the documentation? |
It's true The two formats have different purpose and different constraints (I believe tfbackend entries basically map to backend CLI flags and the file config is more of an afterthought, CLI flags were first) and they are each based on a different version of HCL. I posted one known workaround in #36564 (comment) |
Fixes #36564
Target Release
1.12.x
CHANGELOG entry