Terraform-mode already comes with it's own terraform-format-on-save-mode, but the way it inserts the corrected source into the buffer often causes weird cursor movement which is annoying.