Of course it is like json so you can also use vi or vim BUT the template will grow and you need check syntax ecc
So like nobody use vim to write java code but use eclipse or similar for terraform my advice is atom.
Atom
At the moment I found only one advanced editor Atom you can download from the main website
https://atom.io/
you need also to add the package for terraform from here
https://github.com/GiantToast/language-terraform
it is enough run the command
apm install language-terraform
if you are behind a corporate proxy you will be receive an error like this
apm install language-terraform
Installing language-terraform to C:\Users\myuseranme\.atom\packages failed
Request for package information failed: SELF_SIGNED_CERT_IN_CHAIN
for windows it is enough create a file in the atom directory inside your home C:\Users\myuseranme\.atom\.apmrc
strict-ssl = false
for linux the file is the same ~/.atom/.apmrc
this will resolve the problem and you can have a
apm install language-terraform
Installing language-terraform to C:\Users\myuseranme\.atom\packages done
PS C:\Users\myuseranme\.atom>
Sublime Text 3
On ubuntu 16:04 virtualized on windows I had a problem with Atom so I was forced to use another editor. I found that also Sublime 3 has a plugin for Terraform thanks to this article https://www.amon.cx/blog/building-your-infrastructure-with-terraform/
Atom and Sublime Text both have syntax plugins for Terraform making it easier to spot typos
I tried to install Sublime using the command line and I waste a little bit of time instead
- go in the sublime download page https://www.sublimetext.com/3 take the tarball
- uncompress
- run the binary called ./sublime_text
- close sublime
- cd in the directory ~/.config/sublime-text-3/Packages/
- do a git clone in of this plugin
git clone https://github.com/alexlouden/Terraform.tmLanguage.git
- restart sublime and you have the syntax available
available plugin
at the moment I found
- https://github.com/alexlouden/Terraform.tmLanguage successfully used
- https://github.com/tmichel/sublime-terraform not tested