(Easily) Setting Up Atom For Terraform Development


I’ve been finding myself editing automation code for tools like Terraform (A platform agnostic infrastructure provisioning tool) more frequently in the past few months.

No longer satisfied with using vim (Sorry fans!) I decided to make the switch to Atom.

So far things have been going smoothly but I knew the tool could help me write better Terraform code with a few more tweaks (or more importantly, plugins).

The Plugins

The following plugins helped provide me with basic completion, syntax highlighting, linting, and automatic formatting for all my Terraform .tf files.


Instead of writing a lengthy article on about how totally awesome all this is, I’ve decided to help you get started as quickly as possible.

Get Started Quickly

Assuming you already have terraform in your PATH, the following code is install and forget (minus one change I’ll mention after the code snippet).

Just copy and paste into your terminal of choice.

apm install atom-beautify linter linter-terraform-syntax language-terraform

A Small Note

If you’d like terraform fmt to occur on each save, you’ll need to make a small change to atom-beautify.

  1. Go to the packages menu (Edit>Preferences>Packages)
  2. Click the “Settings” tab on atom-beautify
  3. Find and click Terraform to expand it (List is in alphabetical order)
  4. Make sure the “Beautify On Save” checkbox is ticked.
  5. ???
  6. PROFIT!

In Closing

While this article is rather short, it should help you quickly setup Atom for easily editing Terraform .tf files.

If you have any questions, feel free to comment below.

Happy automating!