1 minute read

Since infrastructure as code files are just text files, you’ll need some kind of editor to author these files. As I mentioned, you can use any editor that you want, but this blog assumes you’ll be using the popular Visual Studio Code (VS Code) editor. It works on Windows, macOS, and Linux, so unless you’re using OS/2 or some stupid shit, you should be good to go.

Installing

Installing is easy. Just go to code.visualstudio.com (or click :point_down:).

Install VS Code

Configuration

You don’t need to know much about how it works to use VS Code successfully, but if you’ve got some free time check out the docs. It’s worth going over the Getting Started section because you’ll find there are a lot of little tips that will enable you to work better.

One thing you should know is that you can quickly add functionality to VS Code by installing extensions. Extensions will add extra commands and enhancements. A lot of extensions will do things like syntax highlighting (color-coding your text so it’s easier to read) and IntelliSense. Other extensions may add useful commands that aren’t specifically related to text-editing, like building a Dockerfile.

For now, add the Hashicorp Terraform extension which will make your Terraform code look real pretty.

  1. Click on the Extensions icon VS Code Extensions icon on the Activity Bar located on the left-hand side.
  2. Type hashicorp terraform in the search bar and click on the result that has the checkmark and Hashicorp on it.
  3. Smash that Install button!

If you’re interested in learning Bicep, do the same thing but search for bicep and use the official Microsoft extension.

Updated:

Comments