Terraform uses HCL, which has a clean, concise syntax. It is very easy to read, allows comments (both inline and block), and is not fussy about spacing, newlines, or indentation. That is not to say you cannot use a formatter or an IDE to get it looking neat. It is just that there will not be a syntax error if you add an extra space, as it can be with YAML. Using HCL, you can easily split your project up into multiple files as you see fit to make the code easier to read and understand when coming to the project.