Skip to content

Instantly share code, notes, and snippets.

@m120
Last active March 5, 2021 01:40
Show Gist options
  • Save m120/337c33996d6f0dbcee617b8d3d597f80 to your computer and use it in GitHub Desktop.
Save m120/337c33996d6f0dbcee617b8d3d597f80 to your computer and use it in GitHub Desktop.
gitで更新のあるファイルをまとめて、terraform fmtする。
  • gitで更新のあるファイルをまとめて、terraform fmtする。
$ for tf in $(git status | egrep tf | awk '{print $NF}'); do terraform fmt $tf ;done
@m120
Copy link
Author

m120 commented Mar 5, 2021

こんなことしなくても、ディレクトリに対して実施すれば良い。

% terraform fmt ./

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment