-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
Improve HCL formatting to work with stdin and stdout #2926
Labels
Comments
Need this to work with zed as well |
In the meantime simple wrapper bash script can help: #!/bin/sh
# wrapper to format hcl passed via stdin
# user for for VSCcode Custom Local Formatters extension (https://marketplace.visualstudio.com/items?itemName=jkillian.custom-local-formatters)
# or any other editor relying on stdin/stdout for formatting, like Zed
# relevant issues:
# * https://github.com/gruntwork-io/terragrunt/issues/1037
# * https://github.com/gruntwork-io/terragrunt/issues/2926
TMPFILE=$(mktemp)
cat - > $TMPFILE
terragrunt hclfmt --terragrunt-hclfmt-file $TMPFILE
cat $TMPFILE
rm $TMPFILE |
This is perfect, thank you! |
alikhil
added a commit
to alikhil/terragrunt
that referenced
this issue
Jul 23, 2024
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for raising this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the solution you'd like
Improve Terragrunt
hclfmt
command to work with stdin and stdout to make Terragrunt easier to integrate into auto-formatting invocations from IDEsDescribe alternatives you've considered
Used script which read stdin, save in a temp file, format file, write to stdout...
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: